index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2021-01-19 10:30:08 -0800 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2021-01-21 17:19:01 +1000 |
commit | ad84a572aac455dcd3de111dbf8d66c45b20573a (patch) | |
tree | 52f408fc198563b6ee67f52a9d72ffc17ef39c80 /test | |
parent | 743e041dbc22ed16a6f996b0caff6523ffecf136 (diff) |
-rw-r--r-- | test/pacman/pmdb.py | 1 | ||||
-rw-r--r-- | test/pacman/pmtest.py | 7 | ||||
-rw-r--r-- | test/pacman/util.py | 9 |
diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index 971e28eb..cae51b4e 100644 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -54,6 +54,7 @@ class pmdb(object): self.root = root self.pkgs = [] self.option = {} + self.syncdir = True if self.treename == "local": self.dbdir = os.path.join(root, util.PM_DBPATH, treename) self.dbfile = None diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index ed6eab6a..8669f31d 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -167,10 +167,11 @@ class pmtest(object): vprint("\t%s" % os.path.join(util.PM_CACHEDIR, pkg.filename())) if self.cachepkgs: pkg.makepkg(cachedir) - else: + elif value.syncdir: pkg.makepkg(os.path.join(syncdir, value.treename)) - pkg.md5sum = util.getmd5sum(pkg.path) - pkg.csize = os.stat(pkg.path)[stat.ST_SIZE] + if pkg.path: + pkg.md5sum = util.getmd5sum(pkg.path) + pkg.csize = os.stat(pkg.path)[stat.ST_SIZE] # Creating sync database archives vprint(" Creating databases") diff --git a/test/pacman/util.py b/test/pacman/util.py index 1e0eb385..2957a020 100644 --- a/test/pacman/util.py +++ b/test/pacman/util.py @@ -122,11 +122,10 @@ def mkcfgfile(filename, root, option, db): for key in sorted(db.keys()): if key != "local": value = db[key] - data.append("[%s]\n" \ - "SigLevel = %s\n" \ - "Server = file://%s" \ - % (value.treename, value.getverify(), \ - os.path.join(root, SYNCREPO, value.treename))) + data.append("[%s]\n" % (value.treename)) + data.append("SigLevel = %s\n" % (value.getverify())) + if value.syncdir: + data.append("Server = file://%s" % (os.path.join(root, SYNCREPO, value.treename))) for optkey, optval in value.option.items(): data.extend(["%s = %s" % (optkey, j) for j in optval]) |