r-ps: fix another build error

also don't print all the PKGBUILD variables to log
This commit is contained in:
Pekka Ristola 2023-06-01 19:51:56 +03:00
parent 8b45d9f0da
commit 55c2a30bd1
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
2 changed files with 4 additions and 3 deletions

View file

@ -6,4 +6,4 @@ update_on:
cran: ps
- alias: r
- source: manual
manual: 2
manual: 3

View file

@ -120,7 +120,8 @@ class Pkgbuild:
]
def __init__(self):
output = run_protected(["/bin/bash", "-c", "source PKGBUILD && declare -p"])
cmd = ["/bin/bash", "-c", "source PKGBUILD && declare -p"]
output = run_protected(cmd, silent = True)
# assume that variable values never contain newlines
for line in output.splitlines():
self._parse_line(line)
@ -198,7 +199,7 @@ license_map = {
def get_default_r_pkgs() -> set:
"""Get the set of R packages included in the R distribution itself"""
provides = pyalpm.Handle("/", PACMAN_DB_DIR).register_syncdb("extra", 0).get_pkg("r").provides
provides = pyalpm.Handle("/", str(PACMAN_DB_DIR)).register_syncdb("extra", 0).get_pkg("r").provides
return { pr.split("=", 1)[0] for pr in provides }
class CheckFailed(Exception):