[Apt-Rpm] apt has problems with versioned pks and build-dep

Vincent Danen vdanen at annvix.org
Thu Mar 6 17:42:26 PST 2008


This has been an issue for a while now, but it's still an issue with the
new development snapshot.  I'm pretty positive that versioning
requirements work fine with 'install', but they don't for 'build-dep',
as you can see below:


[vdanen at build ~]$ apt-get build-dep apt-0.5.15lorg3.94a-8356avx.src.rpm -y && rpm --rebuild apt-0.5.15lorg3.94a-8356avx.src.rpm 
Get:1 ftp://build.annvix.ca x86_64 release [2958B]
Fetched 2958B in 0s (23.6kB/s)
Get:1 ftp://build.annvix.ca x86_64/current pkglist [580kB]
Get:2 ftp://build.annvix.ca x86_64/current release [161B]
Get:3 ftp://build.annvix.ca x86_64/current-doc pkglist [97.5kB]
Get:4 ftp://build.annvix.ca x86_64/current-doc release [148B]
Fetched 678kB in 0s (1712kB/s)               
Reading Package Lists... Done
Building Dependency Tree... Done
Reading Package Lists... Done
Building Dependency Tree... Done
Selecting lib64readline-devel for 'readline-devel'
E: Build-Depends dependency for apt-0.5.15lorg3.94a-8356avx.src.rpm cannot be satisfied because no available versions of package rpm-devel can satisfy version requirements
Installing apt-0.5.15lorg3.94a-8356avx.src.rpm
error: Failed build dependencies:
         readline-devel is needed by apt-0.5.15lorg3.94a-8356avx.x86_64
         rpm-devel >= 4.2 is needed by apt-0.5.15lorg3.94a-8356avx.x86_64
[vdanen at build ~]$ apt-get install readline-devel rpm-devel
Reading Package Lists... Done
Building Dependency Tree... Done
Selecting lib64readline-devel for 'readline-devel'
Selecting lib64rpm-devel for 'rpm-devel'
The following extra packages will be installed:
   elfutils lib64beecrypt-devel lib64bzip2-devel lib64elfutils-devel lib64elfutils1 lib64neon-devel lib64readline-devel lib64rpm-devel
   lib64sqlite-devel
The following packages will be upgraded
   elfutils lib64elfutils1
The following NEW packages will be installed:
   lib64beecrypt-devel lib64bzip2-devel lib64elfutils-devel lib64neon-devel lib64readline-devel lib64rpm-devel lib64sqlite-devel
2 upgraded, 7 newly installed, 0 removed and 0 not upgraded.
Need to get 2447kB of archives.
After unpacking 6592kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 ftp://build.annvix.ca x86_64/current elfutils 0.131-8498avx [295kB]
Get:2 ftp://build.annvix.ca x86_64/current lib64elfutils1 0.131-8498avx [39.2kB]
Get:3 ftp://build.annvix.ca x86_64/current lib64beecrypt-devel 4.1.2-8298avx [117kB]
Get:4 ftp://build.annvix.ca x86_64/current lib64bzip2-devel 1.0.4-8299avx [38.5kB]
Get:5 ftp://build.annvix.ca x86_64/current lib64elfutils-devel 0.131-8498avx [30.7kB]
Get:6 ftp://build.annvix.ca x86_64/current lib64neon-devel 0.24.7-8260avx [77.1kB]
Get:7 ftp://build.annvix.ca x86_64/current lib64readline-devel 5.2-8314avx [258kB]
Get:8 ftp://build.annvix.ca x86_64/current lib64sqlite-devel 3.5.4-8319avx [59.8kB]
Get:9 ftp://build.annvix.ca x86_64/current lib64rpm-devel 4.4.5-8323avx [1532kB]
Fetched 2447kB in 0s (7528kB/s)   
Committing changes...
error: failed to open /etc/mtab: No such file or directory
Preparing...                ########################################### [100%]
    1:lib64elfutils1         ########################################### [ 11%]
    2:elfutils               ########################################### [ 22%]
    3:lib64elfutils-devel    ########################################### [ 33%]
    4:lib64sqlite-devel      ########################################### [ 44%]
    5:lib64neon-devel        ########################################### [ 56%]
    6:lib64bzip2-devel       ########################################### [ 67%]
    7:lib64beecrypt-devel    ########################################### [ 78%]
    8:lib64readline-devel    ########################################### [ 89%]
    9:lib64rpm-devel         ########################################### [100%]
Done.


I've poked around a bit in apt-get.cc and I see where the error is
coming from (line 1933) and trying to look through how build-dep is
handled differently from install (quite differently, it looks like,
although I'm not sure why they should be so different).

For instance:


[vdanen at build cmdline]$ apt-get install "rpm-devel>=4.2" -s
Reading Package Lists... Done
Building Dependency Tree... Done
Selected version 4.4.5-8323avx for rpm-devel
The following NEW packages will be installed:
   librpm-devel
0 upgraded, 1 newly installed, 0 removed and 0 not upgraded.
Inst librpm-devel (4.4.5-8323avx Unknown:Unknown/Unknown)
Conf librpm-devel (4.4.5-8323avx Unknown:Unknown/Unknown)
[vdanen at build cmdline]$ apt-get build-dep ../../../SRPMS/apt-0.5.15lorg3.94a-8356avx.src.rpm -s
Reading Package Lists... Done
Building Dependency Tree... Done
E: Build-Depends dependency for ../../../SRPMS/apt-0.5.15lorg3.94a-8356avx.src.rpm cannot be satisfied because no available versions of package rpm-devel can satisfy version requirements

I don't get why they should be so different.  The spec has:

BuildRequires:  rpm-devel >= 4.2

and to me the only difference is that with 'install' the packages (and
optional version requirements) are passed on the commandline and with
'build-dep' they're being similarly provided, but as a list pulled from
the src.rpm rather than on the commandline.

It almost seems to me like it might make sense to have the build-dep as
an alias of sorts to the actual install functions and the arguments are
passed to it.  Is there a reason why DoBuildDep() doesn't just call
DoInstall() after constructing the list of buildrequires?  I mean,
install does everything we want, and properly, and the same could be
done to simplify things since the only difference between install and
build-dep is where the list of packages to install comes from, right?

I'd (attempt) to whip something up like that but C++ is more foreign to
me than C, and my daughter has a science fair that I'm (almost) late for
now.  But it seems to me that something like this should be doable, no?

-- 
Vincent Danen @ http://linsec.ca/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20080306/ceb7b5cd/attachment.pgp 


More information about the Apt-Rpm mailing list