Merge lp:~brian-murray/apt-clone/test_clone_upgrade_ports into lp:apt-clone

Proposed by Brian Murray
Status: Merged
Merged at revision: 142
Proposed branch: lp:~brian-murray/apt-clone/test_clone_upgrade_ports
Merge into: lp:apt-clone
Diff against target: 31 lines (+10/-2)
1 file modified
tests/test_clone_upgrade.py (+10/-2)
To merge this branch: bzr merge lp:~brian-murray/apt-clone/test_clone_upgrade_ports
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+207753@code.launchpad.net

Description of the change

apt-clone tests are failing on armhf and ppc64el. My branch will fix the issue with armhf and eventually (when we move to U) with ppc64el, the problem is that the test tries to upgrade from saucy to trusty and there is no ppc64el for saucy. I'm not sure how to fix ppc64el right now.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Looks good, thanks! I look at the ppc64el case now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_clone_upgrade.py'
2--- tests/test_clone_upgrade.py 2013-07-26 19:43:44 +0000
3+++ tests/test_clone_upgrade.py 2014-02-21 23:25:33 +0000
4@@ -10,6 +10,7 @@
5 import io
6
7 import apt
8+import apt_pkg
9 import distro_info
10
11 sys.path.insert(0, "..")
12@@ -62,10 +63,17 @@
13 sources_list = os.path.join(tmpdir, "etc", "apt", "sources.list")
14 if not os.path.exists(os.path.dirname(sources_list)):
15 os.makedirs(os.path.dirname(sources_list))
16+ # this still won't work for new architectures like ppc64el
17+ # as they don't exist for from_dist
18+ arch = apt_pkg.config.find("APT::Architecture")
19+ if arch in ['i386', 'amd64']:
20+ server = 'archive.ubuntu.com/ubuntu'
21+ else:
22+ server = 'ports.ubuntu.com/ubuntu-ports'
23 with open(os.path.join(sources_list), "w") as fp:
24 fp.write("""
25-deb http://archive.ubuntu.com/ubuntu %s main restricted universe multiverse
26-""" % from_dist)
27+deb http://%s %s main restricted universe multiverse
28+""" % (server, from_dist))
29 cache = apt.Cache(rootdir=tmpdir)
30 cache.update()
31 cache.open()

Subscribers

People subscribed via source and target branches