#509100 aptitude: build-dep fails when a virtual package is needed

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Steve Cotton
Date:
2024-01-20 12:54:03 UTC
Severity:
important
Tags:
#509100#5
Date:
2008-12-18 12:23:43 UTC
From:
To:
bmpx build-depends on libcdparanoia0-dev, which is a virtual package
provided by libcdparanoia-dev.

"aptitude install libcdparanoia0-dev" understands this.
"aptitude build-dep bmpx" doesn't.


tsunami:~# aptitude build-dep bmpx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Unable to satisfy the build-depends: Build-Dependslibcdparanoia0-dev.Unable to satisfy the build-depends: Build-Dependslibcdparanoia0-dev.No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done

tsunami:~# aptitude show libcdparanoia0-dev
Unable to find an archive "unstable" for the package "libcdparanoia0-dev"
Package: libcdparanoia0-dev
State: not a real package
Provided by: libcdparanoia-dev

tsunami:~# aptitude install libcdparanoia0-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Note: selecting "libcdparanoia-dev" instead of the
      virtual package "libcdparanoia0-dev"
The following NEW packages will be installed:
  libcdparanoia-dev
0 packages upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 57.3kB of archives. After unpacking 205kB will be used.
Writing extended state information... Done
Get:1 debtorrent://localhost unstable/main libcdparanoia-dev 3.10.2+debian-4 [57.3kB]
Fetched 57.3kB in 1s (34.2kB/s)
Reading package fields... Done
Reading package status... Done
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously deselected package libcdparanoia-dev.
(Reading database ... 313742 files and directories currently installed.)
Unpacking libcdparanoia-dev (from .../libcdparanoia-dev_3.10.2+debian-4_amd64.deb) ...
Setting up libcdparanoia-dev (3.10.2+debian-4) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done

#509100#30
Date:
2020-08-04 13:40:59 UTC
From:
To:
Hii Sam,

Sam Hartman wrote:

Good point, thanks! Done herewith. (And Cc'ed to the master bug report
on this.)

Totally valid point.

Ack.

Another potential not full-blown, but more suitable solution would be
let libapt's resolver translate and maybe even resolve the build-deps
into non-virtual packages and then continue with them as if they would
be the build-depedencies.

Only drawback I see so far: No possibility to interactively choose an
alternative resolution for virtual packages, if there's one.

Manuel: What do you think of this variant?

		Regards, Axel

#509100#37
Date:
2024-01-20 12:50:59 UTC
From:
To:
I found a workaround. If you need to install build dependencies for
package X, just create a fake package, which has "Depends", which are
equal to X's "Build-Depends". Then install this fake package via
aptitude.

Possibility of such workaround means that aptitude already has all
needed machinery. We just need to make aptitude to treat
"Build-Depends" in similar way to "Depends"