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

Bug#616342: dpkg-query: add the ability to dump the entire dpkg database



Package: dpkg
Version: 1.15.8.10
Severity: wishlist
User: dpkg@packages.debian.org
Usertags: dpkg-query

As per subject, see messages below from -devel discussion rooted at
<http://lists.debian.org/debian-devel/2011/03/msg00180.html>. Reporting
bug as requested by DPKG maintainers (with best effort to find
appropriate usertags).

On Thu, Mar 03, 2011 at 05:30:42PM +0100, Stefano Zacchiroli wrote:
> Is there a way to ask dpkg-query to dump all the information contained
> in /var/lib/dpkg/status without either having to: (1) list all fields
> explicitly (using --show + --showformat) or (2) list all package names
> (using --status)?
> 
> I co-maintain some utilities that parse /var/lib/dpkg/status and I'd be
> glad to migrate them to dpkg-query, but both solutions above have
> drawbacks. (1) is not future proof and will miss the addition of new
> fields unless the utility is updated; (2) has a race condition in asking
> the currently installed packages and providing them to --status (beside
> being a horrible hack in requiring to list all package names as
> arguments).  Am I missing something?
> 
> Having the ability to pass a package (wildcard) pattern to --show would
> be enough to solve this problem.

On Thu, Mar 03, 2011 at 06:20:01PM +0100, Guillem Jover wrote:
> > Is there a way to ask dpkg-query to dump all the information contained
> > in /var/lib/dpkg/status without either having to: (1) list all fields
> > explicitly (using --show + --showformat)
> 
> For each package --status will do the trick, for all packages, yeah
> it does not support patterns. I guess adding that would be fine. So
> one could do something like: «dpkg-query -s '*'».
> 
> > or (2) list all package names (using --status)?
> 
> Currently something like «dpkg-query -l|tr -s ' ' '\t'|cut -f2» could
> do the trick, altough I could agree it sucks a bit. If --status would
> accept patterns that would be nicer.
> 
> > Having the ability to pass a package (wildcard) pattern to --show would
> > be enough to solve this problem.
> 
> > Do you want a bug report about this?
> 
> Yes, please.

On Thu, Mar 03, 2011 at 06:23:06PM +0100, Raphael Hertzog wrote:
> > Having the ability to pass a package (wildcard) pattern to --show would
> > be enough to solve this problem.
> 
> If you don't pass any argument to --show you have all the installed
> packages. And wildcards are already supported in --show (but not in
> --status).
> 
> We can add support for wildcards in --status, in fact it will be easily
> doable. Do you want to file a wishlist bug for this ?

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Quando anche i santi ti voltano le spalle, |  .  |. I've fans everywhere
ti resta John Fante -- V. Capossela .......| ..: |.......... -- C. Adams

Attachment: signature.asc
Description: Digital signature


Reply to: