Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I use emerge --sync my older .ebuild files are removed. How to get newer .ebuild-s, but not lose older ?

share|improve this question
1  
What do you need (or want) the older ebuilds for? –  David Z Aug 18 '11 at 5:25
add comment

1 Answer 1

up vote 3 down vote accepted

One way to do this should be to override the default portage rsync options excluding the deletion related options. The default options are currently hardcoded in /usr/lib/portage/pym/_emerge/actions.py from line 2039 at my place.

Excluding "--force" and "--delete" you would add

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --whole-file --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

to /etc/make.conf. To the effect that no files or directories should get deleted any more.

Edit: Note that usually you would not want to keep any such ebuilds within the portage tree you're syncing to.

If you want to preserve specific ebuilds, there are two typical scenarios:

  • You are using an outdated ebuild that you want to keep.
  • You have written an ebuild yourself, or you found an ebuild somewhere, and added it to the portage tree you're syncing to.

In both these cases the best solution is to copy these ebuilds to a local overlay. You may also have to copy ebuilds they're depending on. Here's how to create a simple local overlay: http://forums.gentoo.org/viewtopic-t-827407.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.