From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AB38C1384AE for ; Sun, 20 Sep 2015 07:27:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BF1221C021; Sun, 20 Sep 2015 07:27:01 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E03E421C018 for ; Sun, 20 Sep 2015 07:27:00 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZdZ1W-0002zg-MX for gentoo-portage-dev@lists.gentoo.org; Sun, 20 Sep 2015 09:26:58 +0200 Received: from ip98-167-165-199.ph.ph.cox.net ([98.167.165.199]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Sep 2015 09:26:58 +0200 Received: from 1i5t5.duncan by ip98-167-165-199.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Sep 2015 09:26:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-portage-dev@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-portage-dev] Re: Portage questions Date: Sun, 20 Sep 2015 07:26:53 +0000 (UTC) Message-ID: References: <1442409220.32234.28.camel@transmode.se> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip98-167-165-199.ph.ph.cox.net User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT c9c83f3) X-Archives-Salt: 755d1926-adcc-477a-8f02-943411dd2382 X-Archives-Hash: 916db707573a8da7b20b1d22ac0b990b 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