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

Re: Bug#560317: dpkg-reconfigure does not set DPKG_MAINTSCRIPT_PACKAGE (et al)



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

Attachment: signature.asc
Description: Digital signature


Reply to: