apt-build has a critical failure before even managing to download source packages

Bug #79364 reported by Ashley Stone
10
Affects Status Importance Assigned to Milestone
apt-build (Ubuntu)
Fix Released
Low
Andrea Gasparini

Bug Description

Binary package hint: apt-build

While packaging my own packages, I have found that apt-build is unable to even acknowledge their existance:

On a clean Ubuntu 6.10 install after running a upgrade, installing apt-build, mc and adding 'deb-src http://packages.quickfox.org/ deb-source/' to the sources.list:

root@qfsndbox:~/test# apt-build source glfrontier
W: Unable to locate package glfrontier
W: Unable to locate package glfrontier
E: No packages found
Use of uninitialized value in string eq at /usr/bin/apt-build line 402.
Missing source pakcage name for source_by_source().
root@qfsndbox:~/test# apt-build install glfrontier
W: Unable to locate package glfrontier
W: Unable to locate package glfrontier
W: Unable to locate package glfrontier
E: No packages found
Use of uninitialized value in string eq at /usr/bin/apt-build line 402.
Unable to find binary candidate for glfrontier at /usr/bin/apt-build line 476.
root@qfsndbox:~/test# apt-get source glfrontier
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 5141kB of source archives.
Get:1 http://packages.quickfox.org deb-source/ glfrontier 0.0.20060623-1 (dsc) [621B]
Get:2 http://packages.quickfox.org deb-source/ glfrontier 0.0.20060623-1 (tar) [5119kB]
Get:3 http://packages.quickfox.org deb-source/ glfrontier 0.0.20060623-1 (diff) [22.1kB]
Fetched 5141kB in 1s (4562kB/s)
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: Signature made Mon 15 Jan 2007 07:48:17 AM CET using DSA key ID 03EC9F34
gpg: Can't check signature: public key not found
dpkg-source: extracting glfrontier in glfrontier-0.0.20060623
dpkg-source: unpacking glfrontier_0.0.20060623.orig.tar.gz
dpkg-source: applying ./glfrontier_0.0.20060623-1.diff.gz
root@qfsndbox:~/test# ls
glfrontier-0.0.20060623 glfrontier_0.0.20060623-1.diff.gz glfrontier_0.0.20060623-1.dsc glfrontier_0.0.20060623.orig.tar.gz
root@qfsndbox:~/test#

As you can see, for some reason apt-build cannot find the source packages, even though they are there, and apt-get can see them, retrieve them just fine. I did run apt-get update and apt-build update before.

The given repository should be open to the rest of the Internet, so feel free to try the repository and package yourselves.

Related branches

Daniel Hahler (blueyed)
Changed in apt-build:
assignee: nobody → blueyed
Daniel Hahler (blueyed)
Changed in apt-build:
assignee: blueyed → nobody
Revision history for this message
Andrea Gasparini (gaspa) wrote :

Hi,

apt-build uses apt-cache to retrieve the information for the package.
I check it and i found that if you don't have also the corresponding deb line, it doesn't work.

If there's a command to retrieve the list of a deb-src repository, i could try to make a patch. :)

thanks!

Revision history for this message
Andrea Gasparini (gaspa) wrote :

it occur to me that It should use apt-cache showsrc instead of only 'show'...

Changed in apt-build:
assignee: nobody → gaspa
status: New → Confirmed
Revision history for this message
Andrea Gasparini (gaspa) wrote :

There's a patch for this bug in the report of #45875

Revision history for this message
Daniel Hahler (blueyed) wrote :

Sorry, Andrea, I've just sponsored the debdiff from bug 45875, which did not include the fix for this bug.
Also, I have a heavily improved/patched apt-build laying around here, which I wanted to split into patch sets and put into version control. I'll do so in the next days and we can see how to address this particular bug here then, ok?
Please attach a new patch against the new version in Hardy, and I'll try to see how it fits in the other patches I have. Thanks!

Revision history for this message
Andrea Gasparini (gaspa) wrote :

Hi Daniel,
really, I think you have uploaded the patch containing also the fix for this bug:

In sources from hardy, i see:
  1 apt-build (0.12.29ubuntu1) hardy; urgency=low
  2
  3 * apt-build:.
  4 - Support specific version/distribution for packages to install.
  5 ( LP: #145875 )
  6 - get_src_version should use apt-cache showrc instead of show
  7 ( LP: #79364 )

And in apt-build:
416 open APTCIN, $conf->apt_cache . " showsrc $pkg_name |";

So, this bug is actually fixed.... :)

For your patchset, i'll be glad to help you..

bye!

Changed in apt-build:
status: Confirmed → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

I cannot see the reference on https://launchpad.net/ubuntu/hardy/+source/apt-build/0.12.29ubuntu1 - you are probably looking at the package you've build yourself..

Changed in apt-build:
status: Fix Released → Triaged
Revision history for this message
Andrea Gasparini (gaspa) wrote : Re: [Bug 79364] Re: apt-build has a critical failure before even managing to download source packages

Ah! you're right:
Get:1 http://ppa.launchpad.net hardy/main apt-build 0.12.29ubuntu1 (tar)
[41,7kB]

sorry. :)

Changed in apt-build:
importance: Undecided → Low
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-build - 0.12.31ubuntu1

---------------
apt-build (0.12.31ubuntu1) hardy; urgency=low

  * Manual sync from Debian unstable, plus a new fix (described below).
  * apt-build (LP: #79364):
     - Fix apt-build to let it use packages from repositories for which there's
       only a deb-src line in /etc/apt/sources.list. This is done by
       changing the "apt-cache show" call in get_src_version() to use
       "apt-cache showsrc" instead; fix discovered by Andrea Gasparini.
  * debian/control:
     - Modify Maintainer value to match the DebianMaintainerField
       specification.

 -- Siegfried-Angel Gevatter Pujals (RainCT) <email address hidden> Sun, 06 Apr 2008 19:55:59 +0200

Changed in apt-build:
status: Fix Committed → Fix Released
Revision history for this message
vestel (vestel) wrote :

Another time the bug was found on hardy

apt-build was working normally, until the update-manager updated it to

$ apt-build -v
apt-build version 0.12.31ubuntu1

Since that, I got the next problem:

$ sudo apt-build source mysql-server
Missing source package name for source_by_source().

$ sudo apt-build install mysql-server
mysql-server will not be built because it doesn't have a source package.
Missing source package name for source_by_source().

$ sudo apt-get source mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 18.3MB of source archives.
Get:1 http://lv.archive.ubuntu.com hardy-updates/main mysql-dfsg-5.0 5.0.51a-3ubuntu5.1 (dsc) [1422B]
Get:2 http://lv.archive.ubuntu.com hardy-updates/main mysql-dfsg-5.0 5.0.51a-3ubuntu5.1 (tar) [17.9MB]
Get:3 http://lv.archive.ubuntu.com hardy-updates/main mysql-dfsg-5.0 5.0.51a-3ubuntu5.1 (diff) [307kB]
Fetched 18.3MB in 3s (5733kB/s)
gpg: Signature made Thu 08 May 2008 04:54:16 PM EEST using DSA key ID FA14013B
gpg: Can't check signature: public key not found
dpkg-source: extracting mysql-dfsg-5.0 in mysql-dfsg-5.0-5.0.51a
dpkg-source: unpacking mysql-dfsg-5.0_5.0.51a.orig.tar.gz
dpkg-source: applying ./mysql-dfsg-5.0_5.0.51a-3ubuntu5.1.diff.gz

Revision history for this message
Andrea Gasparini (gaspa) wrote :

Hi, thanks for your feedback, but it simply works for me:
$ sudo apt-build -v
apt-build version 0.12.31ubuntu1
$ sudo apt-build source mysql-server
-----> Updating package lists <-----
Ign http://download.skype.com stable Release.gpg
Hit http://archive.ubuntu.com hardy Release.gpg
[ .... lot of outputs... ]
Hit http://it.archive.ubuntu.com hardy-proposed/universe Sources
Lettura della lista dei pacchetti in corso... Fatto
-----> Downloading source mysql-dfsg-5.0 (5.0.51a-3ubuntu5.2) <-----
Lettura della lista dei pacchetti in corso... Fatto
Generazione dell'albero delle dipendenze in corso
Lettura delle informazioni di stato... Fatto
È necessario prendere 18,3MB di sorgenti
Get:1 http://it.archive.ubuntu.com hardy-proposed/main mysql-dfsg-5.0 5.0.51a-3ubuntu5.2 (dsc)
....
and so on...

Could you please attach the output of:
apt-cache policy apt-build

and all the information you're able to retrieve about it? Does it do thiw way also for other source packages?

thanks.

Revision history for this message
Andrew Sayers (andrew-bugs-launchpad-net) wrote :
Download full text (4.5 KiB)

This works for me on Hardy with no interesting repositories. Having just installed apt-build, I did:

$ apt-build -v
apt-build version 0.12.31ubuntu1
$ sudo apt-build source mysql-server
You must put some ‘source’ URIs in your sources.list
E: You must put some ‘source’ URIs in your sources.list
Missing source package name for source_by_source().

(Then added source packages with the Software Sources tool)

$ sudo apt-build source mysql-server
-----> Updating package lists <-----
Hit http://archive.canonical.com hardy Release.gpg
Ign http://archive.canonical.com hardy/partner Translation-en_GB
Hit http://gb.archive.ubuntu.com hardy Release.gpg
Hit http://gb.archive.ubuntu.com hardy/main Translation-en_GB
Hit http://gb.archive.ubuntu.com hardy/restricted Translation-en_GB
Hit http://security.ubuntu.com hardy-security Release.gpg
Ign http://security.ubuntu.com hardy-security/main Translation-en_GB
Ign http://security.ubuntu.com hardy-security/restricted Translation-en_GB
Hit http://archive.canonical.com hardy Release
Hit http://gb.archive.ubuntu.com hardy/universe Translation-en_GB
Hit http://gb.archive.ubuntu.com hardy/multiverse Translation-en_GB
Hit http://gb.archive.ubuntu.com hardy-updates Release.gpg
Ign http://gb.archive.ubuntu.com hardy-updates/main Translation-en_GB
Ign http://gb.archive.ubuntu.com hardy-updates/restricted Translation-en_GB
Ign http://gb.archive.ubuntu.com hardy-updates/universe Translation-en_GB
Ign http://gb.archive.ubuntu.com hardy-updates/multiverse Translation-en_GB
Ign http://security.ubuntu.com hardy-security/universe Translation-en_GB
Ign http://security.ubuntu.com hardy-security/multiverse Translation-en_GB
Hit http://security.ubuntu.com hardy-security Release
Hit http://gb.archive.ubuntu.com hardy Release
Hit http://gb.archive.ubuntu.com hardy-updates Release
Hit http://archive.canonical.com hardy/partner Packages
Hit http://security.ubuntu.com hardy-security/main Packages
Hit http://gb.archive.ubuntu.com hardy/main Packages
Hit http://security.ubuntu.com hardy-security/restricted Packages
Hit http://security.ubuntu.com hardy-security/restricted Sources
Hit http://security.ubuntu.com hardy-security/main Sources
Hit http://gb.archive.ubuntu.com hardy/restricted Packages
Hit http://gb.archive.ubuntu.com hardy/restricted Sources
Hit http://gb.archive.ubuntu.com hardy/main Sources
Hit http://gb.archive.ubuntu.com hardy/multiverse Sources
Hit http://gb.archive.ubuntu.com hardy/universe Sources
Hit http://security.ubuntu.com hardy-security/multiverse Sources
Hit http://security.ubuntu.com hardy-security/universe Sources
Hit http://security.ubuntu.com hardy-security/universe Packages
Hit http://security.ubuntu.com hardy-security/multiverse Packages
Hit http://gb.archive.ubuntu.com hardy/universe Packages
Hit http://gb.archive.ubuntu.com hardy/multiverse Packages
Hit http://gb.archive.ubuntu.com hardy-updates/main Packages
Hit http://gb.archive.ubuntu.com hardy-updates/restricted Packages
Hit http://gb.archive.ubuntu.com hardy-updates/restricted Sources
Hit http://gb.archive.ubuntu.com hardy-updates/main Sources
Hit http://gb.archive.ubuntu.com hardy-updates/multiverse Sources
Hit http://gb.archive.ubuntu.com hardy-u...

Read more...

Revision history for this message
vestel (vestel) wrote :

Interesting, I made nothing, except just rebooting the machine and it
found all the repositories and sources needed.
All is working fine, thanks to all!

>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.