diff options
-rw-r--r-- | quilt.changes | 4 | ||||
-rw-r--r-- | quilt/fork.in | 17 |
2 files changed, 12 insertions, 9 deletions
diff --git a/quilt.changes b/quilt.changes index 0f7a470..d5e320a 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,8 +1,10 @@ ------------------------------------------------------------------- -Sun Sep 12 17:08:31 CEST 2004 - agruen@suse.de +Sun Sep 12 18:33:07 CEST 2004 - agruen@suse.de - scripts/inspect.in: Run the RPM %prep section in /var/tmp and not in /tmp: the sources can become large. +- The fork command at some point broke and did not insert the + "serial number" in the right place in patch names anymore. ------------------------------------------------------------------- Wed Aug 25 13:40:39 CEST 2004 - agruen@suse.de diff --git a/quilt/fork.in b/quilt/fork.in index 10a7e1a..2dbd333 100644 --- a/quilt/fork.in +++ b/quilt/fork.in @@ -70,16 +70,17 @@ if [ $# -eq 1 ] then new_patch="$1" else - set -- $(echo "$top_patch" \ - | @SED@ -e 's: :\ :g' -e 's:-\([0-9]\+\)$: \1:') - if [ $# -eq 1 ]; then - new_patch="$1-2" + base=$(echo "$top_patch" \ + | @SED@ -e 's:\(\|\.diff\?\|\.patch\)\(\|\.gz\|\.bz2\)$::') + num=$(echo "$base" \ + | @SED@ -ne 's:.*\(-[0-9]\+\)$:\1:'p) + if [ -n "$num" ] + then + new_patch="${base:0:${#base}-${#num}}-$((${num:1}+1))" else - new_patch="$1-$[$2+1]" + new_patch="$base-2" fi - base=$(echo $top_patch \ - | @SED@ -e 's:\(\|\.diff\?\|\.patch\)\(\|\.gz\|\.bz2\)$::') - new_patch="$new_patch${top_patch#$base}" + new_patch="$new_patch${top_patch:${#base}}" fi new_patch=${new_patch#$QUILT_PATCHES/} |