Subject: apt-build fails to download source packages containing epochs
Package: apt-build
Version: 0.12.25
Severity: normal
Tags: patch

*** Please type your report below this line ***

apt-build seems to not pass full version information to apt-get when
downloading source.

apt-build uses apt-cache in the build_source subroutine in order to look
up the full version information, including epoch (eg. 1:3.0.6-4 in the
case of the 'angband' package, where I encountered this).  Then it
passes the incomplete version information to source_by_source (eg
3.0.6-4), which is then passed to apt-get, which of course cannot find
the file.

Example run (noupdate used for brevity):

calufrax:~# apt-build build-source --noupdate angband
Building the following packages from source:
-----> Installing build dependencies (for angband) <-----
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
-----> Downloading source angband (3.0.6-4) <-----
Reading package lists... Done
Building dependency tree... Done
E: Unable to find a source package for angband
-----> Building angband <-----
Can't chdir(angband-3.0.6): No such file or directory at (eval 1) line 3
        main::__ANON__('angband-3.0.6') called at /usr/bin/apt-build line 288
        main::build('angband', '1:3.0.6', -4) called at /usr/bin/apt-build line 
610
        main::build_source called at /usr/bin/apt-build line 82

I believe the following change is correct, although I am slightly murky
on the policy details of debian versioning and tool behavior.

--- apt-build   2007-01-24 21:27:52.000000000 -0800
+++ apt-build.new       2007-01-24 21:34:07.000000000 -0800
@@ -596,7 +596,7 @@
              #if ($missing) { $build=1; };
              if ($build) {
                  builddep($src_name) unless $conf->build_only;
-                 source_by_source ($src_name, $src_version) if $conf->source;
+                 source_by_source ($src_name, $fullversion) if $conf->source;

                  # Now build the package
                  my ($maintver, $upver);


In any event, the result of this change is a success in my particular
environment and use-case.

calufrax:~# apt-build build-source --noupdate angband
Building the following packages from source:
-----> Installing build dependencies (for angband) <-----
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
-----> Downloading source angband (1:3.0.6-4) <-----
Reading package lists... Done
Building dependency tree... Done
Need to get 1664kB of source archives.
Get:1 http://http.us.debian.org testing/non-free angband 1:3.0.6-4 (dsc) [625B]
Get:2 http://http.us.debian.org testing/non-free angband 1:3.0.6-4 (tar) 
[1571kB]
Get:3 http://http.us.debian.org testing/non-free angband 1:3.0.6-4 (diff) 
[92.9kB]
Fetched 1664kB in 1m14s (22.3kB/s)
gpg: Signature made Mon 19 Jun 2006 11:59:37 PM PDT using DSA key ID BF24424C
gpg: Can't check signature: public key not found
dpkg-source: extracting angband in angband-3.0.6
dpkg-source: unpacking angband_3.0.6.orig.tar.gz
dpkg-source: applying ./angband_3.0.6-4.diff.gz
-----> Building angband <-----
dpkg-buildpackage: source package is angband
dpkg-buildpackage: source version is 1:3.0.6-4
dpkg-buildpackage: source changed by root <[EMAIL PROTECTED]>
[...] 

and so on.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19.2-jsr1
Locale: LANG=en_US.iso88591, LC_CTYPE=en_US.iso88591 (charmap=ISO-8859-1)

Versions of packages apt-build depends on:
ii  apt                           0.6.46.4   Advanced front-end for dpkg
ii  apt-utils                     0.6.46.4   APT utility programs
ii  debconf [debconf-2.0]         1.5.11     Debian configuration management sy
ii  devscripts                    2.9.26     Scripts to make the life of a Debi
ii  dpkg-dev                      1.13.25    package building tools for Debian
ii  g++                           4:4.1.1-15 The GNU C++ compiler
ii  gcc                           4:4.1.1-15 The GNU C compiler
ii  libappconfig-perl             1.56-2     Perl module for configuration file
ii  libapt-pkg-perl               0.1.20     Perl interface to libapt-pkg
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 

Versions of packages apt-build recommends:
ii  build-essential               11.3       informational list of build-essent
ii  fakeroot                      1.5.10     Gives a fake root environment

-- debconf information:
  apt-build/arch_amd: k6
  apt-build/arch_alpha: ev4
* apt-build/options:
  apt-build/arch_intel: pentium
  apt-build/arch_arm: armv2
* apt-build/make_options:
* apt-build/olevel: Medium
* apt-build/build_dir: /var/cache/apt-build/build
* apt-build/repository_dir: /var/cache/apt-build/repository
  apt-build/arch_sparc: sparc
* apt-build/arch_amd64: nocona
* apt-build/add_to_sourceslist: true



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to