summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/patchfns.in21
-rwxr-xr-xscripts/rpatch.in3
2 files changed, 23 insertions, 1 deletions
diff --git a/scripts/patchfns.in b/scripts/patchfns.in
index 38d08a9..5f5bcde 100644
--- a/scripts/patchfns.in
+++ b/scripts/patchfns.in
@@ -267,6 +267,27 @@ rename_in_series()
rm -f $tmpfile
}
+rename_in_db()
+{
+ local from=$1 to=$2
+ local tmpfile
+ tmpfile=$(gen_tempfile) || return 1
+ /usr/bin/gawk '
+ /^'"$(quote_re $from)"'$/ \
+ { sub(/'"$(quote_re $from)"'/, "'"${to//\"/\\\"}"'")
+ print
+ good=1 }
+ END { exit(! good) }
+ ' $DB > $tmpfile
+ if [ $? -eq 0 ]
+ then
+ mv -f $tmpfile $DB
+ else
+ rm -f $tmpfile
+ return 1
+ fi
+}
+
backup_file_name()
{
local patch=$1
diff --git a/scripts/rpatch.in b/scripts/rpatch.in
index e3882a9..9b5d6e7 100755
--- a/scripts/rpatch.in
+++ b/scripts/rpatch.in
@@ -130,7 +130,8 @@ rpatch()
then
echo $"Removing $patch"
rm -f "$QUILT_PC/$patch/.timestamp"
- @LIB@/backup-files $silent -f $pc_file -B $QUILT_PC/$patch/ -r
+ @LIB@/backup-files $silent -r -L -f $pc_file \
+ -B $QUILT_PC/$patch/
status=$?
remove_from_db $patch
rm -f $QUILT_PC/$patch~refresh