[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#80123: Any progress on the Pre-Download hook?



2009/12/26 Francesco Poli <frx@firenze.linux.it>:
> This bug report (#80123) was filed quite some time ago (on December
> 2000!).
You might know or might not know that Matt Zimmerman is/was
a (previous) member of the APT Team, so this is/was always a todo
list entry which nobody has picked up by now - feel free to do this
now as it seems you are interested in it - you can consider this bug
(like many other wishlist bugs) as tagged as "gift" [0].

Some hints:
The current facility used for DPkg::Pre-Install-Pkgs is in apt-pkg/deb/dpkgpm.cc
mainly in the method RunScriptsWithPkgs() - this could be a small
help regarding how to create, manage and populate a pipe, through the
actual code which transmit the packages through the pipe isn't usable
for you as it uses a completely different data structure then the one
available before download.
An implementation of a pre-download hook is most likely called directly
from cmdline/apt-get.cc - but the actual implementation should resist
in a more global file so that it is possible for e.g. aptitude to use the
same, maybe the apt-pkg/{pkg,dep}cache.cc files are a good place for it.

Without thinking to deep about it i guess it is a good idea to implement
a possibility to generate from a given depCache a textual representation
(but machine parseable of course, apt already includes the human part)
of the scheduled statechanges - this representation could be piped
to an external application, apt-listbugs is e.g. only interest in packages
scheduled for installation or update -- bugcounts of packages going to be
removed aren't really interesting, but a different application maybe want
to warn the user about dubious removals (you used the app included in
this package 5 seconds ago, do you really want to remove it?) so we
should pass anything and let the user-application sort out his gems.


In the bigger picture sense a more general plugin interface for the
APT system would be fabulous (as it was implemented to a small extend
in apt-rpm with lua) but this will stay a wet dream for me a little longer,
i guess - and is nothing i would tag "gift", beside the fact that i am
not in the official position to tag anything as "gift". ;)


Feel free to contact the "team" (aka Michael, me or deity@ in general)
if you have interest, any questions, need help or just want to talk. :)


Best regards / Mit freundlichen Grüßen,

David "DonKult" Kalnischkies

[0] http://wiki.debian.org/qa.debian.org/GiftTag



Reply to: