Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Keeping old versions of ebuilds + patches
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
SilverDirk
n00b
n00b


Joined: 06 Aug 2004
Posts: 32

PostPosted: Sat Sep 25, 2010 3:05 am    Post subject: Keeping old versions of ebuilds + patches Reply with quote

(this might be a common question, but the keywords involved are kinda common so its heard to target the search. if it is, I'd appreciate links to past discussions)

Hi, I was thinking a cool feature to have would be the ability to copy all ebuilds + required files that I have installed on my system into my local overlay.

This way, if I go a few months without syncing and then try to sync and install a new package, revdep-rebuild would actually work. (the usual problem being that the installed version no longer exists)

Also, sometimes it would be nice to not upgrade certain packages, while recompiling them against libraries as needed.

I was looking into writing a quick script for this, and found that ebuilds are saved in /var/db/pkg, however I also need the patches and extra files. Is there some easy way to trace which extra files were used by a given ebuild?
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Sat Sep 25, 2010 3:24 am    Post subject: Reply with quote

I hate to say it, but just tar up your whole portage tree to handle that part.

I'm a little less clear on how to preserve the distfiles you need, but if you never delete them, that part's solved. I think there's a script on the forums or wiki or something to prune no-longer-used distfiles, but it may run into problems if the ebuilds are no longer in the tree, so make sure you do it right after you finish updating (or even better after an emerge -e world, that way you know _everything_'s ready to go).

Probably a less sophisticated answer than you wanted, but it's real easy and should be 100% reliable, if maybe not the most efficient :)

For bonus points, fetch a stage image at the same time, then you know you can redo from scratch without problems.
Back to top
View user's profile Send private message
SilverDirk
n00b
n00b


Joined: 06 Aug 2004
Posts: 32

PostPosted: Sat Sep 25, 2010 3:35 am    Post subject: Reply with quote

Well, the worst case for my script actually turns out better than that....

For each directory in /var/db/pkg/*/*
Get the package-path
Copy path/ebuild and path/files/* into /usr/local/portage/path

Done. I don't need to save the tarballs because I figure it's safe to rely on the sources to keep the link active.

But, there can be a lot of files/*, and I was wondering if there's any way to ask an ebuild which files it uses.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Sat Sep 25, 2010 4:06 am    Post subject: Reply with quote

SilverDirk wrote:
I don't need to save the tarballs because I figure it's safe to rely on the sources to keep the link active.


This is dangerous if you expect it to last more than a few months on a fast moving package, but I suspect it will be more in the range of years before it becomes difficult to track down a package file with google. I've been in that situation and it kinda sucked :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum