Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Why there's so much junk inside /var/tmp/portage?

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
15 posts • Page 1 of 1
Author
Message
Skotlex
Guru
Guru
Posts: 318
Joined: Sat Mar 13, 2004 8:27 pm

Why there's so much junk inside /var/tmp/portage?

  • Quote

Post by Skotlex » Sat Jun 25, 2005 4:35 pm

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?
Top
ansient
Guru
Guru
User avatar
Posts: 445
Joined: Sat Jan 22, 2005 10:41 pm
Location: Argentina

  • Quote

Post by ansient » Sat Jun 25, 2005 4:46 pm

use tmpreaper

put it in your cron, if you like
devmanual

I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is. -- http://bash.org/?5273
Top
Vanquirius
Retired Dev
Retired Dev
User avatar
Posts: 1297
Joined: Fri Jun 14, 2002 9:07 pm
Location: Ethereal plains
Contact:
Contact Vanquirius
Website

  • Quote

Post by Vanquirius » Sun Jun 26, 2005 12:12 am

faq
Hello.
Top
Skotlex
Guru
Guru
Posts: 318
Joined: Sat Mar 13, 2004 8:27 pm

  • Quote

Post by Skotlex » Sun Jun 26, 2005 12:25 am

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...
"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.
Top
rhill
Retired Dev
Retired Dev
User avatar
Posts: 1629
Joined: Fri Oct 22, 2004 9:58 am
Location: sk.ca

  • Quote

Post by rhill » Sun Jun 26, 2005 1:27 am

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
Top
Zxynax
n00b
n00b
User avatar
Posts: 3
Joined: Tue Jul 08, 2003 2:44 pm

  • Quote

Post by Zxynax » Sun Jun 26, 2005 5:51 am

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.
Top
kallamej
Administrator
Administrator
User avatar
Posts: 4993
Joined: Fri Jun 27, 2003 10:05 am
Location: Gothenburg, Sweden

  • Quote

Post by kallamej » Sun Jun 26, 2005 9:41 am

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
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Sun Jun 26, 2005 12:49 pm

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.
Top
Skotlex
Guru
Guru
Posts: 318
Joined: Sat Mar 13, 2004 8:27 pm

  • Quote

Post by Skotlex » Sun Jun 26, 2005 5:15 pm

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.
Top
ansient
Guru
Guru
User avatar
Posts: 445
Joined: Sat Jan 22, 2005 10:41 pm
Location: Argentina

  • Quote

Post by ansient » Sun Jun 26, 2005 5:19 pm

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.
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.
devmanual

I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is. -- http://bash.org/?5273
Top
Skotlex
Guru
Guru
Posts: 318
Joined: Sat Mar 13, 2004 8:27 pm

  • Quote

Post by Skotlex » Mon Jun 27, 2005 5:58 pm

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?
Top
spb
Retired Dev
Retired Dev
User avatar
Posts: 2135
Joined: Fri Jan 02, 2004 1:18 pm
Location: Cambridge, UK

  • Quote

Post by spb » Mon Jun 27, 2005 6:04 pm

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.
14:20:19 <mark_alec> i fail
..shortly afterwards...
14:32:09 <spb> so it's "do what i want or i ban you"
14:32:13 <mark_alec> yes
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Mon Jun 27, 2005 6:07 pm

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.
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Mon Jun 27, 2005 6:14 pm

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.
Top
Skotlex
Guru
Guru
Posts: 318
Joined: Sat Mar 13, 2004 8:27 pm

  • Quote

Post by Skotlex » Mon Jun 27, 2005 10:44 pm

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.
Top
Post Reply
  • Print view

15 posts • Page 1 of 1

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic