I'm looking at the $item arrayref in real_install() and trying to
figure out what each element represents. I've noticed something
interesting. $item->[1] ($pkgobj from Fink::Package->package_by_name) is never used.
I've replaced all the $item->[#] calls with constants. At the moment the names are pretty bland. PKGNAME, PKGOBJ, PACKAGE, OP and FLAG. I don't really know what these things are, particularly OP and FLAG. I also don't know what the different (if any) is between PACKAGE and PKGOBJ. The former comes from Fink::PkgVersion->match_package() the latter from Fink::Package->package_by_name(). PACKAGE looks like its a PkgVersion object maybe?
"op" is the operation that is being run (ie, fink install/build/rebuild/reinstall).
the "flag" is keeping state; 0 is packages that have to be added as deps, 1 is packages that have been specifically requested, and 2 is packages that are already installed, I believe.
I think it's a really horrible way to manage it, seems better to have a memoized function that checks the database and just do (if $package->is_installed()) or whatever, rather than needing to track it in the dep loop.
As for the package/pkgobj I'm not sure what the difference is.
-- Benjamin Reed a.k.a. Ranger Rick -- http://ranger.befunk.com/ gpg: 6401 D02A A35F 55E9 D7DD 71C5 52EF A366 D3F6 65FE * porthos grumbles ... stinking virus writers <slackd> it's not so much the virus writers out there as it is the high-quality virus-reading software people have installed today
pgp00000.pgp
Description: PGP signature
