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

Dave Reisner d at falconindy.com
Fri May 31 14:55:37 EDT 2013


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


More information about the pacman-dev mailing list