Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Havn't got the idea of emerge -e system
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
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Wed Feb 19, 2014 1:19 pm    Post subject: Havn't got the idea of emerge -e system Reply with quote

I usually update the system using
Code:
emerge -avuDNtk world


However, recently I found some website saying that it is needed to run

Code:
emerge -e system


My question is about the meaning of -e system. According to manpage

Quote:
--emptytree (-e)
Reinstalls target atoms and their entire deep dependency tree, as though no
packages are currently installed. You should run this with --pretend first to
make sure the result is what you expect.


However, this expanalation does not make sense for me after some searching on websites

Q1: what are target atoms?
Q2: After running this command, it seems many packages require reinstallation. While these reinstallations do not involve any chnage in USE flags.
Q3: If we run emerge -ave system , some of the package names are GREENER than others. However, it is not clear for me why these packages are highlighted, as one can not see any changes on USE flags.
Q4: If I run emerge -ave system a second time immediately after the first time finished, the packages that have been updated again require update for the second time. So what has been done for the first time?
Q5: I have followed the instructions of emerge manpage You should run this with --pretend first to make sure the result is what you expect. by running emerge -apet system , I could not see any useful information that I need to be aware of, except for many reinstalls.

Can anyone shed some light on this issue?[/b]


Last edited by diablo465 on Thu Feb 20, 2014 5:46 am; edited 1 time in total
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 318

PostPosted: Wed Feb 19, 2014 2:38 pm    Post subject: Re: Havn't get the ideal of emerge -e system Reply with quote

My understanding is
Q1 atoms to which action is to be taken (man 5 ebuild might help)
Q2 it installs everything again, ignoring if USE flags have not changed or if currently installed is the most up to date
Q3 highlighted will be part of the world set
Q4 see answer to Q2, it will install everything again
Q5 -e option will install more than -D option, it will do lots of work so is worth you checking it's really what you want to do
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Wed Feb 19, 2014 3:33 pm    Post subject: Re: Havn't get the ideal of emerge -e system Reply with quote

diablo465 wrote:
Q1: what are target atoms?

Usually the target is what follows the options of the emerge command.
If I emerge -blahblah package_name then the target is package_name.
In your case here, it's the system set.
diablo465 wrote:
Q2: After running this command, it seems many packages require reinstallation. While these reinstallations do not involve any chnage in USE flags.

In this particular case of the -e option, packages do not properly need anything. You actually are requiring to rebuild them irrespective of their needs for update.
The -e option requires all the packages of the target to be rebuilt + a couple of others that are some reverse dependencies, depending on other options settings. (That's explains Q4 as well)

BTW, You never need to emerge -e system on a usual basis.
Only after updating a new gcc with significant version changes or when your system has spent far too much time without any update and an emerge world would not be achieved troublefree in these conditions.
_________________
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Thu Feb 20, 2014 6:01 am    Post subject: Re: Havn't get the ideal of emerge -e system Reply with quote

jonathan183 wrote:
My understanding is
Q3 highlighted will be part of the world set
do

But I guess ALL of packages are in the world set. So by your explanation @world does not include all the packages?

jonathan183 wrote:
Q5 -e option will install more than -D option, it will do lots of work so is worth you checking it's really what you want to do


But I don't know what needs to be checked, as all the installed packages will be reinstalled by command emerge -e system.

My updated understanding to emerge -e system is that it is quite similar to redraw/rerender a graph generated by scripts (like autocad files, inkscape files, eps files and so on), which may not involve alternations/updates.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9527
Location: beyond the rim

PostPosted: Thu Feb 20, 2014 8:16 am    Post subject: Re: Havn't get the ideal of emerge -e system Reply with quote

diablo465 wrote:
But I guess ALL of packages are in the world set. So by your explanation @world does not include all the packages?

Yes and no. @world is a list of packages you want to have installed specifically. In that meaning it doesn't include all installed packages, and that is used for the highlighting. But it is generally assumed that all installed packages are listed in @world or are a (indirect) dependency of a package in @world. Hope that makes it clear.

Quote:
But I don't know what needs to be checked, as all the installed packages will be reinstalled by command emerge -e system.

Simple answer is that you only want to use the -e option if you actually know what you're doing. Under normal circumstances you don't need it.
The long version of -e is --emptytree which means that portage will assume that absolutely no packages are installed at all, and therefore ALL requested packages and ALL their dependencies will be reinstalled everytime you use that option. This can sometimes be useful if you make some generic changes like changing your CFLAGS and want to make sure all packages are built with the new settings. But as said, for normal operation you don't need it.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Feb 20, 2014 8:53 am    Post subject: Reply with quote

Plus if you use -e everyday your electric bill will no doubt raise, and you will earn the hatred of Greenpeace.

Seriously, there's no point in doing that every time you update. The day you need to use -e, you will know. So don't worry about it.
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Thu Feb 20, 2014 10:45 am    Post subject: Reply with quote

i92guboj wrote:
Seriously, there's no point in doing that every time you update. The day you need to use -e, you will know. So don't worry about it.


emerge -avuDn world does both the job of watching change of flags, which emerge -e system takes care of, and updating from repo. This made emerge -e system redundant somehow.

I'd better wait until the day comes out.
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 318

PostPosted: Thu Feb 20, 2014 1:35 pm    Post subject: Re: Havn't get the ideal of emerge -e system Reply with quote

diablo465 wrote:
jonathan183 wrote:
My understanding is
Q3 highlighted will be part of the world set
do

But I guess ALL of packages are in the world set. So by your explanation @world does not include all the packages?

jonathan183 wrote:
Q5 -e option will install more than -D option, it will do lots of work so is worth you checking it's really what you want to do


But I don't know what needs to be checked, as all the installed packages will be reinstalled by command emerge -e system.

My updated understanding to emerge -e system is that it is quite similar to redraw/rerender a graph generated by scripts (like autocad files, inkscape files, eps files and so on), which may not involve alternations/updates.


Highlighted packages are those you installed (rather than pulled in as a dependency). They are added to /var/lib/portage/world and you installed them using emerge some_package_name rather than emerge -1 some_package_name. I have had to tidy up /var/lib/portage/world occasionally when I forgot to use emerge -1 :oops:

I have run emerge -e world on two occasions, when trying to work out why md5sum for some files did not match expected values (when setting up tripwire) - which turned out to be packages modifying files they don't own :roll:

I usually do updates using
Code:
emerge --sync
emerge -uDNf world
emerge -avuDN system
dispatch-conf
emerge -avuDN world
dispatch-conf

which works for me, ymmv ;)
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2573
Location: Here and Away Again

PostPosted: Fri Feb 21, 2014 8:59 am    Post subject: ><)))°€ Reply with quote

Teegrins!

diablo465 wrote:
emerge -avuDn world does both the job of watching change of flags, which emerge -e system takes care of, and updating from repo. This made emerge -e system redundant somehow.

I'm thinking you meant emerge -avuDN world, that is, --newuse (-N) instead of --noreplace (-n) from which the latter would add packages to the world-file if they're not already present.

Even though in this case it might actually do nothing(?), I'm rather certain you do not want that. ^^;

Furthermore, I believe --newuse is an overkill for many occasions, for it will trigger re-builds for packages that have had their USE-flags changed regardless of the actions of the user. This means that the change may or may not have any impact whatsoever to the behaviour of the built software. This is probably most apparent for those on unstable, where they probably see things like sys-devel/gcc being built a lot (and it's actually not having any impact on their system, other than perhaps warming up the room more often depending on the cooling situation et al., but that is not to say that I don't know there being users that find a CPU not being used at all times being CPU going to waste; I do think there might be better uses for those cycles, but I digress).

I do think it's certainly a good idea to use at least occasionally, as it may bring up changes such as additional features the user might like to make use of. I personally used to have it in my daily update-routine, but that has come to change quite a while ago.

When I have made changes to USE-flags, I might use --changed-use, which will only take into consideration the USE-flags touched by the user.


As for --empty-tree (-e), as mentioned by few already, if you're not sure what it is about, don't do it. In some sense, I think it may be a good idea after first having installed the system (and perhaps even then only the system-set (@system)), or in situations already mentioned by others, but I, too, don't see it in any way necessary for the normal use-case.


Just my thoughts/views on it. I'm sure I'll be corrected if I'm mistaken. ^^
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
Killerchronic
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2007
Posts: 91
Location: UK

PostPosted: Mon Jun 16, 2014 9:02 am    Post subject: Reply with quote

i92guboj wrote:
Plus if you use -e everyday your electric bill will no doubt raise, and you will earn the hatred of Greenpeace.

Seriously, there's no point in doing that every time you update. The day you need to use -e, you will know. So don't worry about it.


I really want to earn the hate of greenpeace but not this way.

-e is very much something you will know you need to use... "-avuDN world" covers everything in an update (excluding perl-cleaner/pythonupdater etc). -e recompiles everything, if its not covered by the first command i mentioned then you don't need it. Generally -e is used when something is completely fecked and its used as a last resort, recompile everything, if that still doesn't work then you have a pretty big issue on hand (assuming you did all the normal stuff first).
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