Merge lp:~stgraber/ubuntu-archive-tools/fix-preinstalled-images into lp:ubuntu-archive-tools

Proposed by Stéphane Graber on 2012-07-26
Status: Merged
Merged at revision: 552
Proposed branch: lp:~stgraber/ubuntu-archive-tools/fix-preinstalled-images
Merge into: lp:ubuntu-archive-tools
Diff against target: 55 lines (+11/-8)
1 file modified
publish-image-set (+11/-8)
To merge this branch: bzr merge lp:~stgraber/ubuntu-archive-tools/fix-preinstalled-images
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators 2012-07-26 Pending
Review via email: mp+116943@code.launchpad.net

Description of the Change

A few changes found to be needed during alpha-3:
 - Skip products that are in the ignored list early in the loop
 - Allow for "<product> preinstalled <arch>" syntax in product regexp
 - Always put server images in "ubuntu-server/<type>"
 - Detect preinstalled images based on "preinstalled" being part of the product
   name rather than based on the architecture.
 - Update comments to reflect reality

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'publish-image-set'
2--- publish-image-set 2012-07-18 14:26:37 +0000
3+++ publish-image-set 2012-07-26 18:43:22 +0000
4@@ -49,7 +49,7 @@
5 # this identifies known builds
6 product_re = re.compile(
7 '((?:|u|lu|ku|edu|xu|myth)buntu(?: studio)?) '
8- '(alternate|desktop|dvd|server|mobile|core|active|wubi) '
9+ '(alternate|desktop|dvd|server|mobile|core|active|wubi)(?: preinstalled)? '
10 '(i386|amd64$|amd64\+mac|armel$|armel\+dove|armel\+omap$|armel\+omap4|'
11 'armel\+ac100|armel\+mx5|armhf$|armhf\+omap$|armhf\+omap4|armhf\+ac100|'
12 'armhf\+mx5|powerpc)', re.I)
13@@ -126,24 +126,27 @@
14 # builds
15 for build in isotracker.get_builds():
16 product = products[build['productid']]
17+
18+ # Start by skipping anything in the ignore list
19+ if ignore_product_re.search(product):
20+ continue
21+
22 if build['status_string'] != 'Ready':
23 print('Ignoring %s which has status %s' %
24 (product, build['status_string']))
25 continue
26
27- # warn about unknown images
28+ # Fail when finding an unknown product
29 m = product_re.match(product)
30 if not m:
31- if not ignore_product_re.search(product):
32- sys.stderr.write('ERROR: Cannot handle product %s\n' % product)
33- sys.exit(1)
34- continue
35+ sys.stderr.write('ERROR: Cannot handle product %s\n' % product)
36+ sys.exit(1)
37
38 project = m.group(1).lower().replace(' ', '')
39 type = m.group(2).lower()
40 arch = m.group(3).lower()
41
42- if arch.startswith('arm') and type != 'core':
43+ if 'Preinstalled' in product:
44 type = 'preinstalled-%s' % type
45 if project == 'kubuntu' and type == 'mobile':
46 project = 'kubuntu-mobile'
47@@ -210,7 +213,7 @@
48 # ubuntu-netbook) but should be published under the auspices of
49 # another project (e.g. ubuntu). This is of course NOT AT ALL
50 # CONFUSING.
51- if project == 'ubuntu' and type == 'server' and primary_arches:
52+ if project == 'ubuntu' and type == 'server':
53 dir = 'ubuntu-server/%s' % dir
54 elif project == 'ubuntu' and type == 'netbook' and primary_arches:
55 dir = 'ubuntu-netbook/%s' % dir

Subscribers

People subscribed via source and target branches