summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-09-13 10:41:41 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-09-13 10:41:41 +0200
commit0a77702288c82b8b212f1b140a48a7fb22cfca9c (patch)
tree0528539192ca792d149dd4511c370741819a30cb
parent26d9cf8509128791461ca1a8c9b7ef1c28635290 (diff)
downloadpython-apt-0a77702288c82b8b212f1b140a48a7fb22cfca9c.tar.gz
* data/templates/Ubuntu.info.in:
- add extras.ubuntu.com and archvie.canonical.com to the templates * aptsources/distinfo.py, aptsources/distro.py: - support non-official templates (like extras.ubuntu.com)
-rw-r--r--aptsources/distinfo.py8
-rw-r--r--aptsources/distro.py1
-rw-r--r--data/templates/Ubuntu.info.in19
-rw-r--r--debian/changelog5
4 files changed, 32 insertions, 1 deletions
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py
index 19308348..6374f185 100644
--- a/aptsources/distinfo.py
+++ b/aptsources/distinfo.py
@@ -52,6 +52,7 @@ class Template(object):
self.mirror_set = {}
self.distribution = None
self.available = True
+ self.official = True
def has_component(self, comp):
''' Check if the distribution provides the given component '''
@@ -207,7 +208,9 @@ class DistInfo(object):
template.parents.append(nanny)
nanny.children.append(template)
elif field == 'Available':
- template.available = value
+ template.available = apt_pkg.string_to_bool(value)
+ elif field == 'Official':
+ template.official = apt_pkg.string_to_bool(value)
elif field == 'RepositoryType':
template.type = value
elif field == 'BaseURI' and not template.base_uri:
@@ -275,6 +278,9 @@ class DistInfo(object):
if component and not template.has_component(component.name):
template.components.append(component)
component = None
+ # the official attribute is inherited
+ for t in template.parents:
+ template.official = t.official
self.templates.append(template)
diff --git a/aptsources/distro.py b/aptsources/distro.py
index e51fbe9f..23192f50 100644
--- a/aptsources/distro.py
+++ b/aptsources/distro.py
@@ -100,6 +100,7 @@ class Distribution(object):
if (source.invalid == False and
self.is_codename(source.dist) and
source.template and
+ source.template.official == True and
self.is_codename(source.template.name)):
#print "yeah! found a distro repo: %s" % source.line
# cdroms need do be handled differently
diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in
index 74095516..de883c05 100644
--- a/data/templates/Ubuntu.info.in
+++ b/data/templates/Ubuntu.info.in
@@ -35,6 +35,24 @@ _CompDescription: Officially supported
Component: restricted
_CompDescription: Restricted copyright
+Suite: maverick
+Official: false
+RepositoryType: deb
+BaseURI: http://archive.canonical.com
+_Description: Canonical Partner Repository
+Component: partner
+_CompDescription: Partner offered software
+_CompDescriptionLong: This software is not part of Ubuntu but offered by partners
+
+Suite: maverick
+Official: false
+RepositoryType: deb
+BaseURI: http://extras.ubuntu.com
+_Description: Independent Repository
+Component: main
+_CompDescription: Third Party Software
+_CompDescriptionLong: Software offered by third party developers
+
Suite: maverick-security
ParentSuite: maverick
RepositoryType: deb
@@ -756,3 +774,4 @@ Suite: warty-backports
ParentSuite: warty
RepositoryType: deb
_Description: Ubuntu 4.10 Backports
+
diff --git a/debian/changelog b/debian/changelog
index bcab48a8..024a74b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,11 @@ python-apt (0.7.97.2) UNRELEASED; urgency=low
[ Michael Vogt ]
* apt/debfile.py:
- add missing init for _installed_conflicts (LP: #618597)
+ * data/templates/Ubuntu.info.in:
+ - add extras.ubuntu.com and archvie.canonical.com to the
+ templates
+ * aptsources/distinfo.py, aptsources/distro.py:
+ - support non-official templates (like extras.ubuntu.com)
-- Michael Vogt <mvo@debian.org> Fri, 27 Aug 2010 11:22:23 +0200