Fix trying to remove a not installed package when returning the time after the operation #8 in the example
This commit is contained in:
@@ -20,6 +20,9 @@ import pisi.db
|
|||||||
import pisi.fetcher
|
import pisi.fetcher
|
||||||
|
|
||||||
def __listactions(actions):
|
def __listactions(actions):
|
||||||
|
|
||||||
|
installdb = pisi.db.installdb.InstallDB()
|
||||||
|
|
||||||
beinstalled = []
|
beinstalled = []
|
||||||
beremoved = []
|
beremoved = []
|
||||||
|
|
||||||
@@ -28,7 +31,8 @@ def __listactions(actions):
|
|||||||
if action == "install":
|
if action == "install":
|
||||||
beinstalled.append("%s-%s" % (pkg, version))
|
beinstalled.append("%s-%s" % (pkg, version))
|
||||||
else:
|
else:
|
||||||
beremoved.append("%s" % pkg)
|
if installdb.has_package(pkg):
|
||||||
|
beremoved.append("%s" % pkg)
|
||||||
|
|
||||||
return beinstalled, beremoved
|
return beinstalled, beremoved
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user