From owner-freebsd-current Thu Apr 8 16:12: 4 1999 Delivered-To: freebsd-current@freebsd.org Received: from alcanet.com.au (news.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 05E0214D1D for ; Thu, 8 Apr 1999 16:11:58 -0700 (PDT) (envelope-from peter.jeremy@auss2.alcatel.com.au) Received: by border.alcanet.com.au id <40354>; Fri, 9 Apr 1999 08:56:46 +1000 Date: Fri, 9 Apr 1999 09:09:46 +1000 From: Peter Jeremy Subject: Re: /sys/boot, egcs vs. gcc, -Os To: bartol@salk.edu Cc: current@FreeBSD.ORG Message-Id: <99Apr9.085646est.40354@border.alcanet.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tom Bartol wrote: >ports/package database system but it occurred to me that perhaps the >database is currently only storing which packages a given package depends >upon and is NOT storing which packages depend upon a given >package The port source tree stores a list of pre-requisite packages in each Makefile. The `required-by' list is not stored - it would be a nightmare to maintain. On installation, the packages database stores both dependency directions. /var/db/pkg//+CONTENTS contains the list of pre-requisite packages in `@pkgdep' records. The +CONTENTS file is part of the package. /var/db/pkg//+REQUIRED_BY contains the `required-by' list and is maintained automatically by the package management tools (eg installing `foo' which depends on `bar' adds a line `foo' to /var/db/pkg/bar/+REQUIRED_BY, which is removed if the package in removed). The problem is that the package management system provides `add' and `delete' functions only, and the delete function (by default) requires all dependent packages to be deleted first. (You can force the delete to ignore the dependent packages, but that loses the +REQUIRED_BY file contents). There's no mechanism for updating a package - and it's not clear (to me anyway) how this can be done safely in a general way. Where the update is only minor (and won't affect the dependent packages), you can use something like: mv /var/db/pkg/bar-1.1/+REQUIRED_BY /var/db/pkg/save pkg_delete bar-1.1 pkg_add bar-1.2 mv /var/db/pkg/save /var/db/pkg/bar-1.2/+REQUIRED_BY This approach can't pick up the dependent packages that really do need to be re-compiled against the newly installed package. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message