Package: cdbs Version: 0.4.49 Severity: wishlist Tags: patch
Hi! I have recently had the need for having a list of packages that shouldn't be build under some conditions. I tried different things, like -Npackage in DH_OPTIONS, but failed. I ended up adapting buildvars.mk to my need - to support a DONT_BUILD var to contain packages that shouldn't be build. I think I have done it right - and I am currently using it in kdenetwork. It is there used as a workaround not being able to set Architecture: any !s390 in control file, as a negative list is easier to maintain than a positive list. so I wrap it in #if something DONT_BUILD =pkgname #endif in my rules file. I don't expect the final variable to be called DONT_BUILD, but it should be easy to change. Any comments welcome. /Sune -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (200, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.20-1-vserver-k7 (SMP w/1 CPU core) Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash cdbs depends on no packages. Versions of packages cdbs recommends: ii autotools-dev 20070306.1 Update infrastructure for config.{ ii debhelper 5.0.53 helper programs for debian/rules -- no debconf information
--- /usr/share/cdbs/1/rules/buildvars.mk 2007-05-20 18:13:10.000000000 +0200 +++ buildvars.mk 2007-07-10 21:35:51.000000000 +0200 @@ -35,25 +35,25 @@ # Split into arch/indep packages ifneq ($(DEB_INDEP_PACKAGES),cdbs) -DEB_INDEP_PACKAGES := $(strip $(shell $(_cdbs_scripts_path)/list-packages indep)) -DEB_ARCH_PACKAGES := $(filter-out $(DEB_INDEP_PACKAGES),$(strip $(shell $(_cdbs_scripts_path)/list-packages same))) +DEB_INDEP_PACKAGES := $(filter-out $(DONT_BUILD), $(strip $(shell $(_cdbs_scripts_path)/list-packages indep))) +DEB_ARCH_PACKAGES := $(filter-out $(DONT_BUILD), $(filter-out $(DEB_INDEP_PACKAGES),$(strip $(shell $(_cdbs_scripts_path)/list-packages same)))) endif # Split into normal and udeb packages ifeq ($(DEB_UDEB_PACKAGES),) -DEB_PACKAGES = $(filter-out %-udeb, $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES)) -DEB_UDEB_PACKAGES = $(filter %-udeb, $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES)) +DEB_PACKAGES = $(filter-out $(DONT_BUILD), $(filter-out %-udeb, $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES))) +DEB_UDEB_PACKAGES = $(filter-out $(DONT_BUILD),$(filter %-udeb, $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES))) else -DEB_PACKAGES = $(filter-out $(DEB_UDEB_PACKAGES), $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES)) +DEB_PACKAGES = $(filter-out $(DONT_BUILD), $(filter-out $(DEB_UDEB_PACKAGES), $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES))) endif # Too much bother for now. If someone complains we'll fix it. #DEB_ARCH_UDEB_PACKAGES = $(filter %-udeb, $(DEB_ARCH_PACKAGES)) #DEB_INDEP_UDEB_PACKAGES = $(filter %-udeb, $(DEB_INDEP_PACKAGES)) # A handy list of every package, udeb or not -DEB_ALL_PACKAGES = $(DEB_PACKAGES) $(DEB_UDEB_PACKAGES) -DEB_INDEP_REGULAR_PACKAGES = $(filter-out $(DEB_UDEB_PACKAGES),$(DEB_INDEP_PACKAGES)) -DEB_ARCH_REGULAR_PACKAGES = $(filter-out $(DEB_UDEB_PACKAGES),$(DEB_ARCH_PACKAGES)) +DEB_ALL_PACKAGES = $(filter-out $(DONT_BUILD),$(DEB_PACKAGES) $(DEB_UDEB_PACKAGES)) +DEB_INDEP_REGULAR_PACKAGES = $(filter-out $(DONT_BUILD), $(filter-out $(DEB_UDEB_PACKAGES),$(DEB_INDEP_PACKAGES))) +DEB_ARCH_REGULAR_PACKAGES = $(filter-out $(DONT_BUILD), $(filter-out $(DEB_UDEB_PACKAGES),$(DEB_ARCH_PACKAGES))) -DEB_DBG_PACKAGES = $(filter %-dbg, $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES)) +DEB_DBG_PACKAGES = $(filter-out $(DONT_BUILD), $(filter %-dbg, $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES))) # Some support for srcdir != builddir builds. # These are relative to the root of the package