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

commit ab7bff66cd95b75a65373489c6db38fbe77dca5c
Author: Michel Hermier <[email protected]>
Date:   Fri Nov 23 19:48:14 2012 +0100

scripts/makepkg

* Disable some inchroot and infakeroot operations.
* This will introduce a change of behaviour:
- When makepkg was started it will go as soon as possible to the
chroot and fakeroot call, introducing some ugly code to handle
mainly fakeroot.
- Now With that change makepkg will be forbiden to perform some action
depending on the state it is, and it will act in layers.
That means that the chroot and the fakeroot will be separated
logically. Chroot will handle the depends, and fakeroot will rely on
it's caller to handle the depends, and not the mixed way we have
right now.
That also mean that some trivial task like downloading and checking
the source will not happen in the chroot or in the fakeroot. It is
too stupid to setup the environement to stop it because the sources
are not validated.
- And I hope with that change we will be able to do sudo less
host builds (by invocating the fakeroot layer, from user).

diff --git a/scripts/makepkg b/scripts/makepkg
index b23f6d1..62b1646 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -488,9 +488,7 @@ chroot_enter() {
cp -a * $CHROOTDIR/var/tmp/fst/
chown -R fst:users $CHROOTDIR/var/tmp/fst

-       if [ ! -x  /usr/sbin/chroot ]; then
-               error "chroot was not found."
-       else
+       if find_executable /usr/sbin/chroot ; then
msg "Entering chroot environment"
BUILDLOG=${startdir}/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log
if [ ! "`check_option NOFAKEROOT`" ]; then
@@ -1468,8 +1466,8 @@ makepkg_parseargs() {
# compatibility
--gzip)                 COMPRESS_PROGRAM="gzip" ;;
# internal
-               -F|--infakeroot)        INFAKEROOT=1 ;;
--inchroot)             INCHROOT=1 ;;
+               -F|--infakeroot)        INFAKEROOT=1 ;;
# pacman-g2
--noconfirm)            PACMAN_OPTS="$PACMAN_OPTS --noconfirm" ;;
--noprogressbar)        PACMAN_OPTS="$PACMAN_OPTS --noprogressbar" ;;
@@ -1496,6 +1494,19 @@ makepkg_parseargs() {
fi
done

+       INCHROOT="${INCHROOT:-0}"
+
+       INFAKEROOT="${INFAKEROOT:-0}"
+       if [ "$INFAKEROOT" -eq 1 ]; then
+               NODEPS=1
+               RMDEPS=0
+       fi
+
+       if [ "$INCHROOT" -eq 1 -o "$INFAKEROOT" -eq 1 ]; then
+               GENSHA1=0
+               WRITESHA1=0
+       fi
+
WRITESHA1="${WRITESHA1:-0}"
if [ "$WRITESHA1" -eq 1 ]; then
# Show the sha1sums in case substitution fails
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to