summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-05-18 09:11:43 +0200
committerErich Eckner <git@eckner.net>2021-05-18 09:11:43 +0200
commit1c74de44faf8d1be27ef9790593a78b4065d1a0d (patch)
treeca990a3da47d9be8383bc254f09a80a3586d84ae
parentd2bdc7bd227a3d925388147af5aa74a2f4aeeaa3 (diff)
downloadarchlinuxewe-1c74de44faf8d1be27ef9790593a78b4065d1a0d.tar.xz
pythonFunktionen, testeAbhaengigkeiten: _pinned_dependencies nicht überschreiben
-rwxr-xr-xpythonFunktionen17
-rwxr-xr-xtesteAbhaengigkeiten7
2 files changed, 18 insertions, 6 deletions
diff --git a/pythonFunktionen b/pythonFunktionen
index 9ebe72a1e..e54b2368b 100755
--- a/pythonFunktionen
+++ b/pythonFunktionen
@@ -18,8 +18,7 @@ versionsUniq() {
ladePkgbuild() {
paket="$1"
- if [[ "${paket}" != "python-"* ]]
- then
+ if [ -n "${paket%%python-*}" ]; then
return 1
fi
@@ -28,7 +27,12 @@ ladePkgbuild() {
makepkg -f --verifysource
- . PKGBUILD
+ . <(
+ sed '
+ /^\s*_pinned_dependencies\S*=(.*)/ d
+ /^\s*_pinned_dependencies\S*=(/,/)/ d
+ ' PKGBUILD
+ )
if grep -qF _pinned_dependencies PKGBUILD; then
depends+=('"${_pinned_dependencies[@]}"')
fi
@@ -59,7 +63,8 @@ versteheRequirements() {
"${metaRegexe[@]}"
tar -Oxzf "${archiv}" "${_pkgname}-${pkgver}/setup.py" \
| sed -n "$(
- printf '/^\\s*%s = \[/,/^\s*$/ p\n' \
+ printf '/=/ s/^\\s\\+//\n'
+ printf '/^%s = \[/,/^\s*$/ p\n' \
"${metaRegexe[@]}"
)" \
| sed '
@@ -90,6 +95,8 @@ versteheRequirements() {
s,^https\?:.*/mysql-connector-python-[^/]*$,mysql-connector,
s/^/depends:/
'
+ ! grep -qwF _pinned_dependencies PKGBUILD \
+ || printf 'depends:"${_pinned_dependencies[@]}"\n'
} | \
tr '[:upper:]' '[:lower:]' | \
sort -u
@@ -105,7 +112,7 @@ versteheRequirements() {
p
' | \
sed '
- /^cython\($\|[<>=]\)\|^python-/! s/^/python-/
+ /^cython\($\|[<>=]\)\|^python-\|^"\?\$/! s/^/python-/
/[^<>]=/ s/=/>=/
'
)
diff --git a/testeAbhaengigkeiten b/testeAbhaengigkeiten
index e76bd5da2..38c98fbed 100755
--- a/testeAbhaengigkeiten
+++ b/testeAbhaengigkeiten
@@ -72,7 +72,12 @@ if ${err}; then
if [ -n "${metaYml["${wasAusgeben}"]}" ]; then
echo "${wasAusgeben}=("
echo "${metaYml["${wasAusgeben}"]})" | \
- sed "s|^\s*||; s|\s*\$||; s|^\(.*[^)]\)\()\?\)\$| '\1'\2|"
+ sed '
+ s|^\s*||
+ s|\s*$||
+ s|^\([^"].*[^)]\)\()\?\)$|'"'"'\1'"'"'\2|
+ s|^["'"'"']| \0|
+ '
fi
done | \
sed ':begin;