File 0003-quilt-switch-series-file-for-series.conf.patch of Package quilt-ks
From 1b45e38ac04b1aa5b48bfda6331dd6e302357d07 Mon Sep 17 00:00:00 2001
From: Benjamin Poirier <bpoirier@suse.de>
Date: Wed, 15 Mar 2017 09:54:52 -0700
Subject: [PATCH 3/5] quilt: switch series file for series.conf
This is meant to work in SUSE's kernel-source.git
---
quilt/scripts/patchfns.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index 793093a..3a88892 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -1185,6 +1185,18 @@ then
exit 1
fi
+ # If operating in an expanded tree from the kernel-source.git
+ # repository, replace a plain "series" file with a link to the source
+ # "series.conf" file. This will allow quilt commands which change the
+ # series file (like `quilt import`) to automatically update
+ # "series.conf".
+ if [ -r series ] && ! ( [ -L series ] &&
+ head -n1 series | grep -qv "^# Kernel patches configuration file$" ) &&
+ [ -r patches/series.conf ] &&
+ head -n1 patches/series.conf | grep -q "^# Kernel patches configuration file$"; then
+ ln -sf patches/series.conf series
+ fi
+
# Check if series file was modified manually, and if this is the case,
# make sure it is still consistent with the applied patches
if [ -s "$DB" -a ! "$DB" -nt "$SERIES" ] && [ "$QUILT_COMMAND" != pop ] && ! consistency_check
--
2.21.0