index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2021-01-19 10:30:07 -0800 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2021-01-21 17:18:37 +1000 |
commit | 743e041dbc22ed16a6f996b0caff6523ffecf136 (patch) | |
tree | 5070fdb0feaad778d00066ef036f5217f475380f | |
parent | 1fdf8c00764af9e32f8dec13061f625f48bd4c8c (diff) |
-rw-r--r-- | test/pacman/pmrule.py | 10 |
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py index 59293266..aef73cdb 100644 --- a/test/pacman/pmrule.py +++ b/test/pacman/pmrule.py @@ -181,6 +181,16 @@ class pmrule(object): if not pkg or not os.path.isfile( os.path.join(cachedir, pkg.filename())): success = 0 + elif case == "FEXISTS": + if not os.path.isfile(os.path.join(cachedir, key)): + success = 0 + elif case == "FCONTENTS": + filename = os.path.join(cachedir, key) + try: + with open(filename, 'r') as f: + success = f.read() == value + except: + success = 0 else: tap.diag("Rule kind '%s' not found" % kind) success = -1 |