[pacman-dev] [PATCH 3/3] Added tests for -Q --check (both fast(files) and full(mtree)).

Jeremy Heiner scalaprotractor at gmail.com
Sat Oct 5 06:02:22 EDT 2013

On Fri, Oct 4, 2013 at 3:58 PM, Andrew Gregory
<andrew.gregory.8 at gmail.com> wrote:
> pmdb is responsible for populating /var/lib/pacman/local/.  In fact,
> you'll need to update pmdb so it will create the mtree file, which
> I seem to have neglected to mention before.

D'oh! Yes, indeed, it does! How embarrassing that I somehow missed
that. I assumed incorrectly based on its name and by analogy to what
pacman does that pmpkg.install_package would be responsible for
populating /var/lib/pacman/local. Oops.

Obviously this patch set is D.O.A.

> The snapshot is used to determine if the file was modified after being
> installed.  None of your tests needed a post-snapshot hook, and
> I can't think of any that would.  Of course, if such a need does
> arise, we can revisit the idea of post-snapshot hooks at that time.

Correct, none of the -Qk(k) tests need that hook. But I mentioned in
the cover-letter a scenario that I thought would: reinstalling to
damaged files. Perhaps it's just that I'm still not completely
understanding how the snapshot gets used, but that scenario still
seems to me to need something more than what the local pmdb does.

I am quite content, however, to put that aside until the day a test is
written that actually requires it. So, I'll get to work on an improved
version of this patch set. My hooks code is out. The mtree generation
gets moved to where it belongs. And I need to figure out how to call
the install script - which (without looking at the code at all, so I
could be wrong) involves forking sh as a final step in
pmpkg.install_package. And roll in your other suggested improvements
as well. Piece o' cake! :)

More information about the pacman-dev mailing list