onur is using this, and finds it helpfull revert for now

This commit is contained in:
Faik Uygur
2009-09-10 13:03:18 +00:00
parent a72a7e4563
commit 9c58fa9b39
2 changed files with 6 additions and 9 deletions
+1 -4
View File
@@ -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]
+5 -5
View File
@@ -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):