On Wed, Apr 07, 2010 at 02:57:41PM +0200, Raphael Hertzog wrote: > On Wed, 07 Apr 2010, Osamu Aoki wrote: > > What is needed is documentation on dh_listpackages and its usage to sort > > out binary-indep and binary-arch difference for override commands. > > > > Otherwise, buildd may fail if they only install Build-Depends: (I vaguely > > remember, they install Build-Depends-Indep: too. But you never know.) > > I think you are confusing issues here. For override commands, the -i and > -a options of debhelper are implicitly passed through the environment > variable DH_INTERNAL_OPTIONS, that't the only difference I know between > overrides targets called in binary-indep vs binary-arch. > > buildd only install Build-Depends but they also build packages with > "dpkg-buildpackage -B" so that they call "debian/rules binary-arch" > (and not binary or binary-indep). So everything is fine on that regard > AFAIK. > > The hack using dh_listpackages that you quote might not even be needed > nowadays. If a commands receives -p<package> and has contradictory options > in DH_INTERNAL_OPTIONS, it will do nothing just like expected: > ┏rivendell:~/tmp/circuslinux-1.0.3 > ┗(522)$ DH_INTERNAL_OPTIONS="-i" dh_listpackages -pcircuslinux > dh_listpackages: No packages to build. > ┏rivendell:~/tmp/circuslinux-1.0.3 > ┗(523)$ DH_INTERNAL_OPTIONS="-a" dh_listpackages -pcircuslinux > circuslinux > ┏rivendell:~/tmp/circuslinux-1.0.3 > ┗(524)$ dh_listpackages > circuslinux > circuslinux-data
Well this only has Build-Depends: There is no extra packages needed for Build-Depends-indep: Yes for many dh_* command that, if a commands receives -p<package> and has contradictory options in DH_INTERNAL_OPTIONS, it will do nothing just like expected. The install to package building phase drop unneeded action automatically using this feature. But are you sure this holds for dh_auto_build. If buildd only install Build-Depends and dh_auto_build initiate doc building using latex listed in -indep, then we are in trouble. As I understand, it usually run $(MAKE) for any case. So if doc package needs latex-thingy in Build-Depends-indep, override_dh_auto_build needs to take care -i and -a issue providing separate target to $(MAKE) = dh_auto_build as: override_dh_auto_build: ifneq (,$(findstring one-for-arch, $(shell dh_listpackages))) dh_auto_build -- build-one-for-arch endif ifneq (,$(findstring one-for-doc, $(shell dh_listpackages))) dh_auto_build -- build-doc endif We can not use conditional on DH_INTERNAL_OPTIONS here to change behavior of override_dh_foo. This is because, debhelper maintainer Joey Hess told me so. He specifically pointed to this dh_listpackages. -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100407135105.ge9...@osamu.debian.net