On Sun, 12 Jan 2014 17:09:47 +0100 Guillem Jover <[email protected]> wrote:
> Hi!
> 
> On Sun, 2014-01-12 at 16:05:29 +0200, Andrei POPESCU wrote:
> > Control: reassign -1 libdpkg-perl
> > 
> > On Sb, 11 ian 14, 17:36:22, Geoffrey Thomas wrote:
> > > Package: libdpkg-query
> > > Version: 1.17.5
> > > Severity: wishlist
> > 
> > I'm guessing you meant -perl, not -query.
> 
> Thanks, for reassigning.
> 
> > > dpkg-query's manpage says that --control-path is deprecated in favor
> > > of --control-show and --control-list, but Dpkg::Path only offers a
> > > wrapper around --control-path. Can you expose --control-show and
> > > --control-list via some API in Dpkg::Path?
> 
> Yeah, I was meaning to do something along those lines when switching
> dpkg-dev scripts away from get_control_path. Unfortunately this
> slightly complicates the code a bit.
> 
> Thanks,
> Guillem
> 
> 

A further thorn in this case: A --control-list followed by
--control-show is basically twice a slow as --control-path.  Each of
them takes about 0.05s in my tests, so the "correct" way costs nearly
0.1s (for 1 ctrl file per unique pkg).

Anything that needs to use these options in bulk (e.g. dpkg-shlibdeps)
would pay dearly for doing the "right thing". :-/

In dpkg-shlibdeps case, the performance overhead could be reduced to the
current level if it was possible to do something like:
  dpkg-query --control-show <pkg> <ctrl-file> "missing-as-empty"

(with dpkg-query just emitting the empty string if <ctrl-file> was
missing and exiting with 0).

@Guillem: Would you be happy to accept a patch to support that third
parameter for dpkg-query --control-show ?

Thanks,
~Niels

Reply via email to