On Thu, Jun 26, 2014 at 11:13:28PM +0200, Johannes Schauer wrote: > Quoting David Kalnischkies (2014-06-26 22:58:38) > If apt had such an interface, then third party applications which make use of > Packages and Sources files like dose3, ben and botch could directly make use of > those files and the user would not have to retrieve them from somewhere else. > > `apt-cache dumpavail` doesnt work well here because it prints all available > binary packages and doesnt allow to select a suite or distribution. It also > doesnt allow listing source packages. Well, I still kinda like my "workaround" presented in my first mail as it tries to solve this usecase at a higher level, which you haven't commented on so far. Regardless if you want to use the files apt already has or not, you still have to get those files if you can't find them (e.g. stable machine trying to make an anaylse for unstable). So you need acquire code to do all that and all these tools probably don't want to reimplement what apt already does in all its glory with multiple methods, proxy detection, security and what not (or, they at least should not). On the other hand, you could let apt do all this for you by creating a few directories, a sources.list and set some config options. You get file reuse for free then if you copy the lists directory over… This way a 'dumpavail' would include only packages you care about (as the sources.list comes from you), up-to-date files already downloaded are reused (instead of potentially reusing months old files if user has no way of updating as she isn't root) and you get told if one of the files is not as trustworthy as you might want (as apt-get update or similar carries a warning/error instead of you guessing based on other files (not) present in lists). [We would need a 'dumpavailsource' (or similar such) of course] (This thinking is shell-based as I am most familiar with it thanks to our tests, but I assume it is even better/simpler with python-apt) Best regards David Kalnischkies
Attachment:
signature.asc
Description: Digital signature