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

Re: mucking with dpkg control files in maintainer scripts?

Ian Jackson <ian@davenant.greenend.org.uk> wrote:

> Frank Küster writes ("Re: mucking with dpkg control files in maintainer scripts?"):
>> I think the main reason why this is not being done is that there's a
>> general fear that calling "dpkg -s" from a script that has been called
>> by dpkg might give unpredictable, or at least not the desired results.
> If you need this information, dpkg -s is a better way to get it than
> messing around with /var/lib/dpkg - but see my earlier message.
> Messing with conffiles is _very complicated_ and doing so by hand in
> maintscripts is likely to produce more subtle and complicated bugs
> rather than fewer bugs.
>> If it were documented how dpkg behaves under such circumstances (same
>> for "dpkg -l"), people might be willing to change this.
> Where is this documentation you refer to ? 

It is nowhere AFAIK, and this is the problem.

> dpkg -s and dpkg -l are
> equally reliable in this respect.

In other words, "commits" to the dpkg database are atomic, and if dpkg
is called from a script started by dpkg, it will report all packages in
the correct, current and maybe partial state, including the package
processed so far?

Regards, Frank
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)

Reply to: