summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2010-06-23 13:41:20 +0200
committerJean Delvare <jdelvare@suse.de>2010-06-23 13:41:20 +0200
commit4c0720e4607cd0c0f90edd920943776839fe04a9 (patch)
tree374ac47372c3d04834ff8a934b9aaa34d7fb7479
parentee6f6f2382bce837898c3ec324e244333bcaff41 (diff)
downloadquilt-4c0720e4607cd0c0f90edd920943776839fe04a9.tar.gz
Add a --fuzz parameter to quilt setup and inspect
Let quilt setup and inspect overrule the _default_patch_fuzz setting of rpmbuild, by adding a --fuzz option to both. This is particularly useful when working on an old source tree with a recent version of patch which defaults to fuzz 0.
-rw-r--r--quilt.changes6
-rw-r--r--quilt/scripts/inspect.in9
-rw-r--r--quilt/setup.in12
3 files changed, 22 insertions, 5 deletions
diff --git a/quilt.changes b/quilt.changes
index eaecd8d..8bf6208 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Jun 23 13:16:45 CEST 2010 - jdelvare@suse.de
+
+- quilt/setup.in, quilt/scripts/inspect.in: Add a --fuzz parameter
+ to quilt setup and inspect.
+
+-------------------------------------------------------------------
Sun Feb 14 23:08:24 CET 2010 - agruen@suse.de
- doc/main-rus.tex: Add a russion translation of the quilt paper
diff --git a/quilt/scripts/inspect.in b/quilt/scripts/inspect.in
index 471669d..41ac92f 100644
--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -17,11 +17,11 @@ fi
cd ${SUBDIR:-.}
usage() {
- echo "Usage: ${0##*/} specfile"
+ echo "Usage: ${0##*/} [--fuzz=N] specfile"
exit 1
}
-options=$(getopt -o v --long sourcedir: -n "${0##*/}" -- "$@") || exit
+options=$(getopt -o v --long sourcedir:,fuzz: -n "${0##*/}" -- "$@") || exit
eval set -- "$options"
@@ -36,6 +36,10 @@ do
--sourcedir)
sourcedir=${2%/}/
shift 2 ;;
+ --fuzz)
+ # Only works with rpm 4.6 and later
+ DEFINE_FUZZ="%define _default_patch_fuzz $2"
+ shift 2 ;;
--)
shift
break ;;
@@ -309,6 +313,7 @@ rpmbuild --eval "%define _sourcedir $sourcedir" \
--eval "%define _builddir $tmpdir/build" \
--eval "%define __patch $tmpdir/bin/patch" \
--eval "%define __tar $tmpdir/bin/tar" \
+ --eval "$DEFINE_FUZZ" \
--nodeps \
-bp "$specdir/$specfile" < /dev/null >&2
status=$?
diff --git a/quilt/setup.in b/quilt/setup.in
index 5db6435..acd4ea2 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -72,7 +72,7 @@ create_symlink() {
usage()
{
- printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|seriesfile}\n"
+ printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] [--fuzz=N] {specfile|seriesfile}\n"
if [ x$1 = x-h ]
then
printf $"
@@ -84,6 +84,9 @@ Initializes a source tree from an rpm spec file or a quilt series file.
Directory that contains the package sources. Defaults to \`.'.
-v Verbose debug output.
+
+--fuzz=N
+ Set the maximum fuzz factor (needs rpm 4.6 or later).
"
exit 0
else
@@ -91,7 +94,7 @@ Initializes a source tree from an rpm spec file or a quilt series file.
fi
}
-options=`getopt -o d:vh --long sourcedir: -- "$@"`
+options=`getopt -o d:vh --long sourcedir:,fuzz: -- "$@"`
if [ $? -ne 0 ]
then
@@ -117,6 +120,9 @@ do
--sourcedir)
sourcedir=${2%/}/
shift 2 ;;
+ --fuzz)
+ opt_fuzz="--fuzz $2"
+ shift 2 ;;
--)
shift
break ;;
@@ -137,7 +143,7 @@ case "$1" in
*.spec)
spec_file=$1
- if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir \
+ if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \
"$spec_file" 2>&1 > $tmpfile
then
printf $"The %%prep section of %s failed; results may be incomplete\n" "$spec_file"