From c31fb6542e64a7eb279d0b246da4ea15dc4d6af3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 20 Aug 2009 23:14:19 +0200 Subject: apt/package.py: Do not mark the package as manually installed on upgrade (Closes: #542699) --- apt/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt/package.py') diff --git a/apt/package.py b/apt/package.py index 7322bb94..e33078d8 100644 --- a/apt/package.py +++ b/apt/package.py @@ -1064,7 +1064,8 @@ class Package(object): def markUpgrade(self): """Mark a package for upgrade.""" if self.isUpgradable: - self.markInstall() + fromUser = not self._pcache._depcache.IsAutoInstalled(self._pkg) + self.markInstall(fromUser=fromUser) else: # FIXME: we may want to throw a exception here sys.stderr.write(("MarkUpgrade() called on a non-upgrable pkg: " -- cgit v1.2.3 From 200249fc4f0fccd19e12e1abcb718c08df0bf752 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 21 Aug 2009 14:57:44 +0200 Subject: apt/package.py: Add Package.is_now_broken and Package.is_inst_broken. --- apt/package.py | 10 ++++++++++ debian/changelog | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'apt/package.py') diff --git a/apt/package.py b/apt/package.py index e33078d8..59fb8cfa 100644 --- a/apt/package.py +++ b/apt/package.py @@ -1008,6 +1008,16 @@ class Package(object): """ return VersionList(self) + @property + def is_inst_broken(self): + """Return True if the to-be-installed package is broken.""" + return self._pcache._depcache.IsInstBroken(self._pkg) + + @property + def is_now_broken(self): + """Return True if the installed package is broken.""" + return self._pcache._depcache.IsNowBroken(self._pkg) + # depcache actions def markKeep(self): diff --git a/debian/changelog b/debian/changelog index 7ab2fda4..d91b90a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,9 @@ python-apt (0.7.12.2) UNRELEASED; urgency=low - Introduce Version.get_dependencies() which takes one or more types of dependencies and returns a list of Dependency objects. - Do not mark the package as manually installed on upgrade (Closes: #542699) + - Add Package.is_now_broken and Package.is_inst_broken. - -- Julian Andres Klode Thu, 20 Aug 2009 23:13:00 +0200 + -- Julian Andres Klode Fri, 21 Aug 2009 14:57:08 +0200 python-apt (0.7.12.1) unstable; urgency=low -- cgit v1.2.3 From 353d2494c234d87cb63affd07a927d1030fa9721 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 21 Aug 2009 17:00:03 +0200 Subject: * apt/package.py: Fix Version.get_dependencies() to not ignore the arguments. --- apt/package.py | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'apt/package.py') diff --git a/apt/package.py b/apt/package.py index 59fb8cfa..d639f31f 100644 --- a/apt/package.py +++ b/apt/package.py @@ -365,7 +365,7 @@ class Version(object): """Return a list of Dependency objects for the given types.""" depends_list = [] depends = self._cand.DependsList - for t in ["PreDepends", "Depends"]: + for t in types: try: for depVerList in depends[t]: base_deps = [] diff --git a/debian/changelog b/debian/changelog index 95c5c9f3..b75d07b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.7.13.1) unstable; urgency=low + + * apt/package.py: + - Fix Version.get_dependencies() to not ignore the arguments. + + -- Julian Andres Klode Fri, 21 Aug 2009 16:59:08 +0200 + python-apt (0.7.13.0) unstable; urgency=low [ Michael Vogt ] -- cgit v1.2.3