Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=2cb9529ccd4758685c30de4c2ef378cfd41b71a1

commit 2cb9529ccd4758685c30de4c2ef378cfd41b71a1
Author: Michel Hermier <[email protected]>
Date:   Mon Nov 19 13:28:55 2012 +0100

scripts/makepkg

* Introduce _P_package_names, the list of all the package name provided
by the build script.

diff --git a/scripts/makepkg b/scripts/makepkg
index 490fb84..30129d3 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -443,17 +443,21 @@ chroot_clean()

mkdir_subpkgs()
{
-       mkdir -p $startdir/pkg
-       for subpkg in "${subpkgs[@]}"
+       local package_name
+
+       for package_name in "${_P_package_names[@]}"
do
-               mkdir -p "$startdir/pkg.$subpkg"
+               mkdir -p "$startdir/pkg.$package_name"
done
+
+       # Compatibility
+       ln -s "$startdir/pkg" "pkg.${_P_package_names[0]}"
}

rmdir_subpkgs()
{
-       # check for existing pkg directory
-       if [ -d $startdir/pkg ]; then
+       # check for existing pkg.* directories
+       if [ "$(ls $startdir/{pkg,pkg.*} 2> /dev/null | wc -l)" -gt 0 ]; then
msg "Removing existing pkg and pkg.* directories..."
rm -rf $startdir/{pkg,pkg.*}
fi
@@ -936,6 +940,10 @@ if [ "`type -p fblint`" ]; then
fi
fi

+if [ "${#_P_package_names[@]}" -gt 0 ]; then
+       _P_package_names=("$pkgname" "${subpkgs[@]}")
+fi
+
eval "serverlist=${TREE}_servers"
if [ "$F_makepkg_scm" = "git" -a ! "`check_option NOVERSRC`" ]; then
_serverlist=`GIT_DIR=$fst_root/${TREE}/.git git config --get remote.origin.url 
2>/dev/null`
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to