[pacman-dev] pacman-disowned

Jeremy Heiner scalaprotractor at gmail.com
Sun Sep 29 12:53:11 EDT 2013

Greetings, everyone! My name is Jeremy. Pleased to make your acquaintance.

The "Pacman Tips" wiki page provides a pacman-disowned shell script
and suggests running it periodically. I completely agree: I have found
it both helpful and educational.

I've played around with the script, trying to squeeze more information
into its output. Just so you can get a sense of what direction my
exploration lead me, I've attached my scala implementation. To be
clear: I am *not* suggesting this scala program as a replacement for
pacman-disowned. I can't even guarantee that my scala program does
anything useful, and I eschew any liability should you ever run it :).
I've only included it in case you're wondering where my head is at.

What do I mean by "squeeze more info in"? Well, it would be fairly
easy to tweak the shell script to list missing files (even though you
can get that info using "-Qk"). So my scala program outputs a line for
each file that indicates if it is missing or if it is not owned by a
package: it combines the info from both "-Qk" and pacman-disowned.

Anyway, I've been thinking about what it would take to bake this
functionality into pacman itself. Now I'm certain many of you are
already objecting: "it's better to layer this on top than to bake it
in". And I concede that is a powerful objection. Still, I can't see
any harm in exploring the idea. I'm benefiting by learning about the
insides of pacman, even if my code is not adopted.

I must also admit that I have not got to the point of implementing my
scala stuff in C yet. I do have five-ish patches ready to post here,
but they are all about preparing for eventually adding that
functionality. It is possible that I might never post a patch that
attains my end goal, but still some of these preliminary patches might
prove useful.

The first clump of patches I will post add unit tests for "-Qk". My
ideas will (eventually) require big changes to check.c, and I wouldn't
want to break anything there. This involved adding a new "hook"
mechanism to the test framework, so that a package could be installed,
then mangled by removing items, all in the generation phase so that
the "-Qk" output could be verified in the test phase.

Thanks in advance for your time evaluating my offerings, and for any
feedback you have,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: installed.scala
Type: application/octet-stream
Size: 2064 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/pacman-dev/attachments/20130929/8c55007d/attachment-0001.obj>

More information about the pacman-dev mailing list