Merge ~sespiros/ubuntu-security-tools/+git/ubuntu-security-tools:fix-release-info into ubuntu-security-tools:master
- Git
- lp:~sespiros/ubuntu-security-tools/+git/ubuntu-security-tools
- fix-release-info
- Merge into master
Status: | Merged |
---|---|
Merged at revision: | 2a581f319adaf3be8d31f495332bd9e208c3803a |
Proposed branch: | ~sespiros/ubuntu-security-tools/+git/ubuntu-security-tools:fix-release-info |
Merge into: | ubuntu-security-tools:master |
Diff against target: |
286 lines (+45/-45) 1 file modified
build-tools/umt (+45/-45) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alex Murray | Approve | ||
Leonidas S. Barbosa | Pending | ||
Review via email: mp+427489@code.launchpad.net |
Commit message
Description of the change
Changed most of the umt references to details['release'] to use details[
Now that umt depends on source_map and cve_lib anyway, maybe those parts could be refactored further in the future to entirely remove the release_list field from .ubuntu-
Spyros Seimenis (sespiros) wrote : | # |
Alex Murray (alexmurray) wrote : | # |
I am not in love with changing so much code to use a new name... although I can understand the motivation. What about a different word than base_release - since this is what we would use in the changelog entry, looking at it for inspiration https:/
Spyros Seimenis (sespiros) wrote : | # |
I agree that it seems like a big change but there were 2 ways to fix the changelog/repo commands bug:
1) revert my previous fix; that means that the release field will keep not detecting ESM releases properly, the ESM chroot naming standardization was just a case that worked as a motivation to make all these changes.
2) keep the new field (base_release) and differentiate code that needs a full release name from code that needs just the base release (this patch)
Regarding the name, "distribution" could be an alternative one but I haven't seen that used in any of our tools. cve_lib for example uses the term "parent" https:/
If we wanted to be pedantic, according to
- https:/
- https:/
technically a release is "Ubuntu" plus the version "X.YY" (and I guess the minor versions as well). "series" could also be the term we could use instead of "base_release" ("parent" in cve_lib) and maybe "subproject" instead of "release" (subproject is the term cve_lib uses).
Alex Murray (alexmurray) wrote : | # |
series sounds like a good option - but it would be good to canvas the team to see if anyone else has better ideas.
Emilia Torino (emitorino) wrote : | # |
+1 to refactor and use cve_lib as single source of this type of information
Alex Murray (alexmurray) : | # |
Preview Diff
1 | diff --git a/build-tools/umt b/build-tools/umt | |||
2 | index 27ca44c..603c412 100755 | |||
3 | --- a/build-tools/umt | |||
4 | +++ b/build-tools/umt | |||
5 | @@ -379,10 +379,10 @@ def cmd_changelog(): | |||
6 | 379 | validate_toplevel() | 379 | validate_toplevel() |
7 | 380 | 380 | ||
8 | 381 | is_devel_release = False | 381 | is_devel_release = False |
11 | 382 | if details['release'] != ust['release_devel']: | 382 | if details['series'] != ust['release_devel']: |
12 | 383 | release = details['release'] + '-security' | 383 | release = details['series'] + '-security' |
13 | 384 | else: | 384 | else: |
15 | 385 | release = details['release'] | 385 | release = details['series'] |
16 | 386 | is_devel_release = True | 386 | is_devel_release = True |
17 | 387 | 387 | ||
18 | 388 | if opt.increment: | 388 | if opt.increment: |
19 | @@ -564,7 +564,7 @@ def perform_source_build(details, opt): | |||
20 | 564 | build_params.append('-sa') | 564 | build_params.append('-sa') |
21 | 565 | 565 | ||
22 | 566 | if not opt.skip_maintainer: | 566 | if not opt.skip_maintainer: |
24 | 567 | update_maintainer(details['release'], details['version'], opt.simple_maintainer_update) | 567 | update_maintainer(details['series'], details['version'], opt.simple_maintainer_update) |
25 | 568 | build_source(build_params, build_script, details, | 568 | build_source(build_params, build_script, details, |
26 | 569 | force_dpkg_source=force_dpkg_source) | 569 | force_dpkg_source=force_dpkg_source) |
27 | 570 | process_source_files(details, source_dest, merge=opt.merge) | 570 | process_source_files(details, source_dest, merge=opt.merge) |
28 | @@ -652,8 +652,8 @@ def perform_binary_build(details, opt): | |||
29 | 652 | # If opt.sbuild_dep_resolver is not specified, look for per package overrides | 652 | # If opt.sbuild_dep_resolver is not specified, look for per package overrides |
30 | 653 | if details["build_dep_resolver"] == None: | 653 | if details["build_dep_resolver"] == None: |
31 | 654 | if details['package'] in sbuild_dep_resolver_overrides and \ | 654 | if details['package'] in sbuild_dep_resolver_overrides and \ |
34 | 655 | details['release'] in sbuild_dep_resolver_overrides[details['package']]: | 655 | details['series'] in sbuild_dep_resolver_overrides[details['package']]: |
35 | 656 | details["build_dep_resolver"] = sbuild_dep_resolver_overrides[details['package']][details['release']] | 656 | details["build_dep_resolver"] = sbuild_dep_resolver_overrides[details['package']][details['series']] |
36 | 657 | 657 | ||
37 | 658 | if details["build_dep_resolver"] in ['apt', 'aptitude', 'internal']: | 658 | if details["build_dep_resolver"] in ['apt', 'aptitude', 'internal']: |
38 | 659 | buildopts.append('--build-dep-resolver=%s' % details["build_dep_resolver"]) | 659 | buildopts.append('--build-dep-resolver=%s' % details["build_dep_resolver"]) |
39 | @@ -761,7 +761,7 @@ def cmd_build_orig(): | |||
40 | 761 | opt.skip = True | 761 | opt.skip = True |
41 | 762 | # Force the release as we can't auto-discover based on directory name | 762 | # Force the release as we can't auto-discover based on directory name |
42 | 763 | if opt.release == False: | 763 | if opt.release == False: |
44 | 764 | opt.release = details['release'] | 764 | opt.release = details['series'] |
45 | 765 | details = prepare_build(opt) | 765 | details = prepare_build(opt) |
46 | 766 | perform_source_build(details, opt) | 766 | perform_source_build(details, opt) |
47 | 767 | perform_binary_build(details, opt) | 767 | perform_binary_build(details, opt) |
48 | @@ -919,7 +919,7 @@ def cmd_check(): | |||
49 | 919 | (rc, report) = runcmd(command, stdout=None) | 919 | (rc, report) = runcmd(command, stdout=None) |
50 | 920 | 920 | ||
51 | 921 | # Check if we should warn about a Vcs-Bzr tag | 921 | # Check if we should warn about a Vcs-Bzr tag |
53 | 922 | if details['release'] == ust['release_devel']: | 922 | if details['series'] == ust['release_devel']: |
54 | 923 | try: | 923 | try: |
55 | 924 | for line in open('debian/control').readlines(): | 924 | for line in open('debian/control').readlines(): |
56 | 925 | if line.lower().startswith("vcs-bzr:"): | 925 | if line.lower().startswith("vcs-bzr:"): |
57 | @@ -928,7 +928,7 @@ def cmd_check(): | |||
58 | 928 | pass | 928 | pass |
59 | 929 | 929 | ||
60 | 930 | # Print out some special-case warnings before exiting | 930 | # Print out some special-case warnings before exiting |
62 | 931 | emit_special_warnings(details['package'], details['release']) | 931 | emit_special_warnings(details['package'], details['series']) |
63 | 932 | 932 | ||
64 | 933 | # finally check changes file as well for missing LP: # references | 933 | # finally check changes file as well for missing LP: # references |
65 | 934 | changes_file = dscfile.replace(".dsc", "_source.changes") | 934 | changes_file = dscfile.replace(".dsc", "_source.changes") |
66 | @@ -1156,7 +1156,7 @@ def download_binaries_from_ppa(details, binary_dest, version, ppa, arch, display | |||
67 | 1156 | err("could not find '%s'" % sis_changes) | 1156 | err("could not find '%s'" % sis_changes) |
68 | 1157 | sys.exit(1) | 1157 | sys.exit(1) |
69 | 1158 | 1158 | ||
71 | 1159 | repo_dest = os.path.join(ust['package_tools_repo_base'], details['release']) | 1159 | repo_dest = os.path.join(ust['package_tools_repo_base'], details['series']) |
72 | 1160 | binaries = glob.glob(repo_dest + '/%s_%s_*' % (details['package'], version)) | 1160 | binaries = glob.glob(repo_dest + '/%s_%s_*' % (details['package'], version)) |
73 | 1161 | copy_binaries = False | 1161 | copy_binaries = False |
74 | 1162 | if len(binaries) > 0: | 1162 | if len(binaries) > 0: |
75 | @@ -1170,7 +1170,7 @@ def download_binaries_from_ppa(details, binary_dest, version, ppa, arch, display | |||
76 | 1170 | 1170 | ||
77 | 1171 | if not copy_binaries: | 1171 | if not copy_binaries: |
78 | 1172 | copy_sppa_to_repos = os.path.join(os.environ['UST'], "repo-tools", 'copy_sppa_to_repos') | 1172 | copy_sppa_to_repos = os.path.join(os.environ['UST'], "repo-tools", 'copy_sppa_to_repos') |
80 | 1173 | args = [copy_sppa_to_repos, '--ppa', ppa, '--force-binaries', '--release', details['release']] | 1173 | args = [copy_sppa_to_repos, '--ppa', ppa, '--force-binaries', '--release', details['series']] |
81 | 1174 | if arch: | 1174 | if arch: |
82 | 1175 | args += ['--arch', arch] | 1175 | args += ['--arch', arch] |
83 | 1176 | args.append(details['package']) | 1176 | args.append(details['package']) |
84 | @@ -1207,24 +1207,24 @@ def cmd_compare_bin(): | |||
85 | 1207 | 1207 | ||
86 | 1208 | # always use debian-installer in release pocket for non-devel releases | 1208 | # always use debian-installer in release pocket for non-devel releases |
87 | 1209 | installer_components = 'main/debian-installer' | 1209 | installer_components = 'main/debian-installer' |
89 | 1210 | if details['release'] == ust['release_devel'] or not use_installer: | 1210 | if details['series'] == ust['release_devel'] or not use_installer: |
90 | 1211 | installer_components = '' | 1211 | installer_components = '' |
91 | 1212 | s=''' | 1212 | s=''' |
92 | 1213 | deb [arch=%s] %s/ %s %s %s | 1213 | deb [arch=%s] %s/ %s %s %s |
93 | 1214 | deb-src %s/ %s %s | 1214 | deb-src %s/ %s %s |
96 | 1215 | ''' % (details['arch'], ust.get_sbuild_mirror(details['arch']), details['release'], components, installer_components, | 1215 | ''' % (details['arch'], ust.get_sbuild_mirror(details['arch']), details['series'], components, installer_components, |
97 | 1216 | ust.get_sbuild_srcmirror(details['arch']), details['release'], components) | 1216 | ust.get_sbuild_srcmirror(details['arch']), details['series'], components) |
98 | 1217 | 1217 | ||
100 | 1218 | if details['release'] != ust['release_devel']: | 1218 | if details['series'] != ust['release_devel']: |
101 | 1219 | s += ''' | 1219 | s += ''' |
102 | 1220 | deb [arch=%s] %s/ %s-updates %s %s | 1220 | deb [arch=%s] %s/ %s-updates %s %s |
103 | 1221 | deb-src %s/ %s-updates %s | 1221 | deb-src %s/ %s-updates %s |
104 | 1222 | deb [arch=%s] %s/ %s-security %s %s | 1222 | deb [arch=%s] %s/ %s-security %s %s |
105 | 1223 | deb-src %s/ %s-security %s | 1223 | deb-src %s/ %s-security %s |
110 | 1224 | ''' % (details['arch'], ust.get_sbuild_mirror(details['arch']), details['release'], components, installer_components, | 1224 | ''' % (details['arch'], ust.get_sbuild_mirror(details['arch']), details['series'], components, installer_components, |
111 | 1225 | ust.get_sbuild_srcmirror(details['arch']), details['release'], components, | 1225 | ust.get_sbuild_srcmirror(details['arch']), details['series'], components, |
112 | 1226 | details['arch'], ust.get_sbuild_mirror(details['arch']), details['release'], components, installer_components, | 1226 | details['arch'], ust.get_sbuild_mirror(details['arch']), details['series'], components, installer_components, |
113 | 1227 | ust.get_sbuild_srcmirror(details['arch']), details['release'], components) | 1227 | ust.get_sbuild_srcmirror(details['arch']), details['series'], components) |
114 | 1228 | 1228 | ||
115 | 1229 | # as of quantal, devel packages can be waiting in -proposed, so | 1229 | # as of quantal, devel packages can be waiting in -proposed, so |
116 | 1230 | # don't do this just for non-devel releases | 1230 | # don't do this just for non-devel releases |
117 | @@ -1232,15 +1232,15 @@ deb-src %s/ %s-security %s | |||
118 | 1232 | s += ''' | 1232 | s += ''' |
119 | 1233 | deb [arch=%s] %s/ %s-proposed %s %s | 1233 | deb [arch=%s] %s/ %s-proposed %s %s |
120 | 1234 | deb-src %s/ %s-proposed %s | 1234 | deb-src %s/ %s-proposed %s |
123 | 1235 | ''' % (details['arch'], ust.get_sbuild_mirror(details['arch']), details['release'], components, installer_components, | 1235 | ''' % (details['arch'], ust.get_sbuild_mirror(details['arch']), details['series'], components, installer_components, |
124 | 1236 | ust.get_sbuild_srcmirror(details['arch']), details['release'], components) | 1236 | ust.get_sbuild_srcmirror(details['arch']), details['series'], components) |
125 | 1237 | 1237 | ||
126 | 1238 | if 'test_repo' in details and details['test_repo']: | 1238 | if 'test_repo' in details and details['test_repo']: |
127 | 1239 | s += ''' | 1239 | s += ''' |
128 | 1240 | deb [arch=%s] %s/ %s/ | 1240 | deb [arch=%s] %s/ %s/ |
129 | 1241 | deb-src %s/ %s/ | 1241 | deb-src %s/ %s/ |
132 | 1242 | ''' % (details['arch'], ust['package_tools_repo_url'], details['release'], | 1242 | ''' % (details['arch'], ust['package_tools_repo_url'], details['series'], |
133 | 1243 | ust['package_tools_repo_url'], details['release']) | 1243 | ust['package_tools_repo_url'], details['series']) |
134 | 1244 | 1244 | ||
135 | 1245 | return s | 1245 | return s |
136 | 1246 | 1246 | ||
137 | @@ -1489,7 +1489,7 @@ Acquire::Languages "none"; | |||
138 | 1489 | details['arch'] = arch | 1489 | details['arch'] = arch |
139 | 1490 | 1490 | ||
140 | 1491 | if opt.release: | 1491 | if opt.release: |
142 | 1492 | details['release'] = opt.release | 1492 | details['series'] = opt.release |
143 | 1493 | 1493 | ||
144 | 1494 | if opt.proposed: | 1494 | if opt.proposed: |
145 | 1495 | details['proposed'] = True | 1495 | details['proposed'] = True |
146 | @@ -1572,7 +1572,7 @@ def copy_to_repo(opt, details, quiet=False, source_dest=source_dest, binary_dest | |||
147 | 1572 | if not quiet: | 1572 | if not quiet: |
148 | 1573 | print_details(details) | 1573 | print_details(details) |
149 | 1574 | 1574 | ||
151 | 1575 | repo_dest = os.path.join(repo_base, details['release']) | 1575 | repo_dest = os.path.join(repo_base, details['series']) |
152 | 1576 | 1576 | ||
153 | 1577 | if opt.purge and os.path.isdir(repo_dest): | 1577 | if opt.purge and os.path.isdir(repo_dest): |
154 | 1578 | print("Cleaning out '%s'" % (repo_dest)) | 1578 | print("Cleaning out '%s'" % (repo_dest)) |
155 | @@ -1620,7 +1620,7 @@ def copy_to_repo(opt, details, quiet=False, source_dest=source_dest, binary_dest | |||
156 | 1620 | print("Copying '%s'..." % (os.path.join(binary_dest, f))) | 1620 | print("Copying '%s'..." % (os.path.join(binary_dest, f))) |
157 | 1621 | shutil.copy(os.path.join(binary_dest, f), repo_dest) | 1621 | shutil.copy(os.path.join(binary_dest, f), repo_dest) |
158 | 1622 | 1622 | ||
160 | 1623 | (rc, report) = runcmd([update_repo, details['release']], stdin=sys.stdin, stdout=None) | 1623 | (rc, report) = runcmd([update_repo, details['series']], stdin=sys.stdin, stdout=None) |
161 | 1624 | if rc != 0: | 1624 | if rc != 0: |
162 | 1625 | err("failure running '%s':\n%s" % (update_repo, report)) | 1625 | err("failure running '%s':\n%s" % (update_repo, report)) |
163 | 1626 | sys.exit(1) | 1626 | sys.exit(1) |
164 | @@ -1672,7 +1672,7 @@ def cmd_upload(): | |||
165 | 1672 | 1672 | ||
166 | 1673 | # adjust destination if debian | 1673 | # adjust destination if debian |
167 | 1674 | init_dest = opt.destination | 1674 | init_dest = opt.destination |
169 | 1675 | if details['release'] == "unstable": # XXX: add other releases | 1675 | if details['series'] == "unstable": # XXX: add other releases |
170 | 1676 | init_dest = "debian" | 1676 | init_dest = "debian" |
171 | 1677 | 1677 | ||
172 | 1678 | details = parse_changes_file(changes_file) | 1678 | details = parse_changes_file(changes_file) |
173 | @@ -1971,7 +1971,7 @@ def cmd_adt(): | |||
174 | 1971 | } | 1971 | } |
175 | 1972 | 1972 | ||
176 | 1973 | details = parse_package_details(skip_sanity = True) | 1973 | details = parse_package_details(skip_sanity = True) |
178 | 1974 | release = details['release'] | 1974 | release = details['series'] |
179 | 1975 | 1975 | ||
180 | 1976 | valid_releases = [] | 1976 | valid_releases = [] |
181 | 1977 | for rel in source_map.cve_lib.releases: | 1977 | for rel in source_map.cve_lib.releases: |
182 | @@ -2647,7 +2647,7 @@ def run_qrt_tests(opt, args, details): | |||
183 | 2647 | # installed (--only-upgrade) and mark them as auto installed | 2647 | # installed (--only-upgrade) and mark them as auto installed |
184 | 2648 | # (--mark-auto) | 2648 | # (--mark-auto) |
185 | 2649 | apt_args += "--only-upgrade " | 2649 | apt_args += "--only-upgrade " |
187 | 2650 | release_num = BetterUbuntuDistroInfo().get_release(details['release']) | 2650 | release_num = BetterUbuntuDistroInfo().get_release(details['series']) |
188 | 2651 | if release_num: | 2651 | if release_num: |
189 | 2652 | if release_num > "20.04": | 2652 | if release_num > "20.04": |
190 | 2653 | apt_args += "--mark-auto " | 2653 | apt_args += "--mark-auto " |
191 | @@ -3418,7 +3418,7 @@ def prepare_tool_env(opt, details): | |||
192 | 3418 | os.environ['DEB_BUILD_HARDENING'] = '1' | 3418 | os.environ['DEB_BUILD_HARDENING'] = '1' |
193 | 3419 | 3419 | ||
194 | 3420 | # Parallel builds only started with karmic and later | 3420 | # Parallel builds only started with karmic and later |
196 | 3421 | if opt.parallel and details['release'] not in ['dapper','jaunty']: | 3421 | if opt.parallel and details['series'] not in ['dapper','jaunty']: |
197 | 3422 | _append_deb_build_options('parallel=%s' % (opt.parallel), "parallel=") | 3422 | _append_deb_build_options('parallel=%s' % (opt.parallel), "parallel=") |
198 | 3423 | except: | 3423 | except: |
199 | 3424 | pass | 3424 | pass |
200 | @@ -3698,7 +3698,7 @@ do | |||
201 | 3698 | rm -f "$SRCS" | 3698 | rm -f "$SRCS" |
202 | 3699 | fi | 3699 | fi |
203 | 3700 | done | 3700 | done |
205 | 3701 | ''' % (dropped_pockets, details['release']) | 3701 | ''' % (dropped_pockets, details['series']) |
206 | 3702 | 3702 | ||
207 | 3703 | # add the updates pocket if building a proposed package if it isn't already | 3703 | # add the updates pocket if building a proposed package if it isn't already |
208 | 3704 | # in the sources.list | 3704 | # in the sources.list |
209 | @@ -3712,7 +3712,7 @@ if ! grep -q '^[^#].*\-updates' /etc/apt/sources.list ; then | |||
210 | 3712 | mv -f "$SRCS" /etc/apt/sources.list | 3712 | mv -f "$SRCS" /etc/apt/sources.list |
211 | 3713 | need_update=1 | 3713 | need_update=1 |
212 | 3714 | fi | 3714 | fi |
214 | 3715 | ''' % (details['release'], details['release'], details['release']) | 3715 | ''' % (details['series'], details['series'], details['series']) |
215 | 3716 | 3716 | ||
216 | 3717 | # add the proposed pocket if told to do so | 3717 | # add the proposed pocket if told to do so |
217 | 3718 | if force_proposed == True: | 3718 | if force_proposed == True: |
218 | @@ -3725,7 +3725,7 @@ if ! grep -q '^[^#].*\-proposed' /etc/apt/sources.list ; then | |||
219 | 3725 | mv -f "$SRCS" /etc/apt/sources.list | 3725 | mv -f "$SRCS" /etc/apt/sources.list |
220 | 3726 | need_update=1 | 3726 | need_update=1 |
221 | 3727 | fi | 3727 | fi |
223 | 3728 | ''' % (details['release'], details['release'], details['release']) | 3728 | ''' % (details['series'], details['series'], details['series']) |
224 | 3729 | 3729 | ||
225 | 3730 | # Add local repo if needed | 3730 | # Add local repo if needed |
226 | 3731 | if details['additional-repo']: | 3731 | if details['additional-repo']: |
227 | @@ -3737,12 +3737,12 @@ echo "deb %s %s/" >> "$SRCS" | |||
228 | 3737 | mv -f "$SRCS" /etc/apt/sources.list | 3737 | mv -f "$SRCS" /etc/apt/sources.list |
229 | 3738 | need_update=1 | 3738 | need_update=1 |
230 | 3739 | ''' % (details['additional-repo'], | 3739 | ''' % (details['additional-repo'], |
232 | 3740 | details['additional-repo'], details['release']) | 3740 | details['additional-repo'], details['series']) |
233 | 3741 | 3741 | ||
234 | 3742 | # Update components. Xenial and higher now requires universe to build | 3742 | # Update components. Xenial and higher now requires universe to build |
235 | 3743 | # main packages. release_num can be None if release is unknown, like | 3743 | # main packages. release_num can be None if release is unknown, like |
236 | 3744 | # when distro_info hasn't been updated yet for a new dev release | 3744 | # when distro_info hasn't been updated yet for a new dev release |
238 | 3745 | release_num = BetterUbuntuDistroInfo().get_release(details['release']) | 3745 | release_num = BetterUbuntuDistroInfo().get_release(details['series']) |
239 | 3746 | if release_num and release_num < "16.04": | 3746 | if release_num and release_num < "16.04": |
240 | 3747 | allowed_comps = { 'main' : ':main:', | 3747 | allowed_comps = { 'main' : ':main:', |
241 | 3748 | 'restricted' : ':main:restricted:', | 3748 | 'restricted' : ':main:restricted:', |
242 | @@ -3790,7 +3790,7 @@ fi | |||
243 | 3790 | ''' % (allowed_comps[details['component']], details['component']) | 3790 | ''' % (allowed_comps[details['component']], details['component']) |
244 | 3791 | 3791 | ||
245 | 3792 | # Hack to work around lucid dbus trying to start in the chroot | 3792 | # Hack to work around lucid dbus trying to start in the chroot |
247 | 3793 | if details['release'] == "lucid": | 3793 | if details['series'] == "lucid": |
248 | 3794 | build_script = build_script + ''' | 3794 | build_script = build_script + ''' |
249 | 3795 | dpkg-divert --divert /etc/init/dbus.conf.disabled --rename /etc/init/dbus.conf | 3795 | dpkg-divert --divert /etc/init/dbus.conf.disabled --rename /etc/init/dbus.conf |
250 | 3796 | ''' | 3796 | ''' |
251 | @@ -4054,14 +4054,14 @@ def parse_package_details(release = None, skip_sanity = False, force_component = | |||
252 | 4054 | details.setdefault('release', details['changelog_release']) | 4054 | details.setdefault('release', details['changelog_release']) |
253 | 4055 | 4055 | ||
254 | 4056 | # Find base release | 4056 | # Find base release |
259 | 4057 | base_release = details["release"] | 4057 | series = details["release"] |
260 | 4058 | if 'esm' in base_release: | 4058 | if 'esm' in series: |
261 | 4059 | if 'trusty' in base_release: | 4059 | if 'trusty' in series: |
262 | 4060 | base_release = 'trusty' | 4060 | series = 'trusty' |
263 | 4061 | else: | 4061 | else: |
265 | 4062 | base_release = base_release.split('/')[1] | 4062 | series = series.split('/')[1] |
266 | 4063 | 4063 | ||
268 | 4064 | details['base_release'] = base_release | 4064 | details['series'] = series |
269 | 4065 | 4065 | ||
270 | 4066 | # Find previous version | 4066 | # Find previous version |
271 | 4067 | previous_version = '' | 4067 | previous_version = '' |
272 | @@ -4091,11 +4091,11 @@ def parse_package_details(release = None, skip_sanity = False, force_component = | |||
273 | 4091 | # Perform sanity checking | 4091 | # Perform sanity checking |
274 | 4092 | if not skip_sanity: | 4092 | if not skip_sanity: |
275 | 4093 | # Sanity check release | 4093 | # Sanity check release |
278 | 4094 | if details['changelog_release'] != details['base_release']: | 4094 | if details['changelog_release'] != details['series']: |
279 | 4095 | err("oops! changelog release (%s) != '%s'" % (details['changelog_release'], details['base_release'])) | 4095 | err("oops! changelog release (%s) != '%s'" % (details['changelog_release'], details['series'])) |
280 | 4096 | sys.exit(1) | 4096 | sys.exit(1) |
281 | 4097 | # Sanity check pocket | 4097 | # Sanity check pocket |
283 | 4098 | if (details['release'] != ust['release_devel']) and (details['release'] != 'unstable') and \ | 4098 | if (details['series'] != ust['release_devel']) and (details['series'] != 'unstable') and \ |
284 | 4099 | (details['pocket'] != 'security') and \ | 4099 | (details['pocket'] != 'security') and \ |
285 | 4100 | (details['pocket'] != 'backports') and \ | 4100 | (details['pocket'] != 'backports') and \ |
286 | 4101 | (details['pocket'] != 'proposed'): | 4101 | (details['pocket'] != 'proposed'): |
For the reviewer: link to the MP that started it all https:/ /code.launchpad .net/~sespiros/ ubuntu- security- tools/+ git/ubuntu- security- tools/+ merge/424782