Subject: fixing some issue with print-depends
To: None <>
From: Hubert Feyrer <>
List: tech-pkg
Date: 03/03/2000 06:44:14
Thomas Klausner hinted me at some interresting problem WRT the
print-depends package. If something depends on suse_linus-6.*, that
package will register whatever suse_linux there is right now on the system
(in his case V6.1). What print-depends then does is also dig out any pkgs
required for suse_linux, based on what's in pkgsrc, which is of course
_wrong_, as this most likely doesn't match the installed version.[*] The
right thing instead is to print whatever the (currently installed)
suse_linux package depends on, which can be read from "pkg_info -qf"
output, looking at the @pkgdep lines.

Of course this only works if the pkg is actually installed, so it cannot
be used for README.html generation etc., but that's bad luck.

One positive aspect of using the @pkgdep list instead of going down
recursively is that this saves some time and processes. On my P133 it's
going down from ~11s to 0.5s for the pkgsrc/x11/kde package. During a
"make package" of kde itself (not counting the depending pkgs) this will
cut down like 20s (once for the fake-pkg target, and another one for the
pkg_create args - maybe a 3rd time for pkg_create in fake-pkg, but I don't
want to check that right now).

Anyways, a general solution would be to use the "pkg_info -qf | grep
@pkgdep" in print-depends instead of recursion (only!) in the places that
we know that the depends are installed. Which is the PKG_ARGS assignment
(for pkg_create) and the fake-pkg target.

The patch at does
this. Any review/comments strongly welcome!

Anyone see a problem with committing this?

 - Hubert

[*] Plus it may be questioned that we should not go down recursively
    for pkg depends anyways, but this is used in too many subtle ways
    throughout the system to change.

Microsoft: "Where do you want to go today?"
Linux:     "Where do you want to be tomorrow?"
BSD:       "Are you guys coming, or what?"

---------- Forwarded message ----------
Was ich nicht verstehe -- sollte das nicht lieber die Dependencies von
dem Paket nehmen, wie sie in /var/db/pkg eh schon festgestellt wurden?
So muss man erst wieder rekursiv hinunter bis in die Urgruende, dabei
ist dass doch alles schon bekannt? Sollte auch make-aufrufe sparen :-)


Thomas Klausner -
Programming is like sex:
  One mistake and you have to support for a lifetime.