Control: merge 990824 992082 On 2021-07-08, Nicolas Boulenguez wrote: > This idea has been discussed since #979296, but the initial > implementation was incompatible with the way dpkg-buildpackage breaks > the command line given by its rules-file option.
> From 4852e3a3e00246413d8e38667b7b5d67fadefc50 Mon Sep 17 00:00:00 2001 > From: Nicolas Boulenguez <nico...@debian.org> > Date: Thu, 8 Jul 2021 17:11:19 +0200 > Subject: [PATCH] debian/rules: Filter packages and platforms without build > profiles > > This idea has been discussed since #979296, but the initial > implementation was incompatible with dpkg-buildpackage. > > All three variants should now work: > > debian/rules package_filter=u-boot/%rockchip/%sunxi > platform_filter=%-rk3399/a64-olinuxino% > dpkg-buildpackage '--rules-file=debian/rules package_filter=...' > sbuild '--debbuildopt=--rules-file=debian/rules package_filter=...' > --- > debian/rules | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/debian/rules b/debian/rules > index 244956f6cc..e14e2cafb3 100755 > --- a/debian/rules > +++ b/debian/rules > @@ -28,22 +28,20 @@ notools := $(filter > pkg.uboot.notools,$(DEB_BUILD_PROFILES)) > > subarchs := $(shell dh_listpackages --arch --no-package=u-boot-tools) > > -# Each .deb P in subarch contains $(P_platforms). > -# These profiles remove values from $(P_platforms) for debugging. > - > -# DEB_BUILD_PROFILES='pkg.uboot.subarch.P1 pkg.uboot.subarch.P2' > -# removes all platforms but in packages u-boot-P1 u-boot-P2. > -only_subarchs := $(patsubst pkg.uboot.subarch.%,u-boot-%,\ > - $(filter pkg.uboot.subarch.%,$(DEB_BUILD_PROFILES))) > +# For debugging purposes, some filters may restrict the actually built > +# platforms. The expected contents are Make patterns (with at most > +# one % wildcard), separated by / (because spaces are difficult to > +# escape from dpkg-buildpackage --rules-file). > +# package_filter=u-boot/%amlogic/%mvebu > +# platform_filter=khadas-vim% > + > +only_subarchs := $(subst /, ,$(package_filter)) > ifneq (,$(only_subarchs)) > $(foreach pkg,$(filter-out $(only_subarchs),$(subarchs)),$(eval \ > $(pkg)_platforms :=)) > endif > > -# DEB_BUILD_PROFILES='pkg.uboot.platform.P1 pkg.uboot.platform.P2' > -# removes all platforms but P1 P2. > -only_platforms := $(patsubst pkg.uboot.platform.%,%,\ > - $(filter pkg.uboot.platform.%,$(DEB_BUILD_PROFILES))) > +only_platforms := $(subst /, ,$(platform_filter)) > ifneq (,$(only_platforms)) > $(foreach pkg,$(subarchs),$(eval \ > $(pkg)_platforms := $(filter $(only_platforms),$($(pkg)_platforms)))) > -- > 2.30.2
signature.asc
Description: PGP signature