Subject: CVS commit: pkgsrc
To: None <source-changes@netbsd.org>
From: Hubert Feyrer <hubertf@netbsd.org>
List: source-changes
Date: 11/18/2000 23:53:32
Module Name:	pkgsrc
Committed By:	hubertf
Date:		Sat Nov 18 21:53:32 UTC 2000

Modified Files:
	pkgsrc/mk: bsd.pkg.mk

Log Message:
Fix print-pkg-size-depends:

I now remember why I felt there was something wrong with the fix in PR
11433: it calls some target with PACKAGE_DEPENDS_WITH_PATTERNS=false, and
this will cause problems when someone has a different version installed
than what's currently in pkgsrc.

This was also what the XXX was for that I couldn't remember - all
dependencies were found installed at the time that the
print-pkg-size-depends target gets called, and as such we can call
run-depends list with the PACKAGE_DEPENDS_QUICK switch (to first print our
direct dependencies, and then look at their @pkgdep lines to get all their
depends - no need for recursion, as well store all a pkg's depends in it's
@pkgdep lines!). Using that, we can call "pkg_info -e" on all the patterns
to expand them to match what's really installed on the system, then make
that list unique (so that e.g. foo-1.0 and foo-* gets to the same pkg
twice, and then sorted out). After that we can calculate it's size as
before using "pkg-info -s".

Using this method is also a whole lot faster (due to no recursion).


To generate a diff of this commit:
cvs rdiff -r1.608 -r1.609 pkgsrc/mk/bsd.pkg.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.