diff options
author | Allan McRae <mcrae_allan@hotmail.com> | 2008-05-26 16:27:22 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-06-14 08:35:40 -0500 |
commit | c11bdf19b1b8ab40468561dc592b9c6bd7f86acf (patch) | |
tree | cfffe51277a3ef3af217e3ab8e93c7930ef8a56c /scripts/makepkg.sh.in | |
parent | 7313c8546ae0a2c38768d665b3f314ee0cf959c4 (diff) | |
download | pacman-c11bdf19b1b8ab40468561dc592b9c6bd7f86acf.tar.xz |
Move geninteg block in makepkg before error checking
This patch 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>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | 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 5bdc5bc9..e38f8a98 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1203,8 +1203,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 '\\0' is here to prevent gettext from thinking --holdver is an option error "$(gettext "\\0--holdver and --forcever cannot both be specified" )" exit 1 fi @@ -1297,6 +1296,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" @@ -1368,7 +1375,7 @@ devel_check devel_update if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" \ - -a "$FORCE" = "0" -a "$GENINTEG" = "0" -a "$SOURCEONLY" = "0" -a "$NOBUILD" = "0" ]; then + -a "$FORCE" = "0" -a "$SOURCEONLY" = "0" -a "$NOBUILD" = "0" ]; then if [ "$INSTALL" = "1" ]; then warning "$(gettext "A package has already been built, installing existing package...")" install_package @@ -1414,11 +1421,11 @@ if [ "$SOURCEONLY" != "0" ]; 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 @@ -1444,12 +1451,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")" |