diff options
| author | Bastian Blank <waldi@debian.org> | 2008-12-28 16:55:48 +0000 |
|---|---|---|
| committer | Bastian Blank <waldi@debian.org> | 2008-12-28 16:55:48 +0000 |
| commit | a94d55bc0dcdabb554929f63a9561826ae7251b4 (patch) | |
| tree | c96dc00af95487030fbcf1fc873b26bb8043172a /debian/lib/python | |
| parent | 281252eee4b77de23c1bdb28ff26f653cd98615e (diff) | |
| download | kernel_replicant_linux-a94d55bc0dcdabb554929f63a9561826ae7251b4.tar.gz kernel_replicant_linux-a94d55bc0dcdabb554929f63a9561826ae7251b4.tar.bz2 kernel_replicant_linux-a94d55bc0dcdabb554929f63a9561826ae7251b4.zip | |
Merge /dists/sid/linux-2.6.
svn path=/dists/trunk/linux-2.6/; revision=12535
Diffstat (limited to 'debian/lib/python')
| -rw-r--r-- | debian/lib/python/debian_linux/config.py | 33 | ||||
| -rw-r--r-- | debian/lib/python/debian_linux/patches.py | 2 |
2 files changed, 34 insertions, 1 deletions
diff --git a/debian/lib/python/debian_linux/config.py b/debian/lib/python/debian_linux/config.py index 6858ee85cae7..899915c2e5e5 100644 --- a/debian/lib/python/debian_linux/config.py +++ b/debian/lib/python/debian_linux/config.py @@ -26,6 +26,35 @@ class SchemaItemList(object): return [j.strip() for j in re.split(self.type, i)] class ConfigCore(dict): + def get_merge(self, section, arch, featureset, flavour, key, default=None): + temp = [] + + if arch and featureset and flavour: + temp.append(self.get((section, arch, featureset, flavour), {}).get(key)) + temp.append(self.get((section, arch, None, flavour), {}).get(key)) + if arch and featureset: + temp.append(self.get((section, arch, featureset), {}).get(key)) + if arch: + temp.append(self.get((section, arch), {}).get(key)) + if featureset: + temp.append(self.get((section, None, featureset), {}).get(key)) + temp.append(self.get((section,), {}).get(key)) + + ret = [] + + for i in temp: + if i is None: + continue + elif isinstance(i, (list, tuple)): + ret.extend(i) + elif ret: + # TODO + return ret + else: + return i + + return ret or default + def merge(self, section, arch = None, featureset = None, flavour = None): ret = {} ret.update(self.get((section,), {})) @@ -73,6 +102,9 @@ class ConfigCoreHierarchy(ConfigCore): config_name = "defines" schemas = { + 'abi': { + 'ignore-changes': SchemaItemList(), + }, 'base': { 'arches': SchemaItemList(), 'enabled': SchemaItemBoolean(), @@ -90,6 +122,7 @@ class ConfigCoreHierarchy(ConfigCore): }, 'xen': { 'dom0-support': SchemaItemBoolean(), + 'flavours': SchemaItemList(), 'versions': SchemaItemList(), } } diff --git a/debian/lib/python/debian_linux/patches.py b/debian/lib/python/debian_linux/patches.py index 31a360a7ef12..e20716bdb84a 100644 --- a/debian/lib/python/debian_linux/patches.py +++ b/debian/lib/python/debian_linux/patches.py @@ -183,7 +183,7 @@ class PatchSeriesList(list): l = self else: l = self[::-1] - for i in self: + for i in l: if reverse: print "--> Try to unapply %s." % i.name else: |
