mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
makepkg: merge in-line splitpkg handling logic
Ease maintainace; the two parts that have been combined into a function were identical. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: rename function] Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
c7a37d039b
commit
70418e48f6
@ -1376,6 +1376,20 @@ restore_package_variables() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_split_packaging() {
|
||||||
|
for pkg in ${pkgname[@]}; do
|
||||||
|
pkgdir="$pkgdir/$pkg"
|
||||||
|
mkdir -p "$pkgdir"
|
||||||
|
chmod a-s "$pkgdir"
|
||||||
|
backup_package_variables
|
||||||
|
run_package $pkg
|
||||||
|
tidy_install
|
||||||
|
create_package $pkg
|
||||||
|
restore_package_variables
|
||||||
|
pkgdir="${pkgdir%/*}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# getopt like parser
|
# getopt like parser
|
||||||
parse_options() {
|
parse_options() {
|
||||||
local short_options=$1; shift;
|
local short_options=$1; shift;
|
||||||
@ -1842,17 +1856,7 @@ if (( INFAKEROOT )); then
|
|||||||
fi
|
fi
|
||||||
create_package
|
create_package
|
||||||
else
|
else
|
||||||
for pkg in ${pkgname[@]}; do
|
run_split_packaging
|
||||||
pkgdir="$pkgdir/$pkg"
|
|
||||||
mkdir -p "$pkgdir"
|
|
||||||
chmod a-s "$pkgdir"
|
|
||||||
backup_package_variables
|
|
||||||
run_package $pkg
|
|
||||||
tidy_install
|
|
||||||
create_package $pkg
|
|
||||||
restore_package_variables
|
|
||||||
pkgdir="${pkgdir%/*}"
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg "$(gettext "Leaving fakeroot environment.")"
|
msg "$(gettext "Leaving fakeroot environment.")"
|
||||||
@ -1970,17 +1974,7 @@ else
|
|||||||
fi
|
fi
|
||||||
create_package
|
create_package
|
||||||
else
|
else
|
||||||
for pkg in ${pkgname[@]}; do
|
run_split_packaging
|
||||||
pkgdir="$pkgdir/$pkg"
|
|
||||||
mkdir -p "$pkgdir"
|
|
||||||
chmod a-s "$pkgdir"
|
|
||||||
backup_package_variables
|
|
||||||
run_package $pkg
|
|
||||||
tidy_install
|
|
||||||
create_package $pkg
|
|
||||||
restore_package_variables
|
|
||||||
pkgdir="${pkgdir%/*}"
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if (( ! REPKG && ( PKGFUNC || SPLITPKG ) )); then
|
if (( ! REPKG && ( PKGFUNC || SPLITPKG ) )); then
|
||||||
|
Loading…
Reference in New Issue
Block a user