Do not show ? for packages without build no, it is confusing
This commit is contained in:
+4
-1
@@ -29,7 +29,10 @@ class PackageInfo:
|
|||||||
a_build = [autoxml.String, autoxml.optional]
|
a_build = [autoxml.String, autoxml.optional]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.version + "-" + self.release + "-" + (self.build or '?')
|
if self.build:
|
||||||
|
return self.version + "-" + self.release + "-" + self.build
|
||||||
|
else:
|
||||||
|
return self.version + "-" + self.release
|
||||||
|
|
||||||
class Repo:
|
class Repo:
|
||||||
a_operation = [autoxml.String, autoxml.mandatory]
|
a_operation = [autoxml.String, autoxml.mandatory]
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
# Please read the COPYING file.
|
# Please read the COPYING file.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import exceptions
|
||||||
import gettext
|
import gettext
|
||||||
__trans = gettext.translation("pisi", fallback=True)
|
__trans = gettext.translation("pisi", fallback=True)
|
||||||
_ = __trans.ugettext
|
_ = __trans.ugettext
|
||||||
@@ -28,11 +29,10 @@ def __pkg_already_installed(name, pkginfo):
|
|||||||
if not installdb.has_package(name):
|
if not installdb.has_package(name):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
ver, rel, build = str(pkginfo).split("-")
|
verno = str(pkginfo).split("-")
|
||||||
if build == '?':
|
ver, rel = verno[0:2]
|
||||||
build = None
|
build = int(verno[2]) if len(verno) > 2 else None
|
||||||
else:
|
|
||||||
build = int(build)
|
|
||||||
return (ver, rel, build) == installdb.get_version(name)
|
return (ver, rel, build) == installdb.get_version(name)
|
||||||
|
|
||||||
def __listactions(actions):
|
def __listactions(actions):
|
||||||
|
|||||||
Reference in New Issue
Block a user