diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2016-09-06 11:50:57 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2016-09-06 11:50:57 +0100 |
commit | 41383c91c3b352681dc97aa6c1ad48caaaf23ecb (patch) | |
tree | 0beec7ddb2bffa91b57eeee3f6960732b719bce2 /debian/rules | |
parent | dd9a7f9a6f3f7de50efa2bf858686c9e6bf75312 (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>
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 5 |
1 files changed, 2 insertions, 3 deletions
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 |