summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-05 12:59:05 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-05 12:59:05 +0200
commitbfa4d690e7262c19b2f0bfc3905177c37f42cf34 (patch)
treeda821a5125b45d290a0b7418018815d4b9297765
parent06f78ffeceb248bfb5d7c34521f5dc5f78ccebfe (diff)
downloadpython-apt-bfa4d690e7262c19b2f0bfc3905177c37f42cf34.tar.gz
* apt/debfile.py:
- fix crash in DscFile handling and add regression test
-rw-r--r--apt/debfile.py1
-rw-r--r--debian/changelog2
-rw-r--r--po/python-apt.pot43
-rw-r--r--tests/data/test_debs/hello_2.5-1.dsc32
-rw-r--r--tests/test_debfile.py6
5 files changed, 62 insertions, 22 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index ac550d8c..e2275f84 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -51,6 +51,7 @@ class DebPackage(object):
self._debfile = None
self.pkgname = ""
self._sections = {}
+ self._need_pkgs = []
if filename:
self.open(filename)
diff --git a/debian/changelog b/debian/changelog
index 0e12c5c3..8e5b4565 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ python-apt (0.7.96.1) UNRELEASED; urgency=low
(closes: #588796)
* python/configuration.cc:
- add binding for the "dump()" method to configruation objects
+ * apt/debfile.py:
+ - fix crash in DscFile handling and add regression test
-- Michael Vogt <mvo@debian.org> Mon, 12 Jul 2010 14:14:51 +0200
diff --git a/po/python-apt.pot b/po/python-apt.pot
index 0d683700..0fc2c959 100644
--- a/po/python-apt.pot
+++ b/po/python-apt.pot
@@ -8,11 +8,10 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-12 09:45+0200\n"
+"POT-Creation-Date: 2010-08-05 12:54+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -414,87 +413,87 @@ msgid ""
"Please check your Internet connection."
msgstr ""
-#: ../apt/debfile.py:79
+#: ../apt/debfile.py:81
#, python-format
msgid "List of files for '%s' could not be read"
msgstr ""
-#: ../apt/debfile.py:164
+#: ../apt/debfile.py:166
#, python-format
msgid "Dependency is not satisfiable: %s\n"
msgstr ""
-#: ../apt/debfile.py:185
+#: ../apt/debfile.py:187
#, python-format
msgid "Conflicts with the installed package '%s'"
msgstr ""
#. TRANSLATORS: the first '%s' is the package that breaks, the second the dependency that makes it break, the third the relation (e.g. >=) and the latest the version for the releation
-#: ../apt/debfile.py:323
+#: ../apt/debfile.py:326
#, python-format
msgid ""
-"Breaks existing package '%(pkgname)s' dependency %(depname)s "
-"(%(deprelation)s %(depversion)s)"
+"Breaks existing package '%(pkgname)s' dependency %(depname)s (%(deprelation)"
+"s %(depversion)s)"
msgstr ""
#. TRANSLATORS: the first '%s' is the package that conflicts, the second the packagename that it conflicts with (so the name of the deb the user tries to install), the third is the relation (e.g. >=) and the last is the version for the relation
-#: ../apt/debfile.py:339
+#: ../apt/debfile.py:342
#, python-format
msgid ""
-"Breaks existing package '%(pkgname)s' conflict: %(targetpkg)s (%(comptype)s "
-"%(targetver)s)"
+"Breaks existing package '%(pkgname)s' conflict: %(targetpkg)s (%(comptype)s %"
+"(targetver)s)"
msgstr ""
-#: ../apt/debfile.py:348
+#: ../apt/debfile.py:351
#, python-format
msgid ""
"Breaks existing package '%(pkgname)s' that conflict: '%(targetpkg)s'. But "
"the '%(debfile)s' provides it via: '%(provides)s'"
msgstr ""
-#: ../apt/debfile.py:394
+#: ../apt/debfile.py:397
msgid "No Architecture field in the package"
msgstr ""
-#: ../apt/debfile.py:399
+#: ../apt/debfile.py:402
#, python-format
msgid "Wrong architecture '%s'"
msgstr ""
#. the deb is older than the installed
-#: ../apt/debfile.py:406
+#: ../apt/debfile.py:409
msgid "A later version is already installed"
msgstr ""
-#: ../apt/debfile.py:431
+#: ../apt/debfile.py:434
msgid "Failed to satisfy all dependencies (broken cache)"
msgstr ""
-#: ../apt/debfile.py:461
+#: ../apt/debfile.py:464
#, python-format
msgid "Cannot install '%s'"
msgstr ""
-#: ../apt/debfile.py:503 ../apt/debfile.py:551 ../apt/debfile.py:562
+#: ../apt/debfile.py:506 ../apt/debfile.py:554 ../apt/debfile.py:565
msgid "Python-debian module not available"
msgstr ""
-#: ../apt/debfile.py:535
+#: ../apt/debfile.py:538
msgid ""
"Automatically decompressed:\n"
"\n"
msgstr ""
-#: ../apt/debfile.py:541
+#: ../apt/debfile.py:544
msgid "Automatically converted to printable ascii:\n"
msgstr ""
-#: ../apt/debfile.py:638
+#: ../apt/debfile.py:641
#, python-format
msgid "Install Build-Dependencies for source package '%s' that builds %s\n"
msgstr ""
-#: ../apt/debfile.py:648
+#: ../apt/debfile.py:651
msgid "An essential package would be removed"
msgstr ""
diff --git a/tests/data/test_debs/hello_2.5-1.dsc b/tests/data/test_debs/hello_2.5-1.dsc
new file mode 100644
index 00000000..48bc2db6
--- /dev/null
+++ b/tests/data/test_debs/hello_2.5-1.dsc
@@ -0,0 +1,32 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+Format: 1.0
+Source: hello
+Binary: hello
+Architecture: any
+Version: 2.5-1
+Maintainer: Santiago Vila <sanvila@debian.org>
+Homepage: http://www.gnu.org/software/hello
+Standards-Version: 3.8.4
+Checksums-Sha1:
+ dfaf92bfc8144141bcd5ffb4a30777cd57501bfa 582535 hello_2.5.orig.tar.gz
+ a98ab19072b35295ded3560721662131933f7c05 5965 hello_2.5-1.diff.gz
+Checksums-Sha256:
+ 22934a7d3a62f247ce3b5a77a2c7f7dd095ad8aef305efa2d0d15e0fef31c446 582535 hello_2.5.orig.tar.gz
+ c2f17c08a6a94bdab4f4316beb4687e8468de03a5162f1d694a0bab4b90e5962 5965 hello_2.5-1.diff.gz
+Files:
+ cf4b73d837692b93676ccd723bf6f797 582535 hello_2.5.orig.tar.gz
+ fa6c41ce60b975294781ed00d67f32fe 5965 hello_2.5-1.diff.gz
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iQEcBAEBCAAGBQJLeDJTAAoJEEHOfwufG4syQSAH/0S9vYKRbs71bfGNmKTmRQy6
+TJM1oj3hdjJoE9HBvCBoBhRSB7l5Iz+TDVyvKTcFOnXTWrZfhnNRCoErtOxP8Z0R
+MOEeLDTPf3JEvpwaRbfzngp+dRkAXTJSI+equqOvj4jjPd1lrNegWtwTF6VIlXAX
+5s+onfBp29/MesxzTGAdviobMYCdazmi2XceC+t5ZEJzEsMMPO6i/v22SrvE/Jkg
+LiD/U6gea3/1dovsUY6I7/VyzMhHgdcuUW4dzovr2daLwE+uRp9R90XDtKN5aWUM
+oBzk8vBIsw/3EV5kjCKdMtqFGdHBjn4nTKvyoXmJ1SvEzeEd21WvLsBFpcJVKaw=
+=YMqG
+-----END PGP SIGNATURE-----
diff --git a/tests/test_debfile.py b/tests/test_debfile.py
index e4755b5b..216878fd 100644
--- a/tests/test_debfile.py
+++ b/tests/test_debfile.py
@@ -49,6 +49,12 @@ class TestDebfilee(unittest.TestCase):
"./data/test_debs/var/lib/dpkg/status")
self.cache = apt.Cache()
+ def testDscFile(self):
+ filename = "hello_2.5-1.dsc"
+ deb = apt.debfile.DscSrcPackage(cache=self.cache)
+ deb.open(os.path.join("data", "test_debs", filename))
+ self.assertTrue(deb.check())
+
def testDebFile(self):
deb = apt.debfile.DebPackage(cache=self.cache)
for (filename, expected_res) in self.TEST_DEBS: