onur is using this, and finds it helpfull revert for now
This commit is contained in:
+1
-4
@@ -29,10 +29,7 @@ class PackageInfo:
|
|||||||
a_build = [autoxml.String, autoxml.optional]
|
a_build = [autoxml.String, autoxml.optional]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self.build:
|
return self.version + "-" + self.release + "-" + (self.build or '?')
|
||||||
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,7 +10,6 @@
|
|||||||
# 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
|
||||||
@@ -29,10 +28,11 @@ def __pkg_already_installed(name, pkginfo):
|
|||||||
if not installdb.has_package(name):
|
if not installdb.has_package(name):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
verno = str(pkginfo).split("-")
|
ver, rel, build = str(pkginfo).split("-")
|
||||||
ver, rel = verno[0:2]
|
if build == '?':
|
||||||
build = int(verno[2]) if len(verno) > 2 else None
|
build = 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