Skip to content

Commit 84a5884

Browse files
committed
1 parent 5cbaa2f commit 84a5884

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

compare_base.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ def get_pkgbuild_pkgver(pkgbuild_filepath: Path) -> Optional[Tuple[str, int]]:
8787
pkgver = matches.group(1)
8888
continue
8989

90+
# systemd and util-linux use quotes
91+
matches = re.match(r"^pkgver='([0-9a-zA-Z.-]+)'\s*$", line)
92+
if matches is not None:
93+
pkgver = matches.group(1)
94+
continue
95+
9096
# linux package defines _srcver
9197
matches = re.match(r"^_srcver=([0-9a-zA-Z.-]+)\s*$", line)
9298
if matches is not None:
@@ -103,13 +109,13 @@ def get_pkgbuild_pkgver(pkgbuild_filepath: Path) -> Optional[Tuple[str, int]]:
103109
pkgver = matches.group(1)
104110
continue
105111

106-
# systemd package defines _tag_name
112+
# Old systemd package defines _tag_name
107113
matches = re.match(r"^_tag_name=([0-9.rc-]+)\s$", line)
108114
if matches is not None:
109115
pkgver = matches.group(1)
110116
continue
111117

112-
# util-linux package defines _tag
118+
# Old util-linux package defines _tag
113119
matches = re.match(r"^_tag='([0-9.rc-]+)'\s*$", line)
114120
if matches is not None:
115121
pkgver = matches.group(1).replace("-rc", "rc")

0 commit comments

Comments
 (0)