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>
This commit is contained in:
Allan McRae 2008-11-14 03:08:52 +10:00 committed by Dan McGee
parent 61c6552862
commit 69be73f68c

View file

@ -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 "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT"
plain "$(gettext "such as arch=('%s').")" "$CARCH" plain "$(gettext "such as arch=('%s').")" "$CARCH"
exit 1 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
fi fi
@ -1449,11 +1445,8 @@ if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" \
fi fi
# Run the bare minimum in fakeroot # Run the bare minimum in fakeroot
# fix flyspray bug 6208 -- using makepkg with fakeroot gives an error
if [ "$INFAKEROOT" = "1" ]; then if [ "$INFAKEROOT" = "1" ]; then
if [ "$REPKG" = "1" ]; then if [ "$REPKG" = "0" ]; then
warning "$(gettext "Skipping build.")"
else
run_build run_build
tidy_install tidy_install
fi fi
@ -1466,10 +1459,6 @@ fi
msg "$(gettext "Making package: %s")" "$pkgname $pkgver-$pkgrel $CARCH ($(date))" 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 we are creating a source-only package, go no further
if [ "$SOURCEONLY" != "0" ]; then if [ "$SOURCEONLY" != "0" ]; then
if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" \ if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" \
@ -1484,10 +1473,10 @@ fi
# fix flyspray bug #5973 # fix flyspray bug #5973
if [ "$NODEPS" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1" ]; then if [ "$NODEPS" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1" ]; then
# no warning message needed for nobuild, repkg
if [ "$NODEPS" = "1" ]; then if [ "$NODEPS" = "1" ]; then
warning "$(gettext "Skipping dependency checks.")" warning "$(gettext "Skipping dependency checks.")"
fi fi
# skip printing a warning message for the others: nobuild, repkg
elif [ $(type -p pacman) ]; then elif [ $(type -p pacman) ]; then
unset pkgdeps # Set by resolve_deps() and used by remove_deps() unset pkgdeps # Set by resolve_deps() and used by remove_deps()
deperr=0 deperr=0
@ -1513,7 +1502,7 @@ umask 0022
mkdir -p "$srcdir" mkdir -p "$srcdir"
cd "$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 retrieval -- using existing src/ tree")"
warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")" warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")"
warning "$(gettext "Skipping source extraction -- 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!")" error "$(gettext "The source directory is empty, there is nothing to build!")"
plain "$(gettext "Aborting...")" plain "$(gettext "Aborting...")"
exit 1 exit 1
fi
elif [ "$REPKG" = "1" -a \( ! -d "$pkgdir" -o "$(ls "$pkgdir" 2>/dev/null)" = "" \) ]; then 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!")" error "$(gettext "The package directory is empty, there is nothing to repackage!")"
plain "$(gettext "Aborting...")" plain "$(gettext "Aborting...")"
exit 1 exit 1
fi
else else
download_sources download_sources
check_checksums check_checksums
@ -1545,11 +1534,9 @@ else
mkdir -p "$pkgdir" mkdir -p "$pkgdir"
cd "$startdir" cd "$startdir"
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 we are root or if fakeroot is not enabled, then we don't use it
if [ "$REPKG" = "1" ]; then if [ "$(check_buildenv fakeroot)" != "y" -o $EUID -eq 0 ]; then
warning "$(gettext "Skipping build.")" if [ "$REPKG" = "0" ]; then
else
devel_update devel_update
run_build run_build
tidy_install tidy_install