FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 12-16-2011, 08:50 AM
Goswin von Brederlow
 
Default Getting dh_install to do what we need

Joey Hess <joeyh@debian.org> writes:

> Gergely Nagy wrote:
>> At the moment, I have something that works like this:
>>
>> ,----
>> | #! /usr/bin/dh-exec-install
>> | # The next one will simply echo it back to dh_install
>> | source-file /dest-dir/
>> |
>> | # This one will copy the file itself, following similar heuristics as
>> | # dh_install: it will first try the source file directly, and if it's
>> | # not found, try the same path under debian/tmp/. The destination is
>> | # relative to debian/${PACKAGE} (as per dh compat level 7+)
>> | #
>> | # Since dh-exec-install does the copying itself, this line is NOT
>> | # echoed back to dh_install.
>> | source-file /dest-dir/new-name
>> `----
>
> Of course the reason I didn't add this to dh_install 10 years ago is
> that this syntax sucks. It's really horrible; either the trailing slashes
> are much more significant than makes sense, or what it does depends on
> the state of the filesystem(ie, checking whether /dest-dir/new-name is
> a directory).

I disagree that it is horrible. Yes, trailing slashes become much more
significant. But that is already common behaviour for tools like cp,
scp, rsync, ... And having to rename outside of dh_install or replacing
dh_install completly is usualy worse.

>> My implementation copies the file to the desired destination, which may
>> or may not be a good idea - I'll do some more tests to see which one's
>> less painful and more safe.
>
> That breaks -X, --fail-missing, --list-missing, --sourcedir, and --tmpdir

That is part of what I fear will happen with executable config files.

How do you get access to the parameters passed to dh_*? Scripts my need
to honor them.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87hb106e29.fsf@frosties.localnet">http://lists.debian.org/87hb106e29.fsf@frosties.localnet
 
Old 12-16-2011, 09:13 AM
Gergely Nagy
 
Default Getting dh_install to do what we need

Goswin von Brederlow <goswin-v-b@web.de> writes:

>>> My implementation copies the file to the desired destination, which may
>>> or may not be a good idea - I'll do some more tests to see which one's
>>> less painful and more safe.
>>
>> That breaks -X, --fail-missing, --list-missing, --sourcedir, and --tmpdir
>
> That is part of what I fear will happen with executable config files.
>
> How do you get access to the parameters passed to dh_*? Scripts my need
> to honor them.

For now, my latest implementation should not break -X, --fail-missing
and --list-missing, the three options out of five that are used
regularly.

It won't work with --sourcedir and --tmpdir, though, and that's
something I can't change, unless debhelper starts to pass down options,
or export them via an environment variable.

These are corner cases, though, which can be appropriately
documented. Neither --sourcedir nor --tmpdir is all that common I think,
so the number of cases where one would want to use an executable
.install file together with either of the two problematic options would
be minimal.

--
|8]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 874nx07rkh.fsf@algernon.balabit">http://lists.debian.org/874nx07rkh.fsf@algernon.balabit
 

Thread Tools




All times are GMT. The time now is 07:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org