summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-09-15 09:19:02 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-09-18 22:20:10 +0200
commit12aba89ed2100552ddfe7d69bbd9e35a2019d098 (patch)
treeb4661abbd1519a06247a75c9e3379f7636fb9484
parent7eccf95bb5d53cb1b4f8c1d363cd5645ca4e567e (diff)
downloaddbscripts-12aba89ed2100552ddfe7d69bbd9e35a2019d098.tar.gz
dbscripts-12aba89ed2100552ddfe7d69bbd9e35a2019d098.tar.xz
parse_pkgbuilds.sh : fix pkgbase handling
add the default value for pkgbase also rework slightly how variables are handled (better distinction between splitpkg variables and the rest) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xcron-jobs/check_archlinux/parse_pkgbuilds.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
index c2df7d1..5cd17e4 100755
--- a/cron-jobs/check_archlinux/parse_pkgbuilds.sh
+++ b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
@@ -5,18 +5,19 @@
exit() { return; }
-variables=('pkgname' 'pkgver' 'pkgrel' 'depends' 'makedepends' 'provides' 'conflicts' )
-readonly -a variables
+splitpkg_overrides=('depends' 'optdepends' 'provides' 'conflicts')
+variables=('pkgname' 'pkgbase' 'pkgver' 'pkgrel' 'makedepends' 'arch' ${splitpkg_overrides[@]})
+readonly -a variables splitpkg_overrides
backup_package_variables() {
- for var in ${variables[@]}; do
+ for var in ${splitpkg_overrides[@]}; do
indirect="${var}_backup"
eval "${indirect}=(\${$var[@]})"
done
}
restore_package_variables() {
- for var in ${variables[@]}; do
+ for var in ${splitpkg_overrides[@]}; do
indirect="${var}_backup"
if [ -n "${!indirect}" ]; then
eval "${var}=(\${$indirect[@]})"
@@ -82,6 +83,7 @@ source_pkgbuild() {
fi
if [ "${#pkgname[@]}" -gt "1" ]; then
+ pkgbase=${pkgbase:-${pkgname[0]}}
for pkg in ${pkgname[@]}; do
if [ "$(type -t package_${pkg})" != "function" ]; then
echo -e "%INVALID%\n$pkgbuild\n"