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

Re: Faster 'dpkg -s'?



> I see (at least) two possibilities:
> 
> 1.  dpkg -s $PACKAGE
> 
> 2.  sed -n -e "/^Package: $PACKAGE$/,/^$/p" < /var/lib/dpkg/status
> 
> The first is slow and the second fast, but I'm wary of using the
> second in my code (what if the format of status changes?).  Are my
> fears justified?  [I notice that bug uses the second...]

 That file won't change in the near future, you may safely rely on its
format.



Reply to: