Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.devel > #119665
| From | Mihai Moldovan <ionic@ionic.de> |
|---|---|
| Newsgroups | linux.debian.devel |
| Subject | Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? |
| Date | 2025-11-21 17:40 +0100 |
| Message-ID | <LTCkV-eFFX-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hello fellow developers I'm currently using the Perl AptPkg bindings to read and handle package cache metadata. I'd like to map a bin:pkg name and version to its corresponding src:pkg ame and version, but unless I missed something, this doesn't seem to be possible? Mapping a bin:pkg name to a src:pkg is easy, through AptPkg::Source(->find), but getting the correct version seems to be impossible. Generally, binary and source package versions may not be identical, e.g., lvm2 -> dmsetup. While AptPkg::Source->find will return a list of source packages for a given binary package, if the list contains multiple entries, there's no way to tell which entry might be a appropriate for a given bin:pkg version, since while the AptPkg::Source data contains a list of bin:pkgs, these are unversioned. Likewise, looking up an AptPkg::Cache::VerFile object via AptPkg::PkgRecords->lookup will return a SourcePkg hash field, but the data in there is also just the unversioned source package name. Contrary to that, the apt_pkg python bindings do provide a source_ver method as part of its PackageRecords class, which is pretty much exactly what one would need. Have a I missed anything and just not looked deeply enough into AptPkg, or is what I want to do really impossible? Mihai
Back to linux.debian.devel | Previous | Next — Next in thread | Find similar | Unroll thread
Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? Mihai Moldovan <ionic@ionic.de> - 2025-11-21 17:40 +0100
Re: Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? David Kalnischkies <david@kalnischkies.de> - 2025-11-21 18:30 +0100
Re: Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? Mihai Moldovan <ionic@ionic.de> - 2025-11-21 18:50 +0100
Re: Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? Mihai Moldovan <ionic@ionic.de> - 2025-11-21 19:20 +0100
Re: Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? "Brendan O'Dea" <bod@debian.org> - 2025-11-22 11:50 +0100
Re: Perl AptPkg bindings: no binpkg(name, ver) -> srcpkg(name, ver) mapping? Mihai Moldovan <ionic@ionic.de> - 2025-11-26 15:50 +0100
csiph-web