summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Winkelmann <jw@smts.ch>2010-05-23 17:38:31 +0200
committerTilman Sauerbeck <tilman@crux.nu>2010-05-23 17:38:31 +0200
commit163aacb1ff22837484088c1b41272684df7fc2f2 (patch)
tree3f4bf694dce3076e9e6cb6ea5c63703b2acc5c77
parent37c478ef8b53608ffa9cfdedac2f65a2287ac5b9 (diff)
downloadpkgutils-163aacb1ff22837484088c1b41272684df7fc2f2.tar.gz
pkgutils-163aacb1ff22837484088c1b41272684df7fc2f2.tar.xz
Bug #221: pkgmk optionally now only warns about new files in a footprint.
-rw-r--r--pkgmk.8.in3
-rw-r--r--pkgmk.conf1
-rwxr-xr-xpkgmk.in13
3 files changed, 15 insertions, 2 deletions
diff --git a/pkgmk.8.in b/pkgmk.8.in
index b9fca263..33ac2b01 100644
--- a/pkgmk.8.in
+++ b/pkgmk.8.in
@@ -43,6 +43,9 @@ Update footprint and treat last build as successful.
.B "\-if, \-\-ignore\-footprint"
Build package without checking footprint.
.TP
+.B "\-in, \-\-ignore\-new"
+Build package, ignore new files in a footprint mismatch.
+.TP
.B "\-um, \-\-update\-md5sum"
Update md5sum using the current source files.
.TP
diff --git a/pkgmk.conf b/pkgmk.conf
index 0fc31767..3137a67f 100644
--- a/pkgmk.conf
+++ b/pkgmk.conf
@@ -11,6 +11,7 @@ export CXXFLAGS="-O2 -march=i686 -pipe"
# PKGMK_WORK_DIR="$PWD/work"
# PKGMK_DOWNLOAD="no"
# PKGMK_IGNORE_FOOTPRINT="no"
+# PKGMK_IGNORE_NEW="no"
# PKGMK_NO_STRIP="no"
# PKGMK_WGET_OPTS=""
# PKGMK_COMPRESSION_MODE="gz"
diff --git a/pkgmk.in b/pkgmk.in
index 2a6a27d1..13cf2d0f 100755
--- a/pkgmk.in
+++ b/pkgmk.in
@@ -318,9 +318,14 @@ check_footprint() {
sed 's/^+/NEW /g' | \
sed 's/^-/MISSING /g' > $FILE.footprint.diff
if [ -s $FILE.footprint.diff ]; then
- error "Footprint mismatch found:"
+ if [ "$PKGMK_IGNORE_NEW" = "yes" ] && \
+ [ -z "$(egrep -l ^MISSING $FILE.footprint.diff)" ] ; then
+ info "New files found:"
+ else
+ error "Footprint mismatch found:"
+ BUILD_SUCCESSFUL="no"
+ fi
cat $FILE.footprint.diff >&2
- BUILD_SUCCESSFUL="no"
fi
else
warning "Footprint not found, creating new."
@@ -521,6 +526,7 @@ print_help() {
echo " -utd, --up-to-date do not build, only check if package is up to date"
echo " -uf, --update-footprint update footprint using result from last build"
echo " -if, --ignore-footprint build package without checking footprint"
+ echo " -in, --ignore-new build package, ignore new files in a footprint missmatch"
echo " -um, --update-md5sum update md5sum"
echo " -im, --ignore-md5sum build package without checking md5sum"
echo " -cm, --check-md5sum do not build, only check md5sum"
@@ -555,6 +561,8 @@ parse_options() {
PKGMK_UPDATE_FOOTPRINT="yes" ;;
-if|--ignore-footprint)
PKGMK_IGNORE_FOOTPRINT="yes" ;;
+ -in|--ignore-new)
+ PKGMK_IGNORE_NEW="yes" ;;
-um|--update-md5sum)
PKGMK_UPDATE_MD5SUM="yes" ;;
-im|--ignore-md5sum)
@@ -707,6 +715,7 @@ PKGMK_EXTRACT_ONLY="no"
PKGMK_UP_TO_DATE="no"
PKGMK_UPDATE_FOOTPRINT="no"
PKGMK_IGNORE_FOOTPRINT="no"
+PKGMK_IGNORE_NEW="no"
PKGMK_FORCE="no"
PKGMK_KEEP_WORK="no"
PKGMK_UPDATE_MD5SUM="no"

Generated by cgit