Your message dated Tue, 31 Jan 2012 16:48:58 +0100
with message-id <[email protected]>
and subject line dpatch: closing old wontfix bugs
has caused the Debian Bug report #342768,
regarding [patch] dpatch: allow -p0 format patches
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
342768: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342768
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpatch
Version: 2.0.16
Severity: wishlist
Tags: patch
I suddenly realised a couple weeks ago that I think -p0 format patches
look nicer than -p1 format patches, especially in a closed system like
dpatch where there's no possible confusion about what project or
version a patch applies to.
So I changed dpatch-edit-patch and dpatch-run to generate and use -p0
patches with a simple configure option, "DPATCH_pLEVEL=0" in 00options.
(I'd also like an option to eliminate timestamps on patch headers, but
one thing at a time.)
I have not written documentation or tests for this, because I figured
it would be a waste of time if you did not want this feature. So the
attached patch is, in that way, incomplete. Please let me know if you
want to add my code, so I can finish it with docs and a test.
Thanks.
--- orig/dpatch/dpatch.lib.shpp
+++ mod/dpatch/dpatch.lib.shpp
@@ -4,20 +4,24 @@
dpatch_lib_patch ()
{
- if test "x${DPATCH_LIB_NO_DEFAULT}" = "x"; then
+ if test -n "$DPATCH_LIB_NO_DEFAULT"; then
+ dpatch_patch $*
+ elif test -n "$DPATCH_pLEVEL"; then
+ patch -p$DPATCH_pLEVEL $*
+ else
patch -p1 $*
- return
fi
- dpatch_patch $*
}
dpatch_lib_unpatch ()
{
- if test "x${DPATCH_LIB_NO_DEFAULT}" = "x"; then
+ if test -n "$DPATCH_LIB_NO_DEFAULT"; then
+ dpatch_unpatch $*
+ elif test -n "$DPATCH_pLEVEL"; then
+ patch -p$DPATCH_pLEVEL -R $*
+ else
patch -p1 -R $*
- return
fi
- dpatch_unpatch $*
}
--- orig/dpatch/dpatch.shpp
+++ mod/dpatch/dpatch.shpp
@@ -61,6 +61,13 @@
esac
shift
;;
+ -p?)
+ DPATCH_CLI_pLEVEL=${1#-p}
+ ;;
+ -p)
+ DPATCH_CLI_pLEVEL=$2
+ shift
+ ;;
-*)
echo "dpatch: Unsupported global option: $1" >&2
exit 1
@@ -85,6 +92,21 @@
DPATCH_OPTION_CPP=1
unset DPATCH_CLI_OPTION_CPP
fi
+if [ "$DPATCH_CLI_pLEVEL" != "" ]; then
+ DPATCH_pLEVEL=$DPATCH_CLI_pLEVEL
+ unset DPATCH_CLI_pLEVEL
+fi
+case "$DPATCH_pLEVEL" in
+ "") DPATCH_pLEVEL=1 ;;
+ 0 | 1) ;;
+ *)
+ echo >&2 "dpatch: Unsupported level \`-p$DPATCH_pLEVEL'" \
+ "(only -p0 and -p1 are supported)"
+ exit 1
+ ;;
+esac
+export DPATCH_pLEVEL
+
# Check that we have everything we need, up until this point.
if ! dpatch_requisites; then
--- orig/dpatch/dpatch_help.shpp
+++ mod/dpatch/dpatch_help.shpp
@@ -188,6 +188,7 @@
--workdir, -d <dir> Do everything in the given directory.
--strict, -S Work in strict mode, exiting on warnings too.
--force, -F Force applying or deapplying a patch.
+ -p0, -p1 Call patch with -p0 or -p1 (default -p1) in dpatch-run.
Commands:
apply (apply-all, apply-until)
--- orig/dpep/dpatch-edit-patch
+++ mod/dpep/dpatch-edit-patch
@@ -285,9 +285,18 @@
DIFFHOLDER="$(tempfile -d "$WORKDIR" -p "dpep." -s ".diff")"
dpep_message debug1 "Diff temporary file is $DIFFHOLDER"
cd "$REFDIR"
-diff -urNad $DPEP_DIFF_EXCLUDE . "$WORKDIR/$(basename "$DPEP_SOURCEDIR")" |
- sed -e "/^--- \|^diff /s: \./: $(basename "$DPEP_SOURCEDIR")~/:" \
- -e "/^+++ \|^diff /s: $WORKDIR/: :" \
+ptext=$(basename "$DPEP_SOURCEDIR")/
+workd=$WORKDIR/$(basename "$DPEP_SOURCEDIR")
+case "$DPATCH_pLEVEL" in
+ 0) ptext= ;;
+ 1 | "") ;;
+ *) dpep_message warn \
+ "Unsupported value DPATCH_pLEVEL='$DPATCH_pLEVEL' (must be 0 or 1)"
+ ;;
+esac
+diff -urNad $DPEP_DIFF_EXCLUDE . "$workd" |
+ sed -e "/^--- \|^diff /s: \./: $ptext:" \
+ -e "/^+++ \|^diff /s: $workd/: $ptext:" \
-e "/^diff /s: $DPEP_DIFF_EXCLUDE::" > "$DIFFHOLDER" || true
# Diff created, let's switch back to the original directory, and start the
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Hi!
I'm closing a few of age-old bugs filed against dpatch, which have been
marked wontfix for a while now, and which I consider safe to close for
one reason or the other.
These are:
#358019: As explained in my wontfix mail, I don't consider this fixable,
and it's better 'fixed' in another way: changing one's workflow.
#400897: The examples are meant to be simple, and showcase the
defaults. If one deviates from the defaults, then he must take care of
the side-effects too, dpatch is not going to guard against
corner-cases. That is, this isn't a bug, but a design decision.
#217299: See David's explanation from 2004. I'm closing the bug, since
there were no followups anyway.
#328391: Since dpatch-getorigtargz was removed, -b cannot be made
default, therefore I'm closing the bug. dpep wasn't meant to do
everything on behalf of the user anyway.
#330808: No response since 2005, and dpatch was meant to handle
dpatches, and dpatches alone. Furthermore, migrating from dpatch (where
the dpatches are all patch files) to another patch system is trivial,
you can just drop the files there and done. All dpatch scripts that use
the default template are also valid patch files.
#342768: This is actually two feature requests, the first part of which
has been supported by dpatch for ages, the other requires tweaking
dpatch-edit-patch, which would be more effort than the gain. The bug
hasn't seen any noticable traffic since 2005, not even after my spam
late last year, so I'm closing it now.
#345900: 00list is a design decision, it's going to stay.
#531607: dpatch wasn't designed to be able to group patches together,
that would be a larger feature, one which I don't want to do. One can
already achieve something similar, it's just that dpatch apply-all
won't work. But, this is by design, and is going to stay that way.
--
|8]
--- End Message ---