* version: range hatasi!
* config.options olmasa da calis * test'leri duzelt
This commit is contained in:
+1
-2
@@ -91,10 +91,9 @@ class InstallDB:
|
|||||||
"""install package with specific version and release"""
|
"""install package with specific version and release"""
|
||||||
pkg = str(pkg)
|
pkg = str(pkg)
|
||||||
from config import config
|
from config import config
|
||||||
#print "INSTALLDB", config.options#, config.options.ignore_comar
|
|
||||||
if self.is_installed(pkg):
|
if self.is_installed(pkg):
|
||||||
raise InstallDBError("already installed")
|
raise InstallDBError("already installed")
|
||||||
if config.options.ignore_comar:
|
if config.options and config.options.ignore_comar:
|
||||||
state = 'ip'
|
state = 'ip'
|
||||||
self.dp[pkg] = True
|
self.dp[pkg] = True
|
||||||
else:
|
else:
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ class Version:
|
|||||||
return self.verstring
|
return self.verstring
|
||||||
|
|
||||||
def pred(self,rhs,pred):
|
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]):
|
if pred(self.comps[i],rhs.comps[i]):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from pisi import sourcearchive
|
|||||||
from pisi import fetcher
|
from pisi import fetcher
|
||||||
from pisi import util
|
from pisi import util
|
||||||
from pisi import context
|
from pisi import context
|
||||||
|
from pisi.config import config
|
||||||
from pisi import purl
|
from pisi import purl
|
||||||
|
|
||||||
class ArchiveFileTestCase(unittest.TestCase):
|
class ArchiveFileTestCase(unittest.TestCase):
|
||||||
@@ -94,7 +95,7 @@ class ArchiveFileTestCase(unittest.TestCase):
|
|||||||
ctx = context.BuildContext("tests/sandbox/pspec.xml")
|
ctx = context.BuildContext("tests/sandbox/pspec.xml")
|
||||||
url = purl.PUrl(ctx.spec.source.archiveUri)
|
url = purl.PUrl(ctx.spec.source.archiveUri)
|
||||||
targetDir = ctx.pkg_work_dir()
|
targetDir = ctx.pkg_work_dir()
|
||||||
filePath = join(ctx.archives_dir(), url.filename())
|
filePath = join(config.archives_dir(), url.filename())
|
||||||
|
|
||||||
# check cached
|
# check cached
|
||||||
if util.sha1_file(filePath) != ctx.spec.source.archiveSHA1:
|
if util.sha1_file(filePath) != ctx.spec.source.archiveSHA1:
|
||||||
|
|||||||
@@ -30,3 +30,6 @@ class VersionTestCase(unittest.TestCase):
|
|||||||
self.assert_(v4 >= v4)
|
self.assert_(v4 >= v4)
|
||||||
|
|
||||||
suite = unittest.makeSuite(VersionTestCase)
|
suite = unittest.makeSuite(VersionTestCase)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user