summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-12-14 14:53:53 +0100
committerAllan McRae <allan@archlinux.org>2015-12-15 11:28:48 +0100
commit8454daa7feef14b660561f2434448d0b4ac0576d (patch)
tree79a1aea0abf4510e8f9940cebeec7cc6c0b6df92
parent686fae6d74c79310b5a8da04414a07ed9da299e1 (diff)
downloadpacman-8454daa7feef14b660561f2434448d0b4ac0576d.tar.gz
pacman-8454daa7feef14b660561f2434448d0b4ac0576d.tar.xz
makepkg: run pkgver() and prepare() with --noextract
Modifications made to the source before running with --noextract may alter the version string returned by pkgver(). Always run this function if present and check build status before proceeding. Fixes FS#46800. Also run prepare() when --noextract is used (unless --noprepare is specified). Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--doc/makepkg.8.txt10
-rw-r--r--scripts/makepkg.sh.in17
2 files changed, 14 insertions, 13 deletions
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index 2dff1b19..6f3f6b02 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -55,11 +55,11 @@ Options
installed.
*-e, \--noextract*::
- Do not extract source files or run the prepare() function (if present);
- use whatever source already exists in the $srcdir/ directory. This is
- handy if you want to go into $srcdir/ and manually patch or tweak code,
- then make a package out of the result. Keep in mind that creating a
- patch may be a better solution to allow others to use your PKGBUILD.
+ Do not extract source files; use whatever source already exists in the
+ $srcdir/ directory. This is handy if you want to go into $srcdir/ and
+ manually patch or tweak code, then make a package out of the result.
+ Keep in mind that creating a patch may be a better solution to allow
+ others to use your PKGBUILD.
*\--verifysource*::
For each source file in the source array of PKGBUILD, download the file
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d5853ceb..53163a2a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2205,14 +2205,15 @@ elif (( !REPKG )); then
fi
extract_sources
- if (( PKGVERFUNC )); then
- update_pkgver
- basever=$(get_full_version)
- check_build_status
- fi
- if (( PREPAREFUNC )); then
- run_prepare
- fi
+fi
+
+if (( PKGVERFUNC )); then
+ update_pkgver
+ basever=$(get_full_version)
+ check_build_status
+fi
+if (( PREPAREFUNC )); then
+ run_prepare
fi
if (( NOBUILD )); then