From 553ea1d895e3b9b74f9b6232bf0ca99fe9adc77b Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 12 Jan 2010 03:03:52 +0100 Subject: Drop support for broken tar overlays --- CHANGES | 3 +++ layman/overlays/tar.py | 23 ++--------------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/CHANGES b/CHANGES index 823b964..310a126 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,9 @@ Version TODO - Migrate to GNU tar's compression format auto-detection (Requires GNU tar 1.15 or later, released in 2005) + - Drop support for broken tar overlays with missing category level + (and missing profiles/repo_name as a consequence) + Version 1.2.5 - Released 2010/01/04 =================================== diff --git a/layman/overlays/tar.py b/layman/overlays/tar.py index 786f799..6a16604 100644 --- a/layman/overlays/tar.py +++ b/layman/overlays/tar.py @@ -77,21 +77,9 @@ class TarOverlay(Overlay): else: self.subpath = '' - _category = xml.find('category') - if _category != None: - self.category = ensure_unicode(_category.text.strip()) - elif 'category' in xml.attrib: - self.category = ensure_unicode(xml.attrib['category']) - else: - self.category = '' - - if self.subpath and self.category: - raise Exception('Cannot use "category" and "subpath" at the same time!') - def __eq__(self, other): res = super(TarOverlay, self).__eq__(other) \ - and self.subpath == other.subpath \ - and self.category == other.category + and self.subpath == other.subpath return res def __ne__(self, other): @@ -104,10 +92,6 @@ class TarOverlay(Overlay): _subpath = ET.Element('subpath') _subpath.text = self.subpath repo.append(_subpath) - if self.category: - _category = ET.Element('category') - _category.text = self.category - repo.append(_category) return repo def add(self, base, quiet = False): @@ -152,10 +136,7 @@ class TarOverlay(Overlay): if self.subpath: target = path([base, 'tmp']) else: - if self.category: - target = mdir + '/' + self.category - else: - target = mdir + target = mdir os.makedirs(target) -- cgit v1.2.3-1-g7c22