FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-26-2008, 06:27 AM
Allan McRae
 
Default Move geninteg block in makepkg before error checking

This pactch moves the generating of integrity checks to before any
error checking takes place in the PKGBUILD file. This allows integrity
generation to complete when unrelated errors exist in a PKGBUILD file
and allows the removal of multiple checks of the GENINTEG variable that
would otherwise be needed.

In addition a minor fix is made to a comment

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
---
scripts/makepkg.sh.in | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index cc44c68..38b22a5 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1187,8 +1187,7 @@ while true; do
done

if [ "$HOLDVER" = "1" -a "$FORCE_VER" != "" ]; then
- # The extra '--' is here to prevent gettext from thinking --holdver is
- # an option
+ # The '' is here to prevent gettext from thinking --holdver is an option
error "$(gettext "--holdver and --forcever cannot both be specified" )"
exit 1
fi
@@ -1288,6 +1287,14 @@ fi

source "$BUILDSCRIPT"

+if [ "$GENINTEG" = "1" ]; then
+ mkdir -p "$srcdir"
+ cd "$srcdir"
+ download_sources
+ generate_checksums
+ exit 0 # $E_OK
+fi
+
# check for no-no's in the build script
if [ -z "$pkgname" ]; then
error "$(gettext "%s is not allowed to be empty.")" "pkgname"
@@ -1340,7 +1347,7 @@ devel_check
devel_update

if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}"
- -a "$FORCE" = "0" -a "$GENINTEG" = "0" -a "$SOURCEONLY" = "0" ]; then
+ -a "$FORCE" = "0" -a "$SOURCEONLY" = "0" ]; then
if [ "$INSTALL" = "1" ]; then
warning "$(gettext "A package has already been built, installing existing package...")"
install_package
@@ -1386,11 +1393,11 @@ if [ "$SOURCEONLY" = "1" ]; then
fi

# fix flyspray bug #5973
-if [ "$NODEPS" = "1" -o "$GENINTEG" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1" ]; then
+if [ "$NODEPS" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1" ]; then
if [ "$NODEPS" = "1" ]; then
warning "$(gettext "Skipping dependency checks.")"
fi
- # skip printing a warning message for the others: geninteg, nobuild, repkg
+ # 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
@@ -1416,12 +1423,6 @@ umask 0022
mkdir -p "$srcdir"
cd "$srcdir"

-if [ "$GENINTEG" = "1" ]; then
- download_sources
- generate_checksums
- exit 0 # $E_OK
-fi
-
if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
warning "$(gettext "Skipping source retrieval -- using existing src/ tree")"
warning "$(gettext "Skipping source integrity checks -- using existing src/ tree")"
--
1.5.5.1


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 12:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org