public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] Re: [RFC] New file layout for PKGDIR and binhosts
Date: Thu, 25 Dec 2014 03:04:20 -0800	[thread overview]
Message-ID: <549BEF34.90603@gentoo.org> (raw)
In-Reply-To: <pan$b1419$e1e399a$2a866890$b1ebacbb@cox.net>

On 12/25/2014 02:03 AM, Duncan wrote:
> Zac Medico posted on Wed, 24 Dec 2014 00:13:57 -0800 as excerpted:
> 
>>> If there were some way to
>>> get all the info for the binpkgs into one file (so it could be run on
>>> cron or something), this could mean that I'd only have to do one file
>>> request for all that metadata and would be much quicker than inspecting
>>> all those files.
>>
>> That's what $PKGDIR/Packages is.
> 
> This is a good excuse to ask a question that has bothered me for some 
> time, plus make a request for the new eclean-pkg replacement...
> 
> Normally I like to keep several old binpkgs around for troubleshooting 
> reference or quick-install, but the combined set of kde packages, for 
> instance, can get pretty big, and with monthly iterations, they build up 
> pretty fast.
> 
> But eclean-pkg doesn't have an easy way to say clean up /just/ kde-base/
> *, leaving the currently installed version and one previous version for 
> reference, cleaning out all others.  (Sure I could put /everything/ else 
> on the exclude list, but what's really needed is an include list, plus a 
> "keep N more" option.)
> 
> So I often end up cleaning packages like that out manually by simply 
> deleting them.  My question is thus, does the remaining index/db/cache 
> entry get cleaned properly (when?) or am I leaving uncleanable garbage 
> behind when I do this?

You can run 'emaint --fix binhost' to sync $PKGDIR/Packages up with the
existing tbz2 files.

If you don't run that emaint command, the packages that you removed will
be pruned from $PKGDIR/Packages the next time that you run an 'emerge
--usepkg' command with sufficient privileges.

> Which of course translates into a couple of feature requests for the new 
> eclean-pkg:  
> 
> 1) Make it possible to clean only selected pkgs or categories.
> 
> 2) Have an option to clean up and/or regenerate the cache/index/db/
> whatever files, re-syncing them with what's actually there.

eclean-pkg calls 'emaint --fix binhost' to fix $PKGDIR/Packages after it
removes some tbz2 files.

> Meanwhile, another possible usage for multiple binpkgs per ebuild:
> 
> I commonly run live-builds (mostly kde, tho I'm not ATM), and would 
> /love/ to be able to keep about three generations (current plus two back) 
> around, ideally IDed by their git-commit or the like.  Running live 
> packages can mean even more risk than usual of something not working out, 
> but currently, if the package builds, by the time you find that out, 
> you've obliterated your previous *9999 binpkg and even figuring out which 
> git commit it was isn't easy, let alone doing a quick binpkg rollback, 

FWIW, you can use 'cp -rl $PKGDIR $PKGDIR.backup' to make a hardlink
snapshot of $PKGDIR. Portage will break hardlinks whenever it needs to
update tbz2 files, so you don't have to worry about updates in $PKGDIR
affecting the files in $PKGDIR.backup.

> like you'd do with an ordinary version upgrade.  Were multiple live-
> binpkg-versions kept around, IDed by the git-commit or at least with that 
> info in the metadata somewhere, it'd make things /so/ much easier! =:^)

That's going to require an EAPI extension [1], in order to establish a
protocol for the ebuild to communicate the commit id to the package manager.

> But of course that does make having an automated cleaner that can keep 
> just the last N package versions around while deleting the others, that 
> much more important.

Yes, and we might integrate some on-the-fly garbage collection directly
into portage, or provide a hook for this purpose.

[1] https://bugs.gentoo.org/show_bug.cgi?id=182028
-- 
Thanks,
Zac


  reply	other threads:[~2014-12-25 11:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24  1:51 [gentoo-portage-dev] [RFC] New file layout for PKGDIR and binhosts Zac Medico
2014-12-24  5:16 ` Matthew Thode
2014-12-24  8:13   ` Zac Medico
2014-12-24 12:01     ` vivo75
2014-12-24 16:07       ` Zac Medico
2014-12-24 18:36         ` vivo75
2014-12-24 19:17           ` Zac Medico
2014-12-25 10:03     ` [gentoo-portage-dev] " Duncan
2014-12-25 11:04       ` Zac Medico [this message]
2014-12-26  5:20         ` Duncan
2015-01-07  5:32       ` Brian Dolbec
2014-12-27 14:25 ` [gentoo-portage-dev] " Rick "Zero_Chaos" Farina
2014-12-29  3:53   ` 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=549BEF34.90603@gentoo.org \
    --to=zmedico@gentoo.org \
    --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