summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-01-12 03:03:52 +0100
committerSebastian Pipping <sebastian@pipping.org>2010-01-12 03:03:58 +0100
commit553ea1d895e3b9b74f9b6232bf0ca99fe9adc77b (patch)
tree2ee068e226726bdf4d656c85822c7ab936af5de1
parentb513cf5ddd0eae89a6ba7454a033586efb18e94e (diff)
downloadlayman-553ea1d895e3b9b74f9b6232bf0ca99fe9adc77b.tar.gz
layman-553ea1d895e3b9b74f9b6232bf0ca99fe9adc77b.tar.bz2
layman-553ea1d895e3b9b74f9b6232bf0ca99fe9adc77b.zip
Drop support for broken tar overlays
-rw-r--r--CHANGES3
-rw-r--r--layman/overlays/tar.py23
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)