diff --git a/pisi/installdb.py b/pisi/installdb.py index fc16c1ea..5cef9af2 100644 --- a/pisi/installdb.py +++ b/pisi/installdb.py @@ -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: diff --git a/pisi/version.py b/pisi/version.py index a6874d06..bef9a39f 100644 --- a/pisi/version.py +++ b/pisi/version.py @@ -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: diff --git a/tests/archivetests.py b/tests/archivetests.py index 0c8a1f50..56a745e3 100644 --- a/tests/archivetests.py +++ b/tests/archivetests.py @@ -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: diff --git a/tests/versiontests.py b/tests/versiontests.py index b5532612..e831619c 100644 --- a/tests/versiontests.py +++ b/tests/versiontests.py @@ -30,3 +30,6 @@ class VersionTestCase(unittest.TestCase): self.assert_(v4 >= v4) suite = unittest.makeSuite(VersionTestCase) + +if __name__ == '__main__': + unittest.main()