Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cleaning out the Portage 'distfiles' directory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mihochan
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 296
Location: Melbourne again

PostPosted: Tue Sep 23, 2003 11:44 pm    Post subject: Cleaning out the Portage 'distfiles' directory Reply with quote

Over time the /usr/portage/distfiles directory fills with old obsolete packages.
After spending some time tediously trying to weed it, I hit upon this solution which I hope people will find useful.


1. Setup apache on your local machine and create a directory 'distfiles'

2. Move the contents of /usr/portage/distfiles into ~apache/htdocs/distfiles

3. Add the following line to your make.conf file, GENTOO_MIRRORS="http://localhost"

4. Run 'emerge --emptytree -f world'

5. Delete the contents of ~apache/htdocs/distfiles

Your /usr/portage/distfiles directory should now have all the tarballs you need and nothing more.
The idea, of course, is to use portage itself to decide what is obsolete. By adding localhost as a mirror, the packages will be retrieved locally quickly and anything not copied back is not needed.

Watch out for packages that need to be downloaded manually. They will not be copied across with this process. The Sun JVM is one such package.
_________________
In the long run we are all dead - Keynes


Last edited by mihochan on Thu Sep 25, 2003 4:16 am; edited 1 time in total
Back to top
View user's profile Send private message
brkdncr
Tux's lil' helper
Tux's lil' helper


Joined: 02 Aug 2003
Posts: 92

PostPosted: Wed Sep 24, 2003 12:51 am    Post subject: Reply with quote

i'm still a little ignorant with portage, how is this different than just plowing the contents of the distfiles directory, and then sync'ing?
Back to top
View user's profile Send private message
kompressor
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2003
Posts: 127
Location: Randolph, VT

PostPosted: Wed Sep 24, 2003 2:48 am    Post subject: Reply with quote

brkdncr wrote:
how is this different than just plowing the contents of the distfiles directory, and then sync'ing?


by plowing I assume you mean deleting.
Im not a portage guru by anymeans but I beleive sync'ing will gather new .ebuild files. Rather than downloading the actual file.

~kompressor
Back to top
View user's profile Send private message
tshelt
n00b
n00b


Joined: 05 Sep 2003
Posts: 28

PostPosted: Wed Sep 24, 2003 5:31 am    Post subject: Reply with quote

brkdncr wrote:
i'm still a little ignorant with portage, how is this different than just plowing the contents of the distfiles directory, and then sync'ing?


I'm pretty new to Gentoo (and to Linux in general for that matter :), but the /usr/portage/distfiles is where all the tar ball's go that are downloaded when you emerge something. When you emerge sync, these aren't touched - since the sync only pulls the ebuild file. The good thing about keeping files there in the distfiles directory is that if for some reason, such as you remove a package and then decide you do need it - you don't have to download it again because it is already there. But as portage is updated, you don't need to keep the old outdated stuff around. This is actually a pretty cool tip... I think I will use it myself. I tend not to mess with distfiles much because I'm on a dialup and some of the dialups can be pretty nasty :)

Tom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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