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
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-09-16 14:09:51 +0000
3+++ debian/changelog 2011-09-16 18:47:26 +0000
4@@ -22,9 +22,13 @@
5 * Depend on multiarch-capable dpkg-cross and invoke it with
6 --convert-multiarch
7 * Fix lintian test whinge
8+<<<<<<< TREE
9 * Don't fail if null dpkg-cross packages are found LP: #731079
10 * Include lib64c in toolchain packages list - avoids
11 multipleprovides exception on 64-bit arches. LP: #75574
12+=======
13+ * Use apt-get download instead of wget for native downloads LP:#851427
14+>>>>>>> MERGE-SOURCE
15
16 [ Steve McIntyre ]
17 * Add initial support for armhf. LP: #772526
18
19=== modified file 'debian/control'
20--- debian/control 2011-06-22 23:53:25 +0000
21+++ debian/control 2011-09-16 18:47:26 +0000
22@@ -10,7 +10,7 @@
23
24 Package: xdeb
25 Architecture: all
26-Depends: ${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, sudo
27+Depends: ${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
28 Recommends: gcc, fakeroot
29 Breaks: apt (<< 0.7.26~exp6)
30 Description: Cross-build tool for Debian packages
31
32=== modified file 'xdeb.cfg'
33--- xdeb.cfg 2011-09-16 00:11:21 +0000
34+++ xdeb.cfg 2011-09-16 18:47:26 +0000
35@@ -114,38 +114,38 @@
36 # unclear; openssh is only temporary
37 openssh-client
38
39+
40+# Config section for each arch
41+# native_import:
42+# list packages which should not have builds attempted - instead they are downloaded
43+# from a target architecture repository. The lists are initially empty.
44+# Use them to skip troublesome packages in sequenced builds, by
45+# downloading pre-built versions
46+
47 [armel]
48 parent: baseline
49-native_import_source: http://ports.ubuntu.com/ubuntu-ports
50-# Packages which should not have builds attempted - instead they are downloaded
51-# from a target architecture repository. This list is initially empty.
52-# Use it to skip troublesome packages
53-native_import:
54+native_import:
55
56 [target-armel-generic]
57 parent: armel
58
59 [armhf]
60 parent: baseline
61-native_import_source: http://ports.ubuntu.com/ubuntu-ports
62-# Packages which should not have builds attempted - instead they are downloaded
63-# from a target architecture repository. This list is initially empty.
64-# Use it to skip troublesome packages
65-native_import:
66+native_import:
67
68 [target-armhf-generic]
69 parent: armhf
70
71 [i386]
72 parent: baseline
73-native_import_source: http://archive.ubuntu.com/ubuntu/
74+native_import:
75
76 [target-i386-generic]
77 parent: i386
78
79 [amd64]
80 parent: baseline
81-native_import_source: http://archive.ubuntu.com/ubuntu/
82+native_import:
83
84 [target-amd64-generic]
85 parent: amd64
86
87=== modified file 'xdeb.py'
88--- xdeb.py 2011-09-16 14:09:51 +0000
89+++ xdeb.py 2011-09-16 18:47:26 +0000
90@@ -532,21 +532,9 @@
91 continue
92 if 'filename' not in bin_stanza:
93 continue
94+ utils.spawn(['apt-get', apt_opts, 'download', pkg_spec],
95+ cwd=options.builddirs[0])
96 deb = bin_stanza['filename']
97- deb_bits = re_deb_filename.match(deb)
98- if deb_bits is None:
99- continue
100-
101- if deb_bits.group(3) == build_arch:
102- deb = re_deb_filename.sub(
103- r'\1_\2_%s.deb' % options.architecture, deb)
104- assert target_config.native_import_source, \
105- "No native_import_source configured for arch %s" \
106- % options.architecture
107- utils.spawn(['wget', '-N',
108- '%s/%s' % (target_config.native_import_source,
109- deb)],
110- cwd=options.builddirs[0])
111 deb_base = deb.split('/')[-1]
112 debs.append(deb_base)
113 except StopIteration:

Subscribers

People subscribed via source and target branches