From owner-freebsd-ports@FreeBSD.ORG Tue Jul 15 11:58:37 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B27D106566B for ; Tue, 15 Jul 2008 11:58:37 +0000 (UTC) (envelope-from andenore@freebsd.org) Received: from smtp.bluecom.no (smtp.bluecom.no [193.75.75.28]) by mx1.freebsd.org (Postfix) with ESMTP id B96778FC1C for ; Tue, 15 Jul 2008 11:58:36 +0000 (UTC) (envelope-from andenore@freebsd.org) Received: from duckjen.nextgentel.no (cFC4401C3.dhcp.bluecom.no [195.1.68.252]) by smtp.bluecom.no (Postfix) with ESMTP id 0DBBF12C23C for ; Tue, 15 Jul 2008 13:30:56 +0200 (CEST) Date: Tue, 15 Jul 2008 13:28:30 +0200 To: freebsd-ports@freebsd.org From: "Anders Nore" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.50 (FreeBSD) Subject: pkg_add fixing dependencies X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 11:58:37 -0000 Hello everyone, I'm working on pkg_install during GSoC to help improve it, and there's one thing I've come across that I'm uncertain is the best behaviour, and it's best shown with an example: Installed packages: firefox-3.0_2,1 zip-2.32 With these packages installed firefox3 has a dependency on zip-2.32 so: duckjen# pkg_delete zip-2.32 pkg_delete: package 'zip-2.32' is required by these other packages and may not be deinstalled: firefox-3.0_2,1 this is OK, but i can pkg_delete -f and it will delete it. And running duckjen# pkg_delete -f zip-2.32 pkg_delete: package 'zip-2.32' is required by these other packages and may not be deinstalled (but I'll delete it anyway): firefox-3.0_2,1 duckjen# pkg_add -r zip After adding zip again it will not have +REQUIRED_BY with the firefox3 entry, but firefox3 will still have the dependency on zip. Thus leaving it unconsistent. This can be checked with: > pkg_info -r firefox-3.0_2,1 > pkg_info -R zip-2.32 So my question is, shouldn't "pkg_add -r zip" check installed packages for dependencies and make a correct +REQUIRED_BY file for zip? I know that portupgrade and portmaster does this. Anders Nore