[Debconf-devel] Bug#560317: dpkg-reconfigure does not set DPKG_MAINTSCRIPT_PACKAGE (et al)

Raphael Hertzog hertzog at debian.org
Fri Mar 9 15:15:22 UTC 2012


On Fri, 09 Mar 2012, Colin Watson wrote:
> happening.  The result of this work is attached, minus changelog which I
> can write up if this is acceptable.

Thank you for this! A quick comment though:

> +# Returns a list of all packages with pending triggers.
> +sub triggers_pending {
> +	my @ret;
> +	local $_;
> +
> +	open (QUERY, '-|', 'dpkg-query', '-W',
> +		'-f', '${Package} ${Triggers-Pending}\n');
> +	while (<QUERY>) {
> +		my ($pkg, @triggers) = split;
> +		push @ret, $pkg if @triggers;
> +	}
> +	close QUERY;

To be fully multi-arch compliant, you should in theory use
"${binary:Package}" instead of ${Package}. That way multi-arch: same
package will be arch-qualified.

But for backwards compatibility, you'll have to detect when
it's available. (And just testing "dpkg --assert-multiarch" will
break on Ubuntu since the current multiarch implementation there
doesn't know this field under this name)

The easiest is to put both fields in the query and to use the one
that's not empty.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/





More information about the Debconf-devel mailing list