mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-04-11 03:01:09 +00:00
britney: Skip architectures not listed in Release files
As a side effect, remove mips64el from NEW_ARCHES as we no longer need that as a work around. Closes: Debian/britney2#12 Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
9bc94db01c
commit
c86e1f7e9c
@ -37,7 +37,7 @@ OUTOFSYNC_ARCHES =
|
||||
BREAK_ARCHES =
|
||||
|
||||
# if you're in this list, you are a new architecture
|
||||
NEW_ARCHES = mips64el
|
||||
NEW_ARCHES =
|
||||
|
||||
# priorities and delays
|
||||
MINDAYS_LOW = 10
|
||||
|
16
britney.py
16
britney.py
@ -207,7 +207,7 @@ from britney2.utils import (old_libraries_format, undo_changes,
|
||||
write_excuses, write_heidi_delta, write_controlfiles,
|
||||
old_libraries, is_nuninst_asgood_generous,
|
||||
clone_nuninst, check_installability,
|
||||
create_provides_map,
|
||||
create_provides_map, read_release_file,
|
||||
)
|
||||
|
||||
__author__ = 'Fabio Tranchitella and the Debian Release Team'
|
||||
@ -999,21 +999,21 @@ class Britney(object):
|
||||
arch2packages = {}
|
||||
|
||||
if self.options.components:
|
||||
release_file = read_release_file(basedir)
|
||||
listed_archs = set(release_file['Architectures'].split())
|
||||
for arch in architectures:
|
||||
packages = {}
|
||||
if arch not in listed_archs:
|
||||
self.log("Skipping arch %s for %s: It is not listed in the Release file" % (arch, distribution))
|
||||
arch2packages[arch] = ({}, {})
|
||||
continue
|
||||
for component in self.options.components:
|
||||
binary_dir = "binary-%s" % arch
|
||||
filename = os.path.join(basedir,
|
||||
component,
|
||||
binary_dir,
|
||||
'Packages')
|
||||
try:
|
||||
filename = possibly_compressed(filename)
|
||||
except FileNotFoundError:
|
||||
if arch not in self.options.new_arches:
|
||||
raise
|
||||
self.log("Ignoring missing file for new arch %s: %s" % (arch, filename))
|
||||
continue
|
||||
filename = possibly_compressed(filename)
|
||||
udeb_filename = os.path.join(basedir,
|
||||
component,
|
||||
"debian-installer",
|
||||
|
@ -21,6 +21,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
|
||||
import apt_pkg
|
||||
import errno
|
||||
import os
|
||||
import time
|
||||
@ -670,3 +671,18 @@ def create_provides_map(packages):
|
||||
provides[provided_pkg].add((pkg, provided_version))
|
||||
|
||||
return provides
|
||||
|
||||
|
||||
def read_release_file(suite_dir):
|
||||
"""Parses a given "Release" file
|
||||
|
||||
:param suite_dir: The directory to the suite
|
||||
:return: A dict of the first (and only) paragraph in an Release file
|
||||
"""
|
||||
release_file = os.path.join(suite_dir, 'Release')
|
||||
with open(release_file) as fd:
|
||||
tag_file = iter(apt_pkg.TagFile(fd))
|
||||
result = next(tag_file)
|
||||
if next(tag_file, None) is not None:
|
||||
raise TypeError("%s has more than one paragraph" % release_file)
|
||||
return result
|
||||
|
@ -37,7 +37,7 @@ OUTOFSYNC_ARCHES =
|
||||
BREAK_ARCHES =
|
||||
|
||||
# if you're in this list, you are a new architecture
|
||||
NEW_ARCHES = mips64el
|
||||
NEW_ARCHES =
|
||||
|
||||
# priorities and delays
|
||||
MINDAYS_LOW = 10
|
||||
|
Loading…
x
Reference in New Issue
Block a user