2009/1/28 Stefano Zacchiroli <[email protected]>: > On Wed, Jan 28, 2009 at 10:39:23AM +0100, Julian Andres Klode wrote: >> > Yes, I can access all of them using the low-level apt_pkg API, but it >> > is way more cumbersome. I believe it'd make sense to have an iterator >> > over all available versions of the current package, in the high-level >> > API. >> >> Yes of course. I will see if I can do this. My plan would be to create a >> class Version, and add an iterator versions to apt.package.Package.And >> reimplement candidateX() and installedX() methods to use this class. > > Many thanks. > > By the way, my intended use case for this is actually not to only > access the version as a string (which AFAICT is the only access you > can get right now from the high-level API), but rather to access the > whole set of information corresponding to a given version > (dependencies and other fields). > > Just getting a list of version numbers is kinda useless unless you can > "join" them with their information. > > Do you think it would be possible to have that as well? That's exactly what I mean. The iterator would return Version objects which provide the methods and properties currently available for candidates and installed packages. > > Cheers. > > -- > Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7 > z...@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/ > Dietro un grande uomo c'è ..| . |. Et ne m'en veux pas si je te tutoie > sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime >
-- Julian Andres Klode - Free Software Developer Debian Developer - Contributing Member of SPI Ubuntu Member - Fellow of FSFE Website: http://jak-linux.org/ XMPP: [email protected] Debian: http://www.debian.org/ SPI: http://www.spi-inc.org/ Ubuntu: http://www.ubuntu.com/ FSFE: http://www.fsfe.org/ -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

