pull-pkg fails to download mixed-component packages

Bug #1943819 reported by Paride Legovini
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Reproducer:

$ pull-pkg -p bin --distro ubuntu libstrongswan-extra-plugins
Source package lookup failed, trying lookup of binary package libstrongswan-extra-plugins
Using source package 'strongswan' for binary package 'libstrongswan-extra-plugins'
Found strongswan 5.9.1-1ubuntu2 in impish
Pulling only binary package 'libstrongswan-extra-plugins'
Use package name 'strongswan' to pull all binary packages
File libstrongswan-extra-plugins_5.9.1-1ubuntu2_amd64.deb incorrect size, got 0 expected 197088
Download Error: Could not download http://archive.ubuntu.com/ubuntu/pool/main/s/strongswan/libstrongswan-extra-plugins_5.9.1-1ubuntu2_amd64.deb to /tmp/libstrongswan-extra-plugins_5.9.1-1ubuntu2_amd64.deb

It fails because the download URL is wrong: it tries to download from main, while the package is in universe. However the same command works fine with other packages in universe:

$ pull-pkg -p bin --distro ubuntu an
Found an 1.2-6build3 in impish
Using existing file an_1.2-6build3_amd64.deb

This may be happening because src:strongswan has some bin packages in main and others in universe:

$ rmadison -a amd64 -s impish -S strongswan | cut -d'|' -f1,3
 charon-cmd | impish/universe
 charon-systemd | impish/universe
 libcharon-extauth-plugins | impish
 libcharon-extra-plugins | impish/universe
 libstrongswan | impish
 libstrongswan-extra-plugins | impish/universe
 libstrongswan-standard-plugins | impish
 strongswan | impish
 strongswan-charon | impish
 strongswan-libcharon | impish
 strongswan-nm | impish/universe
 strongswan-pki | impish/universe
 strongswan-scepclient | impish/universe
 strongswan-starter | impish
 strongswan-swanctl | impish/universe

This may confuse pull-pkg. I didn't try with pull-lp-debs, but I'd expect it to behave identically, as it's just a convenience script around pull-pkg.

Revision history for this message
Dan Streetman (ddstreet) wrote :
Revision history for this message
Paride Legovini (paride) wrote :

Confirmed working. Thanks!

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.185

---------------
ubuntu-dev-tools (0.185) unstable; urgency=medium

  [ Alex Murray ]
  * ubuntutools/archive.py:
    + Fix crash due to PersonalPackageArchiveSourcePackage() returning the
      wrong object when requesting a download url. LP: #1938659

  [ Krytarik Raido ]
  * merge-changelog: Fix setting of newlines.

  [ Dan Streetman ]
  * misc: download to tmp file, to avoid leftover 0-size file on error
  * misc: handle ConnectionError as NotFoundError
  * archive: use proper component source packages sometimes have different
    component than their bpphs, so use the correct component when downloading
    binaries (LP: #1943819)
  * misc: fix flake8 complaints

  [ Stefano Rivera ]
  * Bump Standards-Version to 4.6.0, no changes needed.

 -- Stefano Rivera <email address hidden> Fri, 17 Sep 2021 15:53:02 -0700

Changed in ubuntu-dev-tools (Ubuntu):
status: Fix Committed → Fix Released
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.