diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-09-13 11:10:40 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-09-13 11:10:40 +0200 |
| commit | 41a9f7533f9ac3824a710a7ac3cf1e01d9159e7e (patch) | |
| tree | db16f69b19448f6e93e0cf9952af2c6744c9575a | |
| parent | a8e7d5e6931e56fbe67f5dd33c5da0705468fe0b (diff) | |
| parent | 34274f571119f0a2a3fd2fec0074aa682657b241 (diff) | |
| download | python-apt-41a9f7533f9ac3824a710a7ac3cf1e01d9159e7e.tar.gz | |
merged from lp:~mvo/python-apt/mvo
| -rw-r--r-- | apt/debfile.py | 1 | ||||
| -rw-r--r-- | aptsources/distinfo.py | 8 | ||||
| -rw-r--r-- | aptsources/distro.py | 1 | ||||
| -rw-r--r-- | data/templates/Ubuntu.info.in | 19 | ||||
| -rw-r--r-- | debian/changelog | 12 | ||||
| -rw-r--r-- | python/configuration.cc | 2 | ||||
| -rw-r--r-- | python/tag.cc | 6 |
7 files changed, 45 insertions, 4 deletions
diff --git a/apt/debfile.py b/apt/debfile.py index 7728ed21..25a45e98 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -65,7 +65,6 @@ class DebPackage(object): self.filename = filename self._debfile = apt_inst.DebFile(open(self.filename)) control = self._debfile.control.extractdata("control") - # hm, 'replace' is probably better but python2.6 test fail with that self._sections = apt_pkg.TagSection(control) self.pkgname = self._sections["Package"] 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..e7aa553a 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 Partners +Component: partner +_CompDescription: Software packaged by Canonical for their partners +_CompDescriptionLong: This software is not part of Ubuntu. + +Suite: maverick +Official: false +RepositoryType: deb +BaseURI: http://extras.ubuntu.com +_Description: Independent +Component: main +_CompDescription: Provided by third-party software developers +_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 4eb436ff..d10d5534 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +python-apt (0.7.96.1ubuntu10) UNRELEASED; urgency=low + + * 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) + * python/tag.cc: + - accept "byte" type as well in TacSecNew (for py3) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 13 Sep 2010 11:09:27 +0200 + python-apt (0.7.96.1ubuntu9) maverick; urgency=low [ Kiwinote ] diff --git a/python/configuration.cc b/python/configuration.cc index 848b664a..93e92efa 100644 --- a/python/configuration.cc +++ b/python/configuration.cc @@ -157,7 +157,7 @@ static PyObject *CnfClear(PyObject *Self,PyObject *Args) // The amazing narrowing search ability! static const char *doc_SubTree = - "sub_tree(key: str) -> apt_pkg.Configuration\n\n" + "subtree(key: str) -> apt_pkg.Configuration\n\n" "Return a new apt_pkg.Configuration object with the given option\n" "as its root. Example:\n\n" diff --git a/python/tag.cc b/python/tag.cc index 97039bc4..44cd06af 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -344,8 +344,12 @@ static PyObject *TagFileJump(PyObject *Self,PyObject *Args) // --------------------------------------------------------------------- static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) { char *Data; + int Len; char *kwlist[] = {"text", 0}; - if (PyArg_ParseTupleAndKeywords(Args,kwds,"s",kwlist,&Data) == 0) + + // this allows reading "byte" types from python3 - but we don't + // make (much) use of it yet + if (PyArg_ParseTupleAndKeywords(Args,kwds,"s#",kwlist,&Data,&Len) == 0) return 0; // Create the object.. |
