summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-13 13:58:20 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-13 13:58:20 -0400
commit28eefc928e8ce7beb1f540a93fccb1e1ff7b00fb (patch)
tree76efcea6dca05ae4aec8afcc31d7859003002a53 /src
parent222e615f45279b5315af5148a5cbbca5988078a4 (diff)
makechrootpkg.sh:chroot_copy_in(): work with librefetch stuff
* do the process for both PKGBUILD and SRCBUILD, if it exists * look at both ${source[@]} and ${mksource[@]} * don't require that URLs contain a path-part
Diffstat (limited to 'src')
-rw-r--r--src/devtools/lib/makechrootpkg.sh.patch31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/devtools/lib/makechrootpkg.sh.patch b/src/devtools/lib/makechrootpkg.sh.patch
index 13a9ff1..d20b88c 100644
--- a/src/devtools/lib/makechrootpkg.sh.patch
+++ b/src/devtools/lib/makechrootpkg.sh.patch
@@ -94,7 +94,7 @@
$update_first && archroot -u "$copydir"
mkdir -p "$copydir/build"
-@@ -230,7 +246,14 @@
+@@ -230,14 +246,24 @@
# Set target CARCH as it might be used within the PKGBUILD to select correct sources
eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf")
export CARCH
@@ -107,10 +107,31 @@
+chroot_copy_in() {
+local copydir=$1
# Copy PKGBUILD and sources
- cp PKGBUILD "$copydir/build/"
+-cp PKGBUILD "$copydir/build/"
++for recipe in PKGBUILD SRCBUILD; do
++if [[ -f $recipe ]]; then
++cp $recipe "$copydir/build/"
(
-@@ -256,13 +279,23 @@
+- source PKGBUILD
+- for file in "${source[@]}"; do
++ source $recipe
++ for file in "${source[@]}" "${mksource[@]}"; do
+ file="${file%%::*}"
+ file="${file##*://*/}"
++ file="${file##*://}"
+ if [[ -f $file ]]; then
+ cp "$file" "$copydir/srcdest/"
+ elif [[ -f $SRCDEST/$file ]]; then
+@@ -251,18 +277,30 @@
+ # evaluate any bash variables used
+ eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
+ [[ -f $file ]] && cp "$file" "$copydir/build/"
+- done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD)
++ done < <(sed -n "s/^[[:space:]]*$i=//p" $recipe)
+ done
)
++fi
++done
chown -R nobody "$copydir"/{build,pkgdest,srcdest}
+}
@@ -133,7 +154,7 @@
# This is a little gross, but this way the script is recreated every time in the
# working copy
cat >"$copydir/chrootbuild" <<EOF
-@@ -284,37 +317,62 @@
+@@ -284,37 +322,62 @@
exit 0
EOF
chmod +x "$copydir/chrootbuild"
@@ -207,7 +228,7 @@
if [[ "$chroottype" == btrfs ]]; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume $copydir"
-@@ -326,8 +384,39 @@
+@@ -326,8 +389,39 @@
# remove lock file
rm --force "$copydir.lock"
stat_done