Minor fixes in the patching system.
* Fix debian/rules to not be confused by ~/.quiltrc or QUILT_PATCHES (as in #369920). * Display which patches are applied and removed instead of just the first one (for #428090).
This commit is contained in:
parent
16d97b30b9
commit
e29b568209
|
@ -21,6 +21,11 @@
|
|||
# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
|
||||
export DH_OPTIONS
|
||||
|
||||
# force quilt to not use ~/.quiltrc
|
||||
QUILT = quilt --quiltrc /dev/null
|
||||
# force QUILT_PATCHES to the default in case it is exported in the environment
|
||||
QUILT_PATCHES = patches/
|
||||
|
||||
# Set up parameters for the upstream build environment.
|
||||
|
||||
# Determine (source) package name from Debian changelog.
|
||||
|
@ -140,9 +145,9 @@ $(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
|
|||
echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if quilt next >/dev/null 2>&1; then \
|
||||
if $(QUILT) next >/dev/null 2>&1; then \
|
||||
echo -n "Applying patches..."; \
|
||||
if quilt push -a -v 2>&1 | tee $(STAMP_DIR)/log/patch; then \
|
||||
if $(QUILT) push -a -v 2>&1 | tee $(STAMP_DIR)/log/patch; then \
|
||||
echo "successful."; \
|
||||
else \
|
||||
echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \
|
||||
|
@ -159,7 +164,7 @@ unpatch:
|
|||
rm -f $(STAMP_DIR)/patch
|
||||
@echo -n "Unapplying patches..."; \
|
||||
if [ -e $(STAMP_DIR)/patches/applied-patches ]; then \
|
||||
if quilt pop -a -v 2>&1 | tee $(STAMP_DIR)/log/unpatch; then \
|
||||
if $(QUILT) pop -a -v 2>&1 | tee $(STAMP_DIR)/log/unpatch; then \
|
||||
echo "successful."; \
|
||||
else \
|
||||
echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \
|
||||
|
@ -295,17 +300,17 @@ patch-audit: prepare unpatch
|
|||
@echo -n "Auditing patches..."; \
|
||||
>$(STAMP_DIR)/log/patch; \
|
||||
FUZZY=; \
|
||||
while [ -n "$$(quilt next)" ]; do \
|
||||
RESULT=$$(quilt push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
|
||||
while [ -n "$$($(QUILT) next)" ]; do \
|
||||
RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
|
||||
case "$$RESULT" in \
|
||||
succeeded) \
|
||||
echo "fuzzy patch: $$(quilt top)" \
|
||||
| tee -a $(STAMP_DIR)/log/$$(quilt top); \
|
||||
echo "fuzzy patch: $$($(QUILT) top)" \
|
||||
| tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \
|
||||
FUZZY=yes; \
|
||||
;; \
|
||||
FAILED) \
|
||||
echo "broken patch: $$(quilt next)" \
|
||||
| tee -a $(STAMP_DIR)/log/$$(quilt next); \
|
||||
echo "broken patch: $$($(QUILT) next)" \
|
||||
| tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \
|
||||
exit 1; \
|
||||
;; \
|
||||
esac; \
|
||||
|
|
Loading…
Reference in New Issue