Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 85143 - want option emerge -del package to delete tar file after compile
Summary: want option emerge -del package to delete tar file after compile
Status: RESOLVED DUPLICATE of bug 33877
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-13 15:12 UTC by Benjamin Schulz
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schulz 2005-03-13 15:12:10 UTC
Hi,
I want a -del option in portage that causes portage to delete the package *.tar distfile. The reason for this is, that I want to be able to install gentoo on systems with not much disk space also.
When updating the system with emerge -uD world, it can hardly be calculated how much space the new distfiles cost, which are downloaded (since it is even unknown which files are downloaded, and often they are so many that it is impossible to calculate).
So it would be good, If I could write

emerge -uDdel world
with a del option that deletes the tarballs after emerge.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 solar (RETIRED) gentoo-dev 2005-03-13 15:34:47 UTC
options 'd' 'e' 'l' are already in use by emerge.

-----------------------------------------------------------------------------
  --debug (-d)
       Tells emerge to run the emerge command in --debug mode.  
       In this mode the bash build environment will run with the -x  option,
       causing it to output verbose debugging information to stdout.  --debug is
       great for finding bash syntax errors.

  --emptytree (-e)
       Reinstalls  all world packages and their dependencies to the current 
       USE specifications while differing from the installed set of packages
       as little as possible.  You should run with --pretend first to make
       sure the result is what you expect.

   --changelog (-l)
      Use this in conjunction with the --pretend action. This will show the 
      ChangeLog entries for all the  packages that will be upgraded.

-----------------------------------------------------------------------------

A feature similar to what you desire does exist however, that is used in gentoos 
uclibc profiles that deletes the contents of the SRC_URI from your distdir/
after the package has been successfully merged.

If you wanted to take advantage of that today you could do so by doing.
cp $(portageq envvar PORTDIR)/profiles/uclibc/profile.bashrc /etc/portage/bashrc
And then adding FEATURES=distclean to your /etc/make.conf
Comment 2 Benjamin Schulz 2005-03-13 15:55:52 UTC
I think this is a little bit "hidden" for the user. Should be more documented or archived easier.
BTW: Why was the cp necessary?
I think it would be good if gentoo comes already with a setting that this cp would not be needed.
Thanks
Comment 3 solar (RETIRED) gentoo-dev 2005-03-13 21:54:30 UTC
The cp was needed because the bashrc script is what provides the FEATURE.
Comment 4 TGL 2005-03-14 01:33:37 UTC
I've made an ugly oneliner to calculate the average "number of revisions per version" for packages that have big distfiles. For >=1MB, it's 0.44, and for packages >=10MB, it's 0.76. That means that someone using such a "keep distfiles empty" feature and who do regular updates, going through all revisions of his packages, will increase his mirrors bandwidth usage by 44% on >=1MB files, and 76% on >=10MB files. And that doesn't takes into account that some files are shared beetween several packages or packages versions (think of linux kernel sources for instance), which would increase this figures a bit more.

Despite this is a theoretical average figure, i think it's worth being taken into account. At least, if such a feature goes public, it should come with a warning saying that it's bad to be a bandwidth sucker, etc. But still, I personnaly prefer the "cron job doing a smart distfiles cleaning" approach, like for instance one of this scripts that are on the forum or on bug #33877.
Comment 5 Benjamin Schulz 2005-03-14 06:58:41 UTC
this implies two del options.
One that deletes the tar file after installing (and comes with warnings)
The other one that deletes the old tar file after an upgrade is made. This then should be the standard behaviour in portage.
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2005-03-14 07:18:51 UTC
Only way this will be implemented is by an external tool. Users will be free to use this in hooks.

*** This bug has been marked as a duplicate of 33877 ***
Comment 7 Benjamin Schulz 2005-03-14 07:49:31 UTC
the problem by an external tool is, that it has to be runned after emerge.
When doing an emerge -uD world an external tool would not solve any disk space problem. since durung emerge all will be stored on disk.
Comment 8 SpanKY gentoo-dev 2005-03-14 08:08:55 UTC
or you could code a local bashrc to do this for you
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2005-03-14 08:19:23 UTC
You might have missed the second sentence: "Users will be free to use this in hooks."

*** This bug has been marked as a duplicate of 33877 ***