fixed multipkgs not getting parsed correctly
This commit is contained in:
13
master.py
13
master.py
@@ -23,6 +23,7 @@ regex_pkgrel = re.compile(r"^pkgrel\s*=\s*(.+)$", re.MULTILINE)
|
|||||||
regex_epoch = re.compile(r"^epoch\s*=\s*(.+)$", re.MULTILINE)
|
regex_epoch = re.compile(r"^epoch\s*=\s*(.+)$", re.MULTILINE)
|
||||||
regex_march = re.compile(r"(-march=)(.+?) ", re.MULTILINE)
|
regex_march = re.compile(r"(-march=)(.+?) ", re.MULTILINE)
|
||||||
regex_validkeys = re.compile(r"^validpgpkeys\+?=\((.*?)\)", re.MULTILINE | re.DOTALL)
|
regex_validkeys = re.compile(r"^validpgpkeys\+?=\((.*?)\)", re.MULTILINE | re.DOTALL)
|
||||||
|
regex_pkg_repo = re.compile(r"^(.*)-.*-.*-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$", re.MULTILINE)
|
||||||
fp = None
|
fp = None
|
||||||
update_last = time.time()
|
update_last = time.time()
|
||||||
copy_l = Lock()
|
copy_l = Lock()
|
||||||
@@ -150,8 +151,16 @@ def already_running() -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def find_all_files_for_pkg(name: str, repo: str) -> list:
|
def find_all_files_for_pkg(name: str, repo: str) -> list:
|
||||||
searchpath = os.path.join(config["basedir"]["repo"], repo, "os", config["arch"]) + "/" + name + "-*.pkg.*"
|
pkgs = []
|
||||||
pkgs = glob.glob(searchpath)
|
for root, dirs, files in os.walk(os.path.join(config["basedir"]["repo"], repo, "os", config["arch"])):
|
||||||
|
for file in files:
|
||||||
|
res = regex_pkg_repo.match(file)
|
||||||
|
if res:
|
||||||
|
if res.group(1) is name:
|
||||||
|
pkgs.append(os.path.join(root, file))
|
||||||
|
|
||||||
|
# searchpath = os.path.join(config["basedir"]["repo"], repo, "os", config["arch"]) + "/" + name + "-*.pkg.*"
|
||||||
|
# pkgs = glob.glob(searchpath)
|
||||||
|
|
||||||
for p in pkgs:
|
for p in pkgs:
|
||||||
if p.endswith(".sig"):
|
if p.endswith(".sig"):
|
||||||
|
Reference in New Issue
Block a user