[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash-completion with triggers



On Thu, Apr 7, 2011 at 21:19, David Paleino <dapal@debian.org> wrote:
> On Thu, 7 Apr 2011 22:14:31 +0300, Eugene V. Lyubimkin wrote:
>
>> On 2011-04-07 18:15, Goswin von Brederlow wrote:
>> > Dpkg::Post-Invoke would be the right (best available) one. That would
>> > call your trigger after every dpkg invocation [...]
>>
>> This is not true, 'Dpkg::*-Invoke' script chain are called once
>> before/after all dpkg invocations.
>
> So it's just like a trigger monitoring /? (without the implications of triggers
> in terms of sequence of operations)

JFTR:
1. All scripts configured in DPKG::Pre-Invoke are called
2. All scripts configured in DPKG-Pre-Install-Pkgs are called
(and they get the information which packages will be installed).
3. APT does all the crazy stuff it does with dpkg
4. All scripts configured in DPKG::Post-Invoke are called

So in a way Post-Invoke could really be seen as a trigger on /.
And its not before/after every dpkg invocation, but before the first
and after the last dpkg invocation (as APT calls dpkg multiple times).


> This is meaningless to me. This way, my postinst would be run at *every* package
> installation, not only those installing files in /usr/bin/ and companions.

Most real world operations include at least one package with a binary in
these locations. After all, i am installing or upgrading an application and
all its dependencies are just there because they are needed for it…

As all applications ship a manpage (lets dream that all are lintian clean)
we would have two triggers called again and again and properly multiple
times in a single APT operation…


If you would use the APT hooks users of plain dpkg would be out of luck.
Same for people with very obscure packagemanagers (e.g. smart),
but after all its completion and not something mission critical -
even if i can't live without completion myself - so its properly okay to
ignore these cases as people who really use it on a regular basis
will properly know how to set something up on their own.


If you want to, you can properly get along with searching for
accessed/modified files in those directories to get the knowledge
if something was changed and if yes you know even what.


Best regards

David Kalnischkies


Reply to: