Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why there's so much junk inside /var/tmp/portage?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Skotlex
Guru
Guru


Joined: 13 Mar 2004
Posts: 306

PostPosted: Sat Jun 25, 2005 4:35 pm    Post subject: Why there's so much junk inside /var/tmp/portage? Reply with quote

Every few months of updating, I remind myself that I need to go clean /var/tmp/portage, because, even thought it doesn't really has much inside it.. there's a heck of a lot of directories and are made and left in there!
My question is, why I have to go manually clean it up, why it isn't done automatically when an emerge is successful?
Back to top
View user's profile Send private message
ansient
Guru
Guru


Joined: 22 Jan 2005
Posts: 445
Location: Argentina

PostPosted: Sat Jun 25, 2005 4:46 pm    Post subject: Reply with quote

use tmpreaper

put it in your cron, if you like
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Sun Jun 26, 2005 12:12 am    Post subject: Reply with quote

faq
_________________
Hello.
Back to top
View user's profile Send private message
Skotlex
Guru
Guru


Joined: 13 Mar 2004
Posts: 306

PostPosted: Sun Jun 26, 2005 12:25 am    Post subject: Reply with quote

Damn... how did I missed the faq? o.O'
Thanks for the info! Time to go do some reading... because I really have tons of junk inside /var/tmp/portage... and looking at it...

Quote:

"These files and folder are usually deleted upon a successful merge, but this sometimes fails. "

What sometimes fails? It fails to remove files even when emerging was successful? Because I have tons of crap from ebuilds which never failed to merge for me o.O Time to go use tmpreaper and spare me the hassle.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sun Jun 26, 2005 1:27 am    Post subject: Reply with quote

if the emerge was successful, all that will be left is /var/tmp/portage/package-ver/temp/eclass-debug.log and environment. actually, i dunno why they're left behind.
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
Zxynax
n00b
n00b


Joined: 08 Jul 2003
Posts: 3

PostPosted: Sun Jun 26, 2005 5:51 am    Post subject: Reply with quote

posts like this are great, they always point out useful software that are sometimes overlooked. Or remind us to visit the FAQ every so often.
can't remember it all......
_________________
I'm not crazy, it's all of you who are crazy.
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4975
Location: Gothenburg, Sweden

PostPosted: Sun Jun 26, 2005 9:41 am    Post subject: Reply with quote

Zxynax wrote:
posts like this are great, they always point out useful software that are sometimes overlooked. Or remind us to visit the FAQ every so often.
can't remember it all......

As for cleaning, you may also want to read the FAQ SA1: Running out of disk space.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.libera.chat
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Sun Jun 26, 2005 12:49 pm    Post subject: Reply with quote

dirtyepic wrote:
if the emerge was successful, all that will be left is /var/tmp/portage/package-ver/temp/eclass-debug.log and environment. actually, i dunno why they're left behind.

I don't know if this is the reason but if you rm -rf /var/tmp/portage/ and then try to emerge --resume it won't work - the emerge will start from the begining.
Back to top
View user's profile Send private message
Skotlex
Guru
Guru


Joined: 13 Mar 2004
Posts: 306

PostPosted: Sun Jun 26, 2005 5:15 pm    Post subject: Reply with quote

dirtyepic wrote:
if the emerge was successful, all that will be left is /var/tmp/portage/package-ver/temp/eclass-debug.log and environment. actually, i dunno why they're left behind.

Hmm... perhaps they are used by emerge to determine the flags the package was compiled with? There should be a valid reason why they were not removed afterall. However, I don't see any valid reason on why those directories/files still remain behind after you upgrade. For example, I had a bunch of directories since Gaim-1.0.0 until my current version, obviously -even if portage uses those files- there was no need for the files/directories left behind after the package got upgraded. Sounds like a small deficiency/bug in portage to me.
Back to top
View user's profile Send private message
ansient
Guru
Guru


Joined: 22 Jan 2005
Posts: 445
Location: Argentina

PostPosted: Sun Jun 26, 2005 5:19 pm    Post subject: Reply with quote

Skotlex wrote:
dirtyepic wrote:
if the emerge was successful, all that will be left is /var/tmp/portage/package-ver/temp/eclass-debug.log and environment. actually, i dunno why they're left behind.

Hmm... perhaps they are used by emerge to determine the flags the package was compiled with?

No, /var/db/pkg.
Quote:
There should be a valid reason why they were not removed afterall. However, I don't see any valid reason on why those directories/files still remain behind after you upgrade. For example, I had a bunch of directories since Gaim-1.0.0 until my current version, obviously -even if portage uses those files- there was no need for the files/directories left behind after the package got upgraded. Sounds like a small deficiency/bug in portage to me.

tmp means TEMPORARY. This WORKDIR is where the actual compiling takes place. You can remove these files whenever you want as long as emerge isn't running and there's no emerge you want to --resume.

About a year ago I wrote a trivial script that can give you some idea of what is going on in there.
Back to top
View user's profile Send private message
Skotlex
Guru
Guru


Joined: 13 Mar 2004
Posts: 306

PostPosted: Mon Jun 27, 2005 5:58 pm    Post subject: Reply with quote

ansient wrote:
tmp means TEMPORARY.

Sorry for being persistent, but if tmp is for temporary, why it is not cleaned on reboot together with /tmp? I am certain I must have rebooted my system a few times since I installed Gaim 1.0.0 :P
My continous persistence to this "cruft" left behind, is that your average Gentoo-user might not notice it at all until actually chasing around for space to free up, and having Portage leave around files from many versions ago that are no longer gonna be used at all by your system is inefficient to say the least.
Perhaps I'll just take my gripe to the gentoo-bugzilla, or someone here already has a good reason why /var/tmp/portage shouldn't somehow be automatically cleaned?
Back to top
View user's profile Send private message
spb
Retired Dev
Retired Dev


Joined: 02 Jan 2004
Posts: 2135
Location: Cambridge, UK

PostPosted: Mon Jun 27, 2005 6:04 pm    Post subject: Reply with quote

Skotlex wrote:
Perhaps I'll just take my gripe to the gentoo-bugzilla, or someone here already has a good reason why /var/tmp/portage shouldn't somehow be automatically cleaned?
/tmp is for temporary data that does not persist across reboots. /var/tmp is for temporary data that does persist across reboots.
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Mon Jun 27, 2005 6:07 pm    Post subject: Reply with quote

Maybe you should go to bugzilla. I currently have 379M in /var/tmp/portage after an emerge -e world. It would be nice if /var/tmp/portage was being rm -rf after an emerge completes, yet currently this will screw --resume. Perhaps the information for --resume could be left in /var/tmp/portage but there is debugging information there that you should at least have an option to disable.
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Mon Jun 27, 2005 6:14 pm    Post subject: Reply with quote

spb wrote:
Skotlex wrote:
Perhaps I'll just take my gripe to the gentoo-bugzilla, or someone here already has a good reason why /var/tmp/portage shouldn't somehow be automatically cleaned?
/tmp is for temporary data that does not persist across reboots. /var/tmp is for temporary data that does persist across reboots.

If it is temporary then it must be cleaned upon some condition, right ? /var/tmp/portage seems to accumulate leftover, composed mostly of debug information.
Back to top
View user's profile Send private message
Skotlex
Guru
Guru


Joined: 13 Mar 2004
Posts: 306

PostPosted: Mon Jun 27, 2005 10:44 pm    Post subject: Reply with quote

spb wrote:
Skotlex wrote:
Perhaps I'll just take my gripe to the gentoo-bugzilla, or someone here already has a good reason why /var/tmp/portage shouldn't somehow be automatically cleaned?
/tmp is for temporary data that does not persist across reboots. /var/tmp is for temporary data that does persist across reboots.


I'll go file a bug report suggesting that the /var/tmp/portage directory of a package should be cleaned when performing an "emerge -C" (which includes removing previous versions when upgrading), seems like the most sane/easy decision. Or make it delete the directory contents as soon as the emerge is successfully completed, altough as I don't know what use these remaining files have, it might not be appropiate to get rid of them inmediately.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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