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

Re: Finding out in postinst whether some other package is configured

Ben Armstrong <synrg@sanctuary.nslug.ns.ca> wrote:

> I don't know about an "established" way, but libc6.postinst looks
> interesting:
> # Only get the ones that are installed, and configured
> check=$(dpkg -s $check 2> /dev/null | egrep '^Package:|^Status:' | awk '{if ($1 ~ /^Package:/) { package=$2 } else if ($0 ~ /^Status: .* installed$/) { print package }}')

Thanks, that looks very good.  And it answers the question (or at least
gives a good indication) whether calling dpkg -s during a run of "dpkg
--install <long_list_of_files>" gives a sensible output; otherwise
they'd probably know.

Regards, Frank
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer

Reply to: