Portupgrade and /var/db/pkg/*/+CONTENTS
Randy Pratt
bsd-unix at earthlink.net
Thu Dec 14 07:50:01 PST 2006
I've spent many hours in the past week or so trying to understand
what I'm seeing. In the interest of brevity I've tried to omit
non-relevant detail but this still ends up longer than I would like.
It seems that portupgrade is "deleting" dependencies during the update
process. This is happening for many ports and I only chose the recent
upgrading 'curl-7.15.5_1' to 'curl-7.16.0' (ftp/curl) to demonstrate
what I'm observing.
As a reference I pulled these excerpts from a backup of my
previous /var/db/pkg/* for ports that depended on ftp/curl:
apsfilter-7.2.8/+CONTENTS:@pkgdep curl-7.15.5_1
apsfilter-7.2.8/+CONTENTS:@comment DEPORIGIN:ftp/curl
curl-7.15.5_1/+CONTENTS:@name curl-7.15.5_1
curl-7.15.5_1/+CONTENTS:@comment ORIGIN:ftp/curl
gnupg-1.4.6_1/+CONTENTS:@pkgdep curl-7.15.5_1
gnupg-1.4.6_1/+CONTENTS:@comment DEPORIGIN:ftp/curl
gnupg-devel-1.9.22_1/+CONTENTS:@pkgdep curl-7.15.5_1
gnupg-devel-1.9.22_1/+CONTENTS:@comment DEPORIGIN:ftp/curl
streamtuner-0.99.99_5/+CONTENTS:@pkgdep curl-7.15.5_1
streamtuner-0.99.99_5/+CONTENTS:@comment DEPORIGIN:ftp/curl
sylpheed-2.2.10/+CONTENTS:@pkgdep curl-7.15.5_1
sylpheed-2.2.10/+CONTENTS:@comment DEPORIGIN:ftp/curl
vorbis-tools-1.1.1_1,3/+CONTENTS:@pkgdep curl-7.15.5_1
vorbis-tools-1.1.1_1,3/+CONTENTS:@comment DEPORIGIN:ftp/curl
wmweather-2.4.3/+CONTENTS:@pkgdep curl-7.15.5_1
wmweather-2.4.3/+CONTENTS:@comment DEPORIGIN:ftp/curl
This is from my log of the updating of ftp/curl:
pkg_delete: package 'curl-7.15.5_1' is required by these other
packages and may not be deinstalled (but I'll delete it anyway):
gnupg-1.4.6_1
streamtuner-0.99.99_5
vorbis-tools-1.1.1_1,3
wmweather-2.4.3
I noted that print/apsfilter, security/gnupg-devel and mail/sylpheed2
were missing. Checking /var/db/pkg does indeed show that their
dependency on ftp/curl has been removed. This happens at the time
that the 'but I'll delete it anyway' step occurs.
$ grep DELETED /var/db/pkg/*/+CONTENTS
/var/db/pkg/apsfilter-7.2.8/+CONTENTS:@comment DELETED:pkgdep curl-7.16.0
/var/db/pkg/apsfilter-7.2.8/+CONTENTS:@commentDELETED:DEPORIGIN:ftp/curl
/var/db/pkg/gnupg-devel-1.9.22_1/+CONTENTS:@comment DELETED:pkgdep curl-7.16.0
/var/db/pkg/gnupg-devel-1.9.22_1/+CONTENTS:@comment DELETED:DEPORIGIN:ftp/curl
/var/db/pkg/sylpheed-2.2.10/+CONTENTS:@comment DELETED:pkgdep curl-7.16.0
/var/db/pkg/sylpheed-2.2.10/+CONTENTS:@comment DELETED:DEPORIGIN:ftp/curl
That is also reflected in checking for ports that now depend on
ftp/curl:
pkg_info -R curl-\*
Information for curl-7.16.0:
Required by:
gnupg-1.4.6_2
streamtuner-0.99.99_6
vorbis-tools-1.1.1_2,3
wmweather-2.4.3_1
I decided to force an update of the ports which had dependencies on
ftp/curl deleted:
portupgrade -f apsfilter-7.2.8 gnupg-devel-1.9.22_1 sylpheed-2.2.10
All of the dependencies on ftp/curl were restored:
pkg_info -R curl-\*
Information for curl-7.16.0:
Required by:
apsfilter-7.2.8
gnupg-1.4.6_2
gnupg-devel-1.9.22_1
streamtuner-0.99.99_6
sylpheed-2.2.10
vorbis-tools-1.1.1_2,3
wmweather-2.4.3_1
I was then curious what would happen if I forced a portupgrade of
ftp/curl. I thought it might remove the dependencies again but it
did not. They all remained this time.
Why did a portupgrade to a new version remove dependencies when a
forced update of the same version did not? I'm probably not
understanding the role of the "DELETED" notation in +CONTENTS .
I decided to take a look at how dependences were noted in the
ports tree with 'make'. I double checked for anything out of the
ordinary in etc/make.conf:
CFLAGS= -O -pipe
PERL_VER=5.8.8
PERL_VERSION=5.8.8
This is the relevant portion of /usr/local/etc/pkgtools.conf for
MAKE_ARGS since these have impact on portupgrade dependencies:
'print/apsfilter' => 'BATCH=yes APSFILTER_ALL=yes PAPERSIZE=letter',
Each of the dependencies being deleted were checked with various
incantations to display dependencies:
cd /usr/ports/print/sylpheed
make build-depends-list: returns nothing for curl.
make pretty-print-build-depends-list: returns nothing for curl.
make run-depends-list: returns nothing for curl.
make pretty-print-run-depends-list: includes curl-7.16.0
make all-depends-list: includes /usr/ports/ftp/curl
cd /usr/ports/security/gnupg-devel
make build-depends-list: returns nothing for curl
make pretty-print-build-depends-list: returns nothing for curl.
make run-depends-list: returns nothing for curl.
make pretty-print-run-depends-list: includes curl-7.16.0
make all-depends-list: includes /usr/ports/ftp/curl
cd /usr/ports/print/apsfilter
make BATCH=yes APSFILTER_ALL=yes PAPERSIZE=letter build-depends-list:
returns nothing.
make BATCH=yes APSFILTER_ALL=yes PAPERSIZE=letter pretty-print-run-depends-list:
returns nothing.
make BATCH=yes APSFILTER_ALL=yes PAPERSIZE=letter run-depends-list:
returns nothing for curl.
make BATCH=yes APSFILTER_ALL=yes PAPERSIZE=letter pretty-print-run-depends-list:
returns nothing for curl.
make BATCH=yes APSFILTER_ALL=yes PAPERSIZE=letter all-depends-list:
returns /usr/ports/ftp/curl
I had thought that only run dependencies were being recorded but it
seems pretty obvious that I'm confused there. It seems to be the
results of "make all-depends-list". If I were to go to any port
directory, what command would determine what gets recorded in its
/var/db/pkg/*/+CONTENTS ?
I also get a little apprehensive when the dependencies listed by
"pkg_info -R" are fluid since this is the same as what a
"portupgrade -fr" would use and determines what ports would get
rebuilt.
Is a different criteria being used to determine dependencies during
a version portupgrade than is used by 'make' during installation?
Also, I made sure that pkgdb -F was good as well as portsdb -u.
All ports are shown as up-to-date both before and after updating.
Oh yes, this is on 6.2-PRERELEASE (Nov. 25 build).
I sure would appreciate some kind soul directing me on the path
to dependency enlightment. Or am I charging at windmills? ;-)
Thanks,
Randy
--
More information about the freebsd-ports
mailing list