From 4da233eef44c921152daf224a043ab8e2181ef9f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 17 Nov 2005 23:34:31 +0000 Subject: * fix a bug in the package.markUpgrade() code --- apt/package.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apt') diff --git a/apt/package.py b/apt/package.py index bf03f515..5642496a 100644 --- a/apt/package.py +++ b/apt/package.py @@ -19,8 +19,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA -import apt_pkg, string -import random +import apt_pkg, string, sys, random class Package(object): """ This class represents a package in the cache @@ -271,9 +270,10 @@ class Package(object): def markUpgrade(self): """ mark a package for upgrade """ if self.isUpgradable: - self.MarkInstall() - # FIXME: we may want to throw a exception here - sys.stderr.write("MarkUpgrade() called on a non-upgrable pkg") + self.markInstall() + else: + # FIXME: we may want to throw a exception here + sys.stderr.write("MarkUpgrade() called on a non-upgrable pkg: '%s'\n" %self._pkg.Name) def commit(self, fprogress, iprogress): """ commit the changes, need a FetchProgress and InstallProgress -- cgit v1.2.3