diff options
| author | Michael Vogt <mvo@debian.org> | 2008-11-07 21:41:25 +0100 |
|---|---|---|
| committer | Michael Vogt <mvo@debian.org> | 2008-11-07 21:41:25 +0100 |
| commit | 11d67acf4e84bc9d3a798377c61be4235114d39f (patch) | |
| tree | e9c5ac1fdf2c8e89ffef7e68236bf5afb1dab3e6 | |
| parent | 44d1746f2dd6c055f340f9368d6411a9b6170150 (diff) | |
| parent | 4922f32e6ee40511775067241bda6d2dde539c1f (diff) | |
| download | python-apt-11d67acf4e84bc9d3a798377c61be4235114d39f.tar.gz | |
* Non-maintainer upload.
* data/templates/Debian.info.in: Set the BaseURI to security.debian.org for
lenny/updates, etch/updates and sarge/updates. (Closes: #503237)
* data/templates/Debian.info.in:
- add 'lenny' template info (closes: #476364)
* aptsources/distinfo.py:
- fix template matching for arch specific code (LP: #244093)
| -rw-r--r-- | aptsources/distinfo.py | 45 | ||||
| -rw-r--r-- | data/templates/Debian.info.in | 29 | ||||
| -rw-r--r-- | debian/changelog | 17 |
3 files changed, 75 insertions, 16 deletions
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index 9b438701..b962def6 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -40,6 +40,7 @@ class Template: def __init__(self): self.name = None self.child = False + self.parents = [] # ref to parent template(s) self.match_name = None self.description = None self.base_uri = None @@ -163,11 +164,8 @@ class DistInfo: elif field == 'MetaReleaseURI': self.metarelease_uri = value elif field == 'Suite': - if template: - if component and not template.has_component(component.name): - template.components.append(component) - component = None - self.templates.append(template) + self.finish_template(template, component) + component=None template = Template() template.name = value template.distribution = dist @@ -177,13 +175,10 @@ class DistInfo: elif field == 'ParentSuite': template.child = True for nanny in self.templates: + # look for parent and add back ref to it if nanny.name == value: + template.parents.append(nanny) nanny.children.append(template) - # reuse some properties of the parent template - if template.match_uri == None: - template.match_uri = nanny.match_uri - if template.mirror_set == {}: - template.mirror_set = nanny.mirror_set elif field == 'Available': template.available = value elif field == 'RepositoryType': @@ -227,12 +222,30 @@ class DistInfo: component.set_description(_(value)) elif field == 'CompDescriptionLong': component.set_description_long(_(value)) - if template: - if component: - template.components.append(component) - component = None - self.templates.append(template) - template = None + self.finish_template(template, component) + template=None + component=None + + def finish_template(self, template, component): + " finish the current tempalte " + if not template: + return + # reuse some properties of the parent template + if template.match_uri == None and template.child: + for t in template.parents: + if t.match_uri: + template.match_uri = t.match_uri + break + if template.mirror_set == {} and template.child: + for t in template.parents: + if t.match_uri: + template.mirror_set = t.mirror_set + break + if component and not template.has_component(component.name): + template.components.append(component) + component = None + self.templates.append(template) + if __name__ == "__main__": d = DistInfo ("Ubuntu", "/usr/share/python-apt/templates") diff --git a/data/templates/Debian.info.in b/data/templates/Debian.info.in index b635de19..dd040c20 100644 --- a/data/templates/Debian.info.in +++ b/data/templates/Debian.info.in @@ -1,5 +1,30 @@ _ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog +Suite: lenny +RepositoryType: deb +BaseURI: http://http.us.debian.org/debian/ +MatchURI: ftp[0-9]*\.[a-z]\.debian\.org +MirrorsFile: /usr/share/python-apt/templates/Debian.mirrors +_Description: Debian 5.0 'Lenny' +Component: main +_CompDescription: Officially supported +Component: contrib +_CompDescription: DFSG-compatible Software with Non-Free Dependencies +Component: non-free +_CompDescription: Non-DFSG-compatible Software + +Suite: lenny-proposed-updates +RepositoryType: deb +ParentSuite: lenny +_Description: Proposed updates + +Suite: lenny/updates +RepositoryType: deb +BaseURI: http://security.debian.org/ +MatchURI: security\.debian\.org +ParentSuite: lenny +_Description: Security updates + Suite: etch RepositoryType: deb BaseURI: http://http.us.debian.org/debian/ @@ -20,6 +45,8 @@ _Description: Proposed updates Suite: etch/updates RepositoryType: deb +BaseURI: http://security.debian.org/ +MatchURI: security\.debian\.org ParentSuite: etch _Description: Security updates @@ -43,6 +70,8 @@ _Description: Proposed updates Suite: sarge/updates RepositoryType: deb +BaseURI: http://security.debian.org/ +MatchURI: security\.debian\.org ParentSuite: sarge _Description: Security updates diff --git a/debian/changelog b/debian/changelog index a3792386..6dd5e4e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +python-apt (0.7.7.1+nmu1) unstable; urgency=medium + + * Non-maintainer upload. + * data/templates/Debian.info.in: Set the BaseURI to security.debian.org for + lenny/updates, etch/updates and sarge/updates. (Closes: #503237) + + -- Jonny Lamb <jonny@debian.org> Fri, 24 Oct 2008 12:44:33 +0100 + +python-apt (0.7.7.1) unstable; urgency=low + + * data/templates/Debian.info.in: + - add 'lenny' template info (closes: #476364) + * aptsources/distinfo.py: + - fix template matching for arch specific code (LP: #244093) + + -- Michael Vogt <mvo@debian.org> Fri, 25 Jul 2008 18:13:53 +0200 + python-apt (0.7.7) unstable; urgency=low [ Emanuele Rocca ] |
