[Aptitude-devel] Bug#1061169: aptitude: "aptitude install debhelper-compat" fails with "virtual package provided by: debhelper debhelper debhelper"

David Kalnischkies david at kalnischkies.de
Sat Jan 20 11:24:36 GMT 2024


(drive-by comment from an apt maintainer)

On Sat, Jan 20, 2024 at 06:30:34AM +0000, Askar Safin wrote:
> - Type "aptitude install debhelper-compat"
> 
> The command will fail with the following absolutely absurd message:
> 
> # aptitude install debhelper-compat
> "debhelper-compat" is a virtual package provided by:
>   debhelper debhelper debhelper debhelper debhelper 
> You must choose one to install.
> Unable to apply some actions, aborting

debhelper has (currently) five versioned provides. I think aptitude
doesn't support/expect versioned provides here (if at all):
src/cmdline/cmdline_action.cc:278 ff although there are other places
where a similar message is generated in src/pkg_item.cc and
src/gtk/entitysummary.cc.

Would be a good idea to check if a package is already in the pkgvector
before adding it again – or make that vector a set. Note that libapt has
wrappers like APT::PackageSet nowadays which should work better and more
natural than typedef'ed std-containers<pkgCache::PkgIterator>… but that
transition might be a bigger effort than just adding an (untested)
`if (std::ranges::find(possible, j) == possible.end())` before the
push_back.


Best regards

David Kalnischkies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/aptitude-devel/attachments/20240120/18a11e21/attachment.sig>


More information about the Aptitude-devel mailing list