* version: range hatasi!

* config.options olmasa da calis
* test'leri duzelt
This commit is contained in:
Eray Özkural
2005-08-09 16:24:26 +00:00
parent c16b02a2e0
commit 72aec0c55c
4 changed files with 7 additions and 4 deletions
+1 -2
View File
@@ -91,10 +91,9 @@ class InstallDB:
"""install package with specific version and release"""
pkg = str(pkg)
from config import config
#print "INSTALLDB", config.options#, config.options.ignore_comar
if self.is_installed(pkg):
raise InstallDBError("already installed")
if config.options.ignore_comar:
if config.options and config.options.ignore_comar:
state = 'ip'
self.dp[pkg] = True
else:
+1 -1
View File
@@ -23,7 +23,7 @@ class Version:
return self.verstring
def pred(self,rhs,pred):
for i in range(0, len(self.comps)-1):
for i in range(0, len(self.comps)):
if pred(self.comps[i],rhs.comps[i]):
return True
else:
+2 -1
View File
@@ -18,6 +18,7 @@ from pisi import sourcearchive
from pisi import fetcher
from pisi import util
from pisi import context
from pisi.config import config
from pisi import purl
class ArchiveFileTestCase(unittest.TestCase):
@@ -94,7 +95,7 @@ class ArchiveFileTestCase(unittest.TestCase):
ctx = context.BuildContext("tests/sandbox/pspec.xml")
url = purl.PUrl(ctx.spec.source.archiveUri)
targetDir = ctx.pkg_work_dir()
filePath = join(ctx.archives_dir(), url.filename())
filePath = join(config.archives_dir(), url.filename())
# check cached
if util.sha1_file(filePath) != ctx.spec.source.archiveSHA1:
+3
View File
@@ -30,3 +30,6 @@ class VersionTestCase(unittest.TestCase):
self.assert_(v4 >= v4)
suite = unittest.makeSuite(VersionTestCase)
if __name__ == '__main__':
unittest.main()