On Thu, Sep 08, 2011 at 04:09:42PM -0400, Joey Hess wrote:
> Yann Dirson wrote:
> > Hm, having configure step as part of the build actions, as opposed to
> > being actions of a configure-specific target like has been done since
> > a number of years, would probably be useful to mention in the dh
> > manpage.
> 
> I'm not familiar with such a target.

Well, the kind of "config.status" target, that precisely allows the
configure script to be run only once.


> > In fact the list of supported sequences that one can get by calling
> > "dh foo" would be good to have in the manpage.
> 
> Perhaps in the first paragraph like it does now?

/me hides


> > Similarly, the precise
> > relation between build/install/binary and their -arch/-indep
> > counterparts could be more precisely described
> 
> I believe that the second paragraph of the man page does so, to the extent
> that users of dh need to worry about it. Unless it's somehow not clear that
> eg binary is a union of binary-arch and binary-indep.

Maybe mention (at least it is how I understand it) that <foo> depends
on both <foo>-binary and <foo>-arch, whether the ordering of -binary
and -arch is specified or if the user should avoid to rely on the
order, and if so a suggested test workflow to ensure that
(eg. dh_clean && debian/rules binary-arch && dh_clean && debian/rules
binary-indep - if you can confirm that is supposed to check what I
expect it to).

And maybe insist on the fact that because of this, "binary" does not
depend on "build".


To continue with my tulip rules files and my struggle to understand
when dh runs what, I am currently trying the following - under the
idea that "dh install-arch" will run dh_install:

|build-arch:
|       dh $@
|       docbook-to-man debian/tulip.sgml > debian/tulip.1
|install-arch:
|       install -D debian/tulip.1 debian/tmp/usr/share/man/man1/tulip.1
|       dh $@
|override_dh_install:
|       dh_install --fail-missing

However, it fails showing that install-arch does not indeed depend on
build-arch, since my "install" command gets run much too early.

This is not what I understood when reading in the last example:

> dh will arrange for "debian/rules build" to call your build-indep and
> build-arch targets. You do not need to explicitly define those
> dependencies in the rules file when using dh with compatibility level
> v9.

|$ dh_clean && fakeroot ./debian/rules binary-arch
|dh binary-arch --parallel
|   debian/rules install-arch
|make[1]: Entering directory `/work/yann/deb/tulip/tulip-git'
|install -D debian/tulip.1 debian/tmp/usr/share/man/man1/tulip.1
|dh install-arch
|   debian/rules build-arch
|[...]
|   dh_auto_test -a
|docbook-to-man debian/tulip.sgml > debian/tulip.1
|make[2]: Leaving directory `/work/yann/deb/tulip/tulip-git'
|   dh_testroot -a
|   dh_prep -a
|   dh_installdirs -a
|   dh_auto_install -a
make[2]: Entering directory 
`/work/yann/deb/tulip/tulip-git/obj-x86_64-linux-gnu'
|[...]
|make[2]: Leaving directory 
`/work/yann/deb/tulip/tulip-git/obj-x86_64-linux-gnu'
|   debian/rules override_dh_install
|make[2]: Entering directory `/work/yann/deb/tulip/tulip-git'
|dh_install --fail-missing
|cp: cannot stat `debian/tmp/usr/share/man/man1/tulip.1': No such file or 
directory
|dh_install: cp -a debian/tmp/usr/share/man/man1/tulip.1 
debian/tulip//usr/share/man/man1/ returned exit code 1
|make[2]: *** [override_dh_install] Error 2
|make[2]: Leaving directory `/work/yann/deb/tulip/tulip-git'
|make[1]: *** [install-arch] Error 2
|make[1]: Leaving directory `/work/yann/deb/tulip/tulip-git'
|make: *** [binary-arch] Error 2

if now I re-run, it *does* run my command, presumably because now it
knows that all the build-arch steps have been done:

|yann@home:tulip-git (patches)$ fakeroot ./debian/rules binary-arch
|dh binary-arch --parallel
|   debian/rules install-arch
|make[1]: Entering directory `/work/yann/deb/tulip/tulip-git'
|install -D debian/tulip.1 debian/tmp/usr/share/man/man1/tulip.1
|dh install-arch
|   debian/rules override_dh_install
|make[2]: Entering directory `/work/yann/deb/tulip/tulip-git'
|dh_install --fail-missing


I tried to add an "install-arch: build-arch" dep, but it still causes
strange things:

|docbook-to-man debian/tulip.sgml > debian/tulip.1
|install -D debian/tulip.1 debian/tmp/usr/share/man/man1/tulip.1
|dh install-arch
|   debian/rules build-arch
|make[2]: Entering directory `/work/yann/deb/tulip/tulip-git'
|dh build-arch
|docbook-to-man debian/tulip.sgml > debian/tulip.1
|make[2]: Leaving directory `/work/yann/deb/tulip/tulip-git'
|   dh_testroot -a
|   dh_prep -a

... which still nukes my debian/tmp

so in short:

* I cannot insert my installs _after_ "dh $@", since dh_prep will nuke
  it
* I cannot insert them _before_ it, since "dh_install" would run first
* I have no arch-specific override to put them where I'd like to

gasp... did I find the reason to add those arch-specific overrides ?

Best regards,
-- 
Yann



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to