aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2016-09-06 11:50:57 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2016-09-06 11:50:57 +0100
commit41383c91c3b352681dc97aa6c1ad48caaaf23ecb (patch)
tree0beec7ddb2bffa91b57eeee3f6960732b719bce2
parentdd9a7f9a6f3f7de50efa2bf858686c9e6bf75312 (diff)
Restore d/control via sed rather than control.orig
When the binary kernel module build is enabled, a new package is autogenerated. This requires adding it to the debian/control file, and then cleaning it up. Doing this via a backup debian/control.orig file that is gitignored is error prone and can lead to changes being inadvertently and silently overwritten. Use a sed expression to remove the exact autogenerated snippet instead to avoid this issue. Change-Id: If04c25d2b267f654475567b78a36fd1de8318d76 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
-rw-r--r--debian/.gitignore1
-rw-r--r--debian/control1
-rw-r--r--debian/control.modules.in1
-rwxr-xr-xdebian/rules5
4 files changed, 3 insertions, 5 deletions
diff --git a/debian/.gitignore b/debian/.gitignore
index 4c32c181..269a9fb4 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -6,7 +6,6 @@
*.dkms.debhelper
build/
control.modules
-control.orig
dpdk-dev/
dpdk-doc/
dpdk-igb-uio-dkms/
diff --git a/debian/control b/debian/control
index 2b59fedb..e77cece0 100644
--- a/debian/control
+++ b/debian/control
@@ -714,3 +714,4 @@ Description: Data Plane Development Kit (librte_pdump runtime library)
DPDK is a set of libraries for fast packet processing. Applications run
in user-space and communicate directly with dedicated network interfaces.
This package contains the runtime libraries for librte_pdump
+
diff --git a/debian/control.modules.in b/debian/control.modules.in
index 93148b60..28ace967 100644
--- a/debian/control.modules.in
+++ b/debian/control.modules.in
@@ -1,4 +1,3 @@
-
Package: dpdk-modules-#KVERS#
Section: kernel
Architecture: amd64 arm64 i386
diff --git a/debian/rules b/debian/rules
index b982b245..d4b09dfe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -81,8 +81,7 @@ build:
exit 1; \
fi
sh debian/prep-modules $(KSRC)
- test -f debian/control.orig || cp -v debian/control debian/control.orig
- cat debian/control.orig debian/control.modules > debian/control
+ cat debian/control.modules >> debian/control
dh $@ --with python2,dkms
endif
@@ -92,7 +91,7 @@ endif
override_dh_auto_clean:
rm -rf debian/build debian/tmp debian/dpdk-modules-* \
debian/control.modules debian/VERSION
- mv debian/control.orig debian/control || true
+ sed -i '/Package: dpdk-modules-/,/`tail -n1 debian/control.modules.in`/d' debian/control
override_dh_auto_configure:
# report dpkg-buildflags status to build log