[pacman-dev] RFC: pacdiff finding pacnews through libalpm

Jonathan Frazier eyeswide at gmail.com
Sat Jun 1 17:37:56 EDT 2013


On 05/31/13 at 02:55pm, Dave Reisner wrote:
> On Fri, May 31, 2013 at 02:27:06PM -0400, John Frazier wrote:
> > I made up a program to help find pacnews that are in odd locations. It
> > includes a c utility based on vodiks pacrat. It uses libalpm to return
> > the path to pacnews and pacsaves from all active configs in the local
> > db. Then there is a version of pacdiff which has it run in place of find.
> > 
> > This is better than the current find or locate used in pacdiff which
> > doesn't look outside of /etc/ by default for performance reasons. With
> > this pacdiff can find syslinux config in /boot, or avahi's db in
> > /usr/lib with no noticeable delay. The only drawback I am aware of with
> > using the local db is cannot find pacsaves unless the package is
> > reinstalled.
> > 
> > I think this would be a useful inclusion to the contrib tools, so let me
> > know of what sucks about it and what it can be done to to get that
> > accomplished. it currently is in github, but I can make up patches
> > against pacman.git if wanted.
> > 
> > https://github.com/JohnFrazier/pacnewrat
> > 
> > John Frazier
> > 
> 
> Unused code, crash on initialization failure, hex codes instead of
> human readable characters, and odd warnings for unreadable files when
> the pac{orig,save,new} is (why does this even matter?).
> 
> In general, I tend to think this sort of thing is better left to shell.
> It's *easily* made fast. Here's a proof of concept:
> 
> https://gist.github.com/falconindy/5687111
> 
> d
> 

Thanks for the input. 

As for the odd warnings, I wanted to show a warning for a missing
config.  This is to show if they are lost somehow, and to make people
aware of the configs not packaged but still in backup. As that is odd
situation. At first glance they appear to be forgotten. perhaps it is
used as an upgrade workaround.

Seeing that your shell version is just as fast as my c code, and keeping
it in one language is a plus. I will work on integrating that code into
pacdiff.

John


More information about the pacman-dev mailing list