public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] Re: Portage questions
Date: Sun, 20 Sep 2015 07:26:53 +0000 (UTC)	[thread overview]
Message-ID: <pan$a1269$725414fd$97070a86$e8f2cfd0@cox.net> (raw)
In-Reply-To: 1442409220.32234.28.camel@transmode.se

Joakim Tjernlund posted on Wed, 16 Sep 2015 13:13:40 +0000 as excerpted:

>   Is there a way to generate a snapshot of an installed portage VDB and
>   then later compare that snapshot against the current VDB and generate
>   a list of added/updated packages?

That one is either relatively simple, or I'm not understanding your 
question.

Portage's installed package database, vdb, is located at /var/db/pkg/.  
It's organized as a category/package-version tree, much like the normal 
gentoo packages tree, except that the package dir names have the version 
appended (and of course there's no profile/metadata/etc subdirs).  Most 
files in the individual pkg-ver dirs are plain text, tho the environment 
file is compressed (bz2 here, tho it's possible that's configurable, IDK).

So a snapshot of vdb should be as simple as tarballing /var/db/pkg.  You 
should then be able to untar it somewhere and do a recursive diff or 
whatever, to compare the freshly unarchived version against the existing 
one and get your list of added/updated packages based on the diff.

The other question I didn't (as a user not a dev) understand.  I'd need a 
fuller explanation (it feels like I came in half way thru the story and 
missed something critical, which has me wondering if I'm missing 
something on the first one too, since it seemed so simple, thus the 
remark above to that effect), but it's possible a dev will understand 
better and be able to answer.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



  reply	other threads:[~2015-09-20  7:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 13:13 [gentoo-portage-dev] Portage questions Joakim Tjernlund
2015-09-20  7:26 ` Duncan [this message]
2015-09-20 16:47 ` Zac Medico
2015-09-21 13:45   ` Joakim Tjernlund
2015-09-22  4:15     ` Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='pan$a1269$725414fd$97070a86$e8f2cfd0@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox