Merge lp:~wookey/xdeb/xdeb-apt-download into lp:xdeb

Proposed by Wookey
Status: Merged
Merged at revision: 291
Proposed branch: lp:~wookey/xdeb/xdeb-apt-download
Merge into: lp:xdeb
Diff against target: 113 lines (+19/-27) (has conflicts)
4 files modified
debian/changelog (+4/-0)
debian/control (+1/-1)
xdeb.cfg (+12/-12)
xdeb.py (+2/-14)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~wookey/xdeb/xdeb-apt-download
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+75796@code.launchpad.net

Description of the change

This replaces the wget mechanism for downloading build-arch binaries with apt-download.

This fixes the 'tries to download package from wrong repo' issue
https://bugs.launchpad.net/ubuntu/+source/xdeb/+bug/851427

This fix also solves a number of other problems:
1) Removes the only difference between Debian and Ubuntu versions (the native_import_source per-arch config option)
2) Allows all uses of apt config/preferences when downloading binaries (pinning, multiple repos, default-release etc), which makes the tool much more flexible
3) Probably fixes mismatched binary/source download issue: https://bugs.launchpad.net/ubuntu/+source/xdeb/+bug/753968 (needs testing)

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

As discussed on IRC, we do need to keep the wget option for a while because apt-get download requires you to have multiarch configured (which breaks non-native-import-based builds because xdeb has only been half-converted for multiarch), which regrettably means keeping the native_import_source option for now. However, we can make this conditional on whether you have multiarch configured or not, so that you can still get the benefits. I've made appropriate tweaks and merged this into my new-resolver branch (staged for trunk once apt 0.8.16~exp5ubuntu11 has been built and published).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-09-16 14:09:51 +0000
+++ debian/changelog 2011-09-16 18:47:26 +0000
@@ -22,9 +22,13 @@
22 * Depend on multiarch-capable dpkg-cross and invoke it with22 * Depend on multiarch-capable dpkg-cross and invoke it with
23 --convert-multiarch23 --convert-multiarch
24 * Fix lintian test whinge24 * Fix lintian test whinge
25<<<<<<< TREE
25 * Don't fail if null dpkg-cross packages are found LP: #73107926 * Don't fail if null dpkg-cross packages are found LP: #731079
26 * Include lib64c in toolchain packages list - avoids27 * Include lib64c in toolchain packages list - avoids
27 multipleprovides exception on 64-bit arches. LP: #7557428 multipleprovides exception on 64-bit arches. LP: #75574
29=======
30 * Use apt-get download instead of wget for native downloads LP:#851427
31>>>>>>> MERGE-SOURCE
2832
29 [ Steve McIntyre ]33 [ Steve McIntyre ]
30 * Add initial support for armhf. LP: #77252634 * Add initial support for armhf. LP: #772526
3135
=== modified file 'debian/control'
--- debian/control 2011-06-22 23:53:25 +0000
+++ debian/control 2011-09-16 18:47:26 +0000
@@ -10,7 +10,7 @@
1010
11Package: xdeb11Package: xdeb
12Architecture: all12Architecture: all
13Depends: ${misc:Depends}, ${python:Depends}, python-debian (>= 0.1.11), dpkg-dev (>= 1.15), lintian (>= 2.3.0), devscripts (>= 2.10.41), dpkg-cross (>= 2.6.3), apt-utils, python-apt (>= 0.7.91), wget, build-essential, sudo13Depends: ${misc:Depends}, ${python:Depends}, python-debian (>= 0.1.11), dpkg-dev (>= 1.15), lintian (>= 2.3.0), devscripts (>= 2.10.41), dpkg-cross (>= 2.6.3), apt-utils (>= 0.8.11), python-apt (>= 0.7.91), wget, build-essential, sudo
14Recommends: gcc, fakeroot14Recommends: gcc, fakeroot
15Breaks: apt (<< 0.7.26~exp6)15Breaks: apt (<< 0.7.26~exp6)
16Description: Cross-build tool for Debian packages16Description: Cross-build tool for Debian packages
1717
=== modified file 'xdeb.cfg'
--- xdeb.cfg 2011-09-16 00:11:21 +0000
+++ xdeb.cfg 2011-09-16 18:47:26 +0000
@@ -114,38 +114,38 @@
114# unclear; openssh is only temporary114# unclear; openssh is only temporary
115 openssh-client115 openssh-client
116116
117
118# Config section for each arch
119# native_import:
120# list packages which should not have builds attempted - instead they are downloaded
121# from a target architecture repository. The lists are initially empty.
122# Use them to skip troublesome packages in sequenced builds, by
123# downloading pre-built versions
124
117[armel]125[armel]
118parent: baseline126parent: baseline
119native_import_source: http://ports.ubuntu.com/ubuntu-ports127native_import:
120# Packages which should not have builds attempted - instead they are downloaded
121# from a target architecture repository. This list is initially empty.
122# Use it to skip troublesome packages
123native_import:
124128
125[target-armel-generic]129[target-armel-generic]
126parent: armel130parent: armel
127131
128[armhf]132[armhf]
129parent: baseline133parent: baseline
130native_import_source: http://ports.ubuntu.com/ubuntu-ports134native_import:
131# Packages which should not have builds attempted - instead they are downloaded
132# from a target architecture repository. This list is initially empty.
133# Use it to skip troublesome packages
134native_import:
135135
136[target-armhf-generic]136[target-armhf-generic]
137parent: armhf137parent: armhf
138138
139[i386]139[i386]
140parent: baseline140parent: baseline
141native_import_source: http://archive.ubuntu.com/ubuntu/141native_import:
142142
143[target-i386-generic]143[target-i386-generic]
144parent: i386144parent: i386
145145
146[amd64]146[amd64]
147parent: baseline147parent: baseline
148native_import_source: http://archive.ubuntu.com/ubuntu/148native_import:
149149
150[target-amd64-generic]150[target-amd64-generic]
151parent: amd64151parent: amd64
152152
=== modified file 'xdeb.py'
--- xdeb.py 2011-09-16 14:09:51 +0000
+++ xdeb.py 2011-09-16 18:47:26 +0000
@@ -532,21 +532,9 @@
532 continue532 continue
533 if 'filename' not in bin_stanza:533 if 'filename' not in bin_stanza:
534 continue534 continue
535 utils.spawn(['apt-get', apt_opts, 'download', pkg_spec],
536 cwd=options.builddirs[0])
535 deb = bin_stanza['filename']537 deb = bin_stanza['filename']
536 deb_bits = re_deb_filename.match(deb)
537 if deb_bits is None:
538 continue
539
540 if deb_bits.group(3) == build_arch:
541 deb = re_deb_filename.sub(
542 r'\1_\2_%s.deb' % options.architecture, deb)
543 assert target_config.native_import_source, \
544 "No native_import_source configured for arch %s" \
545 % options.architecture
546 utils.spawn(['wget', '-N',
547 '%s/%s' % (target_config.native_import_source,
548 deb)],
549 cwd=options.builddirs[0])
550 deb_base = deb.split('/')[-1]538 deb_base = deb.split('/')[-1]
551 debs.append(deb_base)539 debs.append(deb_base)
552 except StopIteration:540 except StopIteration:

Subscribers

People subscribed via source and target branches