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

Joey Hess joeyh at debian.org
Fri Mar 9 16:36:06 UTC 2012


Colin Watson wrote:
> +		my $templates=`dpkg-query --control-path $pkg templates`;

> +		my $path_script=`dpkg-query --control-path $pkg $script`;

> +	open (QUERY, '-|', 'dpkg-query', '-W',
> +		'-f', '${Package} ${Triggers-Pending}\n');

It's a shame that dpkg-query is so slow. Cold cache (which will be
typical), it takes something like a second to run; warm cache around .3
seconds. Overhead includes reading the entire status file. The above
code runs it 5 times in all.

So, it would be worth only running it once and picking out the
appropriate filenames from its output. At least this would reduce the
number of runs to 3, and dpkg-reconfigure only gets 1.6 seconds slower,
rather than 2.2 seconds slower.


PS, cdebconf includes a dpkg-reconfigure now and will need the same
changes. Probably we need to make sure to communicate substantial
changes like this with Regis at least until cdebconf takes over from
debconf.

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20120309/befc6524/attachment.pgp>


More information about the Debconf-devel mailing list