[Popcon-developers] Bug#660712: Foreign-architecture packages break popularity-contest

Raphael Hertzog hertzog at debian.org
Tue Mar 27 07:17:59 UTC 2012


On Tue, 27 Mar 2012, Ben Hutchings wrote:
> The new behaviour, using dpkg 1.16.2:
> 
> /etc/cron.daily/popularity-contest:
> dpkg-query: error: --listfiles needs a valid package name but 'gcc-4.6-base' is not: ambiguous package name 'gcc-4.6-base' with more than one installed instance

Indeed, I also got this today.

On Tue, 21 Feb 2012, Bill Allombert wrote:
> Yes, but currently this does not work, see bug #659782, which this bug is
> probably a duplicate.

Sort of.

But the discussions in #659782 gave you the solution to this bug.
You should use "${binary:Package}" preferrably over "${Package}" when
getting the list of packages to query.

Yes ${binary:Package} might be empty with older versions of dpkg so you
must ask for both and be ready to deal with it.

dpkg-query -W -f'${binary:Package},${Package} ${Status}\n'

And use the first non-empty value for the package name.

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 Popcon-developers mailing list