Merge lp:~mbp/udd/877827-blacklist into lp:udd

Proposed by Martin Pool
Status: Merged
Approved by: James Westby
Approved revision: 564
Merged at revision: 563
Proposed branch: lp:~mbp/udd/877827-blacklist
Merge into: lp:udd
Diff against target: 45 lines (+15/-0)
3 files modified
pkgimport.conf (+5/-0)
udd/iconfig.py (+5/-0)
udd/scripts/import_package.py (+5/-0)
To merge this branch: bzr merge lp:~mbp/udd/877827-blacklist
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+88348@code.launchpad.net

Description of the change

This addresses bug 877827 by just giving a means to disable importing packages from particular distroseries. Obviously we don't want to do that too much, but in this case where the history is nonmonotonic, it's probably reasonable.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pkgimport.conf'
2--- pkgimport.conf 2011-12-15 17:58:06 +0000
3+++ pkgimport.conf 2012-01-12 11:23:27 +0000
4@@ -11,3 +11,8 @@
5 [nexuiz-data]
6 # More than 24h is necessary, let's try 3 days
7 pi.max_duration=259200
8+
9+[openldap]
10+# Version numbers stepped backwards; let's just not import the old ones.
11+# See https://bugs.launchpad.net/udd/+bug/877827
12+pi.blacklist_distro_releases = woody
13
14=== modified file 'udd/iconfig.py'
15--- udd/iconfig.py 2012-01-11 14:54:26 +0000
16+++ udd/iconfig.py 2012-01-12 11:23:27 +0000
17@@ -195,6 +195,11 @@
18 register_option('pi.ubuntu_merges_dir', default='{pi.www_dir}/merges',
19 help='Merges against Ubuntu versions.')
20
21+config.option_registry.register(
22+ config.ListOption(
23+ 'pi.blacklist_distro_releases',
24+ default=[],
25+ help='Do not import from these distribution releases'))
26
27 # Used by categorize_failures.py:
28 register_option('pi.web_status_dir', default = '{pi.www_dir}/status',
29
30=== modified file 'udd/scripts/import_package.py'
31--- udd/scripts/import_package.py 2011-12-12 10:41:06 +0000
32+++ udd/scripts/import_package.py 2012-01-12 11:23:27 +0000
33@@ -657,7 +657,12 @@
34 imported_suites = set()
35 have_imported_old_debian = False
36 last_target_info = None
37+ config = iconfig.PackageStack(name, possible_transports)
38 for importp in reversed(all_versions.plist):
39+ if importp.release in config.get('pi.blacklist_distro_releases'):
40+ trace.mutter('%s %s is blacklisted; skipping it' %
41+ (name, importp.release))
42+ continue
43 suite = icommon.make_suite(importp.release, importp.pocket)
44 if (importp.distro, suite) in imported_suites:
45 continue

Subscribers

People subscribed via source and target branches