From 29b9304e0b3024c62772df6eeebf848bb52c3c37 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 8 Mar 2009 19:18:05 +0100 Subject: po/POTFILES.in: Add apt/package.py,apt/debfile.py,apt/progress/gtk2.py --- po/POTFILES.in | 4 ++- po/python-apt.pot | 92 +++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 85 insertions(+), 11 deletions(-) (limited to 'po') diff --git a/po/POTFILES.in b/po/POTFILES.in index 0cf708e1..767fa3ca 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -2,4 +2,6 @@ [type: gettext/rfc822deb] data/templates/Ubuntu.info.in [type: gettext/rfc822deb] data/templates/Debian.info.in aptsources/distro.py -apt/gtk/widgets.py \ No newline at end of file +apt/progress/gtk2.py +apt/package.py +apt/debfile.py diff --git a/po/python-apt.pot b/po/python-apt.pot index 217c772c..0de7caab 100644 --- a/po/python-apt.pot +++ b/po/python-apt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-03 21:17+0100\n" +"POT-Creation-Date: 2009-03-08 19:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -314,7 +314,7 @@ msgid "Non-DFSG-compatible Software" msgstr "" #. TRANSLATORS: %s is a country -#: ../aptsources/distro.py:207 ../aptsources/distro.py:422 +#: ../aptsources/distro.py:208 ../aptsources/distro.py:423 #, python-format msgid "Server for %s" msgstr "" @@ -322,34 +322,106 @@ msgstr "" #. More than one server is used. Since we don't handle this case #. in the user interface we set "custom servers" to true and #. append a list of all used servers -#: ../aptsources/distro.py:225 ../aptsources/distro.py:231 -#: ../aptsources/distro.py:247 +#: ../aptsources/distro.py:226 ../aptsources/distro.py:232 +#: ../aptsources/distro.py:248 msgid "Main server" msgstr "" -#: ../aptsources/distro.py:251 +#: ../aptsources/distro.py:252 msgid "Custom servers" msgstr "" -#: ../apt/gtk/widgets.py:243 +#: ../apt/progress/gtk2.py:246 #, python-format msgid "Downloading file %(current)li of %(total)li with %(speed)s/s" msgstr "" -#: ../apt/gtk/widgets.py:249 +#: ../apt/progress/gtk2.py:252 #, python-format msgid "Downloading file %(current)li of %(total)li" msgstr "" #. Setup some child widgets -#: ../apt/gtk/widgets.py:269 +#: ../apt/progress/gtk2.py:272 msgid "Details" msgstr "" -#: ../apt/gtk/widgets.py:351 +#: ../apt/progress/gtk2.py:354 msgid "Starting..." msgstr "" -#: ../apt/gtk/widgets.py:357 +#: ../apt/progress/gtk2.py:360 msgid "Complete" msgstr "" + +#: ../apt/package.py:266 +#, python-format +msgid "Invalid unicode in description for '%s' (%s). Please report." +msgstr "" + +#: ../apt/package.py:644 ../apt/package.py:748 +msgid "The list of changes is not available" +msgstr "" + +#: ../apt/package.py:752 +#, python-format +msgid "" +"The list of changes is not available yet.\n" +"\n" +"Please use http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n" +"until the changes become available or try again later." +msgstr "" + +#: ../apt/package.py:758 +msgid "" +"Failed to download the list of changes. \n" +"Please check your Internet connection." +msgstr "" + +#: ../apt/debfile.py:59 +#, python-format +msgid "This is not a valid DEB archive, missing '%s' member" +msgstr "" + +#: ../apt/debfile.py:84 +#, python-format +msgid "List of files for '%s'could not be read" +msgstr "" + +#: ../apt/debfile.py:152 +#, python-format +msgid "Dependency is not satisfiable: %s\n" +msgstr "" + +#: ../apt/debfile.py:176 +#, python-format +msgid "Conflicts with the installed package '%s'" +msgstr "" + +#: ../apt/debfile.py:322 +#, python-format +msgid "Wrong architecture '%s'" +msgstr "" + +#. the deb is older than the installed +#: ../apt/debfile.py:328 +msgid "A later version is already installed" +msgstr "" + +#: ../apt/debfile.py:348 +msgid "Failed to satisfy all dependencies (broken cache)" +msgstr "" + +#: ../apt/debfile.py:379 +#, python-format +msgid "Cannot install '%s'" +msgstr "" + +#: ../apt/debfile.py:487 +#, python-format +msgid "Install Build-Dependencies for source package '%s' that builds %s\n" +msgstr "" + +#: ../apt/debfile.py:497 +msgid "An essential package would be removed" +msgstr "" -- cgit v1.2.3 From 8e4f00f1b6349b55eebce3c9cccbcab7ab438a85 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 12 Apr 2009 19:07:25 +0200 Subject: apt/package.py: Handle cases where no candidate is available and one of the deprecated properties (e.g. candidateVersion) is requested. (Closes: #523801) --- apt/package.py | 28 +++++++++++++++------------- debian/changelog | 8 ++++++++ po/python-apt.pot | 30 +++++++++++++++--------------- 3 files changed, 38 insertions(+), 28 deletions(-) (limited to 'po') diff --git a/apt/package.py b/apt/package.py index 00f563e4..0e13957f 100644 --- a/apt/package.py +++ b/apt/package.py @@ -529,12 +529,12 @@ class Package(object): @DeprecatedProperty def candidateVersion(self): """Return the candidate version as string.""" - return self.candidate.version + return getattr(self.candidate, "version", None) @DeprecatedProperty def candidateDependencies(self): """Return a list of candidate dependencies.""" - return self.candidate.dependencies + return getattr(self.candidate, "dependencies", None) @DeprecatedProperty def installedDependencies(self): @@ -544,12 +544,12 @@ class Package(object): @DeprecatedProperty def architecture(self): """Return the Architecture of the package""" - return self.candidate.architecture + return getattr(self.candidate, "architecture", None) @DeprecatedProperty def candidateDownloadable(self): """Return True if the candidate is downloadable.""" - return self.candidate.downloadable + return getattr(self.candidate, "downloadable", None) @DeprecatedProperty def installedDownloadable(self): @@ -570,7 +570,7 @@ class Package(object): @DeprecatedProperty def homepage(self): """Return the homepage field as string.""" - return self.candidate.homepage + return getattr(self.candidate, "homepage", None) @property def section(self): @@ -580,7 +580,7 @@ class Package(object): @DeprecatedProperty def priority(self): """Return the priority (of the candidate version).""" - return self.candidate.priority + return getattr(self.candidate, "priority", None) @DeprecatedProperty def installedPriority(self): @@ -590,7 +590,7 @@ class Package(object): @DeprecatedProperty def summary(self): """Return the short description (one line summary).""" - return self.candidate.summary + return getattr(self.candidate, "summary", None) @DeprecatedProperty def description(self): @@ -601,17 +601,17 @@ class Package(object): See http://www.debian.org/doc/debian-policy/ch-controlfields.html for more information. """ - return self.candidate.description + return getattr(self.candidate, "description", None) @DeprecatedProperty def rawDescription(self): """return the long description (raw).""" - return self.candidate.raw_description + return getattr(self.candidate, "raw_description", None) @DeprecatedProperty def candidateRecord(self): """Return the Record of the candidate version of the package.""" - return self.candidate.record + return getattr(self.candidate, "record", None) @DeprecatedProperty def installedRecord(self): @@ -676,7 +676,7 @@ class Package(object): @DeprecatedProperty def packageSize(self): """Return the size of the candidate deb package.""" - return self.candidate.size + return getattr(self.candidate, "size", None) @DeprecatedProperty def installedPackageSize(self): @@ -686,7 +686,7 @@ class Package(object): @DeprecatedProperty def candidateInstalledSize(self): """Return the size of the candidate installed package.""" - return self.candidate.installed_size + return getattr(self.candidate, "installed_size", None) @DeprecatedProperty def installedSize(self): @@ -731,6 +731,8 @@ class Package(object): return self._changelog if uri is None: + if not self.candidate: + pass if self.candidate.origins[0].origin == "Debian": uri = "http://packages.debian.org/changelogs/pool" \ "/%(src_section)s/%(prefix)s/%(src_pkg)s" \ @@ -863,7 +865,7 @@ class Package(object): @DeprecatedProperty def candidateOrigin(self): """Return a list of Origin() objects for the candidate version.""" - return self.candidate.origins + return getattr(self.candidate, "origins", None) @property def versions(self): diff --git a/debian/changelog b/debian/changelog index eb2a6a30..20d2167a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-apt (0.7.10.2) unstable; urgency=low + + * apt/package.py: Handle cases where no candidate is available and + one of the deprecated properties (e.g. candidateVersion) is + requested. (Closes: #523801) + + -- Julian Andres Klode Sun, 12 Apr 2009 19:00:07 +0200 + python-apt (0.7.10.1) unstable; urgency=low * Fix FTBFS with python-debian (>= 0.1.13) on Python 2.4 by not using it to diff --git a/po/python-apt.pot b/po/python-apt.pot index 0de7caab..9c23c579 100644 --- a/po/python-apt.pot +++ b/po/python-apt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-08 19:15+0100\n" +"POT-Creation-Date: 2009-04-12 19:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -354,16 +354,16 @@ msgstr "" msgid "Complete" msgstr "" -#: ../apt/package.py:266 +#: ../apt/package.py:278 #, python-format msgid "Invalid unicode in description for '%s' (%s). Please report." msgstr "" -#: ../apt/package.py:644 ../apt/package.py:748 +#: ../apt/package.py:745 ../apt/package.py:849 msgid "The list of changes is not available" msgstr "" -#: ../apt/package.py:752 +#: ../apt/package.py:853 #, python-format msgid "" "The list of changes is not available yet.\n" @@ -372,56 +372,56 @@ msgid "" "until the changes become available or try again later." msgstr "" -#: ../apt/package.py:758 +#: ../apt/package.py:859 msgid "" "Failed to download the list of changes. \n" "Please check your Internet connection." msgstr "" -#: ../apt/debfile.py:59 +#: ../apt/debfile.py:56 #, python-format msgid "This is not a valid DEB archive, missing '%s' member" msgstr "" -#: ../apt/debfile.py:84 +#: ../apt/debfile.py:81 #, python-format msgid "List of files for '%s'could not be read" msgstr "" -#: ../apt/debfile.py:152 +#: ../apt/debfile.py:149 #, python-format msgid "Dependency is not satisfiable: %s\n" msgstr "" -#: ../apt/debfile.py:176 +#: ../apt/debfile.py:173 #, python-format msgid "Conflicts with the installed package '%s'" msgstr "" -#: ../apt/debfile.py:322 +#: ../apt/debfile.py:319 #, python-format msgid "Wrong architecture '%s'" msgstr "" #. the deb is older than the installed -#: ../apt/debfile.py:328 +#: ../apt/debfile.py:325 msgid "A later version is already installed" msgstr "" -#: ../apt/debfile.py:348 +#: ../apt/debfile.py:345 msgid "Failed to satisfy all dependencies (broken cache)" msgstr "" -#: ../apt/debfile.py:379 +#: ../apt/debfile.py:376 #, python-format msgid "Cannot install '%s'" msgstr "" -#: ../apt/debfile.py:487 +#: ../apt/debfile.py:484 #, python-format msgid "Install Build-Dependencies for source package '%s' that builds %s\n" msgstr "" -#: ../apt/debfile.py:497 +#: ../apt/debfile.py:494 msgid "An essential package would be removed" msgstr "" -- cgit v1.2.3