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

Re: Specifying %{variable} in control file for use in post inst?



Ignacio Valdes <ivaldes@hal-pc.org> writes:
> On Thu, Apr 29, 2010 at 3:55 PM, Russ Allbery <rra@debian.org> wrote:
>> Ignacio Valdes <ivaldes@hal-pc.org> writes:

>>> So what is the usual method of accessing control file values such as
>>> Package: in postinst?

>> Generally, you don't, since generally there's no reason to do so.  I
>> can't say I've ever had any reason to want to do that in any of the
>> Debian packages I maintain.

> Introspection isn't a particularly exotic function.

This discussion is missing a motivating application.  The glimmers that
I've gotten from your original discussion seemed to me like a basically
incorrect design, leading to needing features that wouldn't be required by
a better design.  But I can't tell for sure since I'm not sure what you're
really trying to do.

As a general rule of thumb, if you're writing complex postinst code,
you're doing something wrong.  There are exceptions, but not a lot of
them, and mostly for very complex packages.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: