On Sun, Jun 17, 2018 at 04:20:09PM +0300, Nadav Ruskin wrote:
> Thank you for the quick and concise reply. I was looking at DH_INSTALL(1)
> instead. Why is the documentation split between the two files?

Because it's not "split between two files": the details in debhelper(7)
are about *all* the dh_* commands, not just dh_install.
There is an open bug about having some details like this one shared
between all the dh_* manpages, but the debhelper maintainer of course
wants to avoid having the documentation duplicated amongst dozens of
files.

> Also,
> looking back at DH_INSTALL(1) I see a line that appears to be contradicting
> the documentation in debhelper(7):
> 
> > dh_install cannot rename files or directories, it can only install them
> > with the names they already have into wherever you want in the package
> > build tree.
> > However, renaming can be achieved by using dh-exec with compatibility
> > level 9 or later. An example debian/ package.install file using dh-exec
> > could look like:
> >  #!/usr/bin/dh-exec
> >  debian/default.conf => /etc/my-package/start.conf
> > Please remember the following three things:
> > •
> > The package must be using compatibility level 9 or later (see
> > debhelper(7))
> > •
> > The package will need a build-dependency on dh-exec.
> > •
> > The install file must be marked as executable.
> 
> This requires the ".install" file to be both an executable and have a
> simple syntax. Here's another question, is there documentation to how these
> executable install scripts are supposed to look? I wouldn't know where to
> start.

How is this contradicting?  It's one possible use of the "executable
config file" feature.

And what of the documentation in debhelper(7) is not clear enough of how
the executable install scripts should "look"?  (which is probably the
wrong question, as debhelper obviously doesn't care about their look,
rather their output).

> In any way, I find the documentation to be lacking. There should be a big
> red flag on setting the ".install" file as an executable. I was not able to
> find the answer to my woes in online or offline resources for days of work.
> An error message saying "Are you sure foo.install is meant to be run as an
> executable"? would be nice,

At which point would you emit said error?

If you are hitting issues like this, I recommend you ask for support on
the IRC channel #packaging on OFTC, there you could have had this answer
in few minutes (if you are lucky somebody is online in that moment,
which usually is the case) :)

> however if such practice is frowned upon a
> notice that is more than a side note in the docs will make a big
> difference.

It's not frowned upon, why would it?
As a matter of fact, it's often a detail considered hard to imagine,
because nobody creates executable files by mistake...

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

Reply via email to