Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2008-11-14 03:08:52 +1000
committerDan McGee <dan@archlinux.org>2008-12-07 22:11:29 -0600
commit69be73f68cc770ddcbe388af96e32f8bba7886f7 (patch)
tree751604cb7f1931558ddb809f4fd9bd5944cd8178 /scripts/makepkg.sh.in
parent61c6552862345cb155903cd1566f1cef5c527a94 (diff)
makepkg: several small bits of tidying
1. Do not warn people about missing arch if they are using --ignorearch. 2. Remove unneed reference to bug report about using fakeroot as little as possible. We want to do that, bug report of not. 3. Removes superfluous warning given when building as root. The user has already used the "--asroot" flag. 4. Move comment about skipping warning message to above where it occurs 5. Do not warn about skipping source retreval, integrety checks and extraction when using --repackage 6. Do not warn about skipping build when using --repackage 7. Move comment about fakeroot usage to above test condition Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in31
1 files changed, 9 insertions, 22 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 0c74fcd4..b8896258 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1398,10 +1398,6 @@ if ! in_array $CARCH ${arch[@]}; then
plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT"
plain "$(gettext "such as arch=('%s').")" "$CARCH"
exit 1
- else
- warning "$(gettext "%s is not available for the '%s' architecture.")" "$pkgname" "$CARCH"
- plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT"
- plain "$(gettext "such as arch=('%s').")" "$CARCH"
fi
fi
@@ -1449,11 +1445,8 @@ if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" \
fi
# Run the bare minimum in fakeroot
-# fix flyspray bug 6208 -- using makepkg with fakeroot gives an error
if [ "$INFAKEROOT" = "1" ]; then
- if [ "$REPKG" = "1" ]; then
- warning "$(gettext "Skipping build.")"
- else
+ if [ "$REPKG" = "0" ]; then
run_build
tidy_install
fi
@@ -1466,10 +1459,6 @@ fi
msg "$(gettext "Making package: %s")" "$pkgname $pkgver-$pkgrel $CARCH ($(date))"
-if [ $EUID -eq 0 ]; then
- warning "$(gettext "Running makepkg as root...")"
-fi
-
# if we are creating a source-only package, go no further
if [ "$SOURCEONLY" != "0" ]; then
if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" \
@@ -1484,10 +1473,10 @@ fi
# fix flyspray bug #5973
if [ "$NODEPS" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1" ]; then
+ # no warning message needed for nobuild, repkg
if [ "$NODEPS" = "1" ]; then
warning "$(gettext "Skipping dependency checks.")"
fi
- # skip printing a warning message for the others: nobuild, repkg
elif [ $(type -p pacman) ]; then
unset pkgdeps # Set by resolve_deps() and used by remove_deps()
deperr=0
@@ -1513,7 +1502,7 @@ umask 0022
mkdir -p "$srcdir"
cd "$srcdir"
-if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
+if [ "$NOEXTRACT" = "1" ]; then
warning "$(gettext "Skipping source retrieval -- using existing src/ tree")"
warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")"
warning "$(gettext "Skipping source extraction -- using existing src/ tree")"
@@ -1522,11 +1511,11 @@ if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
error "$(gettext "The source directory is empty, there is nothing to build!")"
plain "$(gettext "Aborting...")"
exit 1
- elif [ "$REPKG" = "1" -a \( ! -d "$pkgdir" -o "$(ls "$pkgdir" 2>/dev/null)" = "" \) ]; then
- error "$(gettext "The package directory is empty, there is nothing to repackage!")"
- plain "$(gettext "Aborting...")"
- exit 1
fi
+elif [ "$REPKG" = "1" -a \( ! -d "$pkgdir" -o "$(ls "$pkgdir" 2>/dev/null)" = "" \) ]; then
+ error "$(gettext "The package directory is empty, there is nothing to repackage!")"
+ plain "$(gettext "Aborting...")"
+ exit 1
else
download_sources
check_checksums
@@ -1545,11 +1534,9 @@ else
mkdir -p "$pkgdir"
cd "$startdir"
+ # if we are root or if fakeroot is not enabled, then we don't use it
if [ "$(check_buildenv fakeroot)" != "y" -o $EUID -eq 0 ]; then
- # if we are root or if fakeroot is not enabled, then we don't use it
- if [ "$REPKG" = "1" ]; then
- warning "$(gettext "Skipping build.")"
- else
+ if [ "$REPKG" = "0" ]; then
devel_update
run_build
tidy_install