Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Hassle-free emerge -uD world (update-world v1.8)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mci_nano
n00b
n00b


Joined: 28 Nov 2004
Posts: 32
Location: BS; Germany

PostPosted: Wed Dec 13, 2006 6:27 pm    Post subject: Reply with quote

count_zero wrote:

Try this version out, I made some changes which should help utf-8 problems. I can't test utf-8 problems myself, so you'll have to help.


It works :-D
_________________
AMD Athlon 64 3700+; Nvidia 7800GT; 1GB RAM
Back to top
View user's profile Send private message
iBormuth
n00b
n00b


Joined: 13 Jan 2004
Posts: 59

PostPosted: Thu Dec 14, 2006 9:42 pm    Post subject: Why sort ? Reply with quote

This is a nice one which I happen to use frequently. Thanks a lot.
Anyway, why do you sort the list before you write to emergelist? I always thought there was a logic behind the order portage handles packages.
Think you have an 'emerge -e world' that died on its way. If your script didn't sort, you could easily run 'update-world -p' and manually remove the first whatever lines from emergelist.
I'd remove the sort command or at least make it optional.
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Thu Dec 14, 2006 11:45 pm    Post subject: Re: Why sort ? Reply with quote

iBormuth wrote:
This is a nice one which I happen to use frequently. Thanks a lot.
Anyway, why do you sort the list before you write to emergelist? I always thought there was a logic behind the order portage handles packages.
Think you have an 'emerge -e world' that died on its way. If your script didn't sort, you could easily run 'update-world -p' and manually remove the first whatever lines from emergelist.
I'd remove the sort command or at least make it optional.

Nah. The sort command is to make it easier to find packages that you want to edit out. When you run update-world --install, the entire list gets sent back to portage, which then reorders it again anyway. Check the sorted emergelist, and then check it again once the world starts compiling--you'll find that it's back in the order that portage wants it in. And you can still remove/change packages if the process dies for some reason without running update-world --prepare again. Just edit the emergelist how you like, and restart the update-world --install.

If you REALLY want things compiled in the "right" order, check out how to use Guenther's script to make your emerglist here.

I don't think that there should be any problem with the way things are now. If you can find a circumstance in which I'm wrong, let me know! 8)
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Wed Dec 20, 2006 1:59 pm    Post subject: Reply with quote

@count_zero, I notice your website with the update-world file has been down for a while. Did your server get hammered because of this script? Will it be back up soon?
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Thu Dec 21, 2006 5:45 am    Post subject: Reply with quote

ryker wrote:
@count_zero, I notice your website with the update-world file has been down for a while. Did your server get hammered because of this script? Will it be back up soon?

Yeah, looks like my webhost is flaking out again.
I've put up a mirror on the front page in case the main website is down.
You can access it here: http://dixieflatline.homelinux.org/files/gentoo
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
massysett
Apprentice
Apprentice


Joined: 06 Jan 2006
Posts: 296
Location: Silver Spring, Maryland USA

PostPosted: Fri Dec 22, 2006 1:11 am    Post subject: Reply with quote

Countzero: thanks. I saw your script in the GWN. This script is a great idea. I will try it next time I update my system (which I put off as long as possible.)

I was just emerging the latest GNOME, which is a ton of packages. One of them failed because a package it depended on needed to be emerged with a different USE flag. That got me thinking that it would have been neat if I could use your script to do any big emerge, not just world updates.

Maybe in the future it would be possible to use piped in output from emerge -p? Then any sort of emerge--just a single package with tons of dependencies, or a world update. For instance:

Code:
# emerge -p gnome | update-world


Or

Code:
# emerge -puDN world | update-world


Of course then you might not call the script update-world anymore :) This feature should be a part of emerge, or gentoolkit, or something, because it's very useful. Thanks for the script.
_________________
Draft Windows-to-Linux Guide
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Fri Dec 22, 2006 3:56 am    Post subject: Reply with quote

massysett wrote:
Countzero: thanks. I saw your script in the GWN. This script is a great idea. I will try it next time I update my system (which I put off as long as possible.)

I was just emerging the latest GNOME, which is a ton of packages. One of them failed because a package it depended on needed to be emerged with a different USE flag. That got me thinking that it would have been neat if I could use your script to do any big emerge, not just world updates.

Maybe in the future it would be possible to use piped in output from emerge -p? Then any sort of emerge--just a single package with tons of dependencies, or a world update. For instance:

Code:
# emerge -p gnome | update-world


Or

Code:
# emerge -puDN world | update-world


Of course then you might not call the script update-world anymore :) This feature should be a part of emerge, or gentoolkit, or something, because it's very useful. Thanks for the script.

Good idea!
This is something that can already be done, with some sed filtering:
Code:
emerge -p gnome | sed -n 's/^\[ebuild[[:upper:][:lower:] ]*\]\ \([[:lower:][:upper:]0-9._+\/-]*\).*/=\1/p' > ~/.update-world/emergelist
update-world --install


Not as easy as
Code:
emerge -p gnome | update-world

but it works.
I'll try to make it easier to do this in the future.
Happy updating! :D
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
12345moon12345
n00b
n00b


Joined: 24 Dec 2006
Posts: 27

PostPosted: Sun Dec 24, 2006 11:03 am    Post subject: getting better all the time Reply with quote

Love this script, thanks Countzero :)
I changed it a little bit so it doesn't use emerge on the final install but uses temerge instead.
Temerge is a script that mounts /var/tmp/portage as tmpfs which:
- greatly improves speed
- reduces noice of harddisk
- keeps my harddisk good for more years of reliable duty

it's a very simple change to update-world script:
cat $emergelist | xargs emerge -1
becomes: cat $emergelist | xargs temerge -1

off course the temerge script needs to be on your pc,
download or look for more info on temerge here

maybe more people would like my idea or the two scripts could also be combined (with a commandline option or variable in the script)

another idea: after everything has compiled, run prelink -a ??
another suggestion: at the beginning of the script: emerge --sync ??
just trying to think with you, do your own thing, I like it.
Back to top
View user's profile Send private message
STEDevil
Apprentice
Apprentice


Joined: 24 Apr 2003
Posts: 156

PostPosted: Sun Dec 24, 2006 11:41 pm    Post subject: Reply with quote

drjimmy42 wrote:
I personally think that revdep should be built into emerge as it seems silly to me to allow emerge to look as if it finished successfully while silently breaking lots of other things.


Amen to that. For years I have been amazed at the intuitiv stupidity in not automatically have emerge run a revdep-rebuild after finishing. I would think it goes without saying that 99,9% of users would like an updated WORKING system instead of an updated half BROKEN one.
So please, here is another plea for revdep-rebuild being auto-integrated into your excellent script. I just simply cant think of a reason why a normal user would like to stop with a halfbroken system when updating if the update script could just as well finish all the way to the end.

[rant]
I must say that the last 6 months have brought me several greate tools that for me has been missing badly in Gentoo since the very start. eix, cfg-update and now update-world is finally adding to emerge some of the huge pieces its missing to qualify as a modern useroriented packagemanager. I really like Gentoo in general, but sometimes the last years I have just wanted to bang my head against the desk in frustration of how aqward and userunfriendly some things are handled. These 3 new tools fixes a lot of those constantly reoccuring annoyances and enable me to use more of my computertime for work and entertainment instead of maintainace.
Hurray for a brighter, more userfriendly Gentoo future! :)
[/rant]
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Mon Dec 25, 2006 4:03 am    Post subject: Reply with quote

@12345moon12345:
A variable is easy to set, I can include it with the next release so you can more easily choose which emerge-wrapper to use in this script. I've never tried (or heard of) temerge, but I'll have to check it out!

@STEDevil:
You're right, revdep-rebuild is something that should be run after updating a system. I'll have to see how I can make it work with update-world, it's probably not going to be a trivial thing.


Merry Christmas, all!
count_zero
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
riaanho
n00b
n00b


Joined: 02 Nov 2004
Posts: 16
Location: Switzerland

PostPosted: Tue Jan 02, 2007 2:44 pm    Post subject: KDAR and K3B build before KDELIBS Reply with quote

Hi count_zero

I used your script for the 1st time and ran into a problem where a KDE application KDAR was rebuild before KDELIBS.
I then used the script provided by Guenther Brunthaler and recompiled my entire system after upgrading to GCC 4.1.1

I also think that the generated file should be in the correct emerge sequence or did I do something wrong.

I think your script has great potential to be used whenever one wants to stay current with World.

Regards
Adriaan
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Tue Jan 02, 2007 5:24 pm    Post subject: Reply with quote

@12345moon12345
Thanks for the temerge tip. It works nicely on my machine. Although, it's probably not very useful if your machine has <1G RAM.

@count_zero
I notice that the server and the mirror are both down. I have webspace for a mirror and I'd be happy to donate some of it for this script. Just pm or email me if you would like me to mirror the files.
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
vinboy
n00b
n00b


Joined: 18 Jun 2006
Posts: 69

PostPosted: Fri Jan 05, 2007 11:42 pm    Post subject: Reply with quote

hi
sorry for being a noob.

so this script is used for normal updating? like the one we do every 2 weeks.
I assume this script is not used for upgrading GCC (having to compile everything).
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Sat Jan 06, 2007 4:11 am    Post subject: Reply with quote

vinboy wrote:
hi
sorry for being a noob.

so this script is used for normal updating? like the one we do every 2 weeks.
I assume this script is not used for upgrading GCC (having to compile everything).


This script can be used for compiling any number of packages, but is most useful when you're updating a large number of packages that you don't want to supervise. So yes, you can use it for both normal updates (emerge -uD world) and complete system updates (emerge -e world). If you're updating GCC, you should probably update that first and switch to the new profile (gcc-config) before using this script, or you might just be recompiling your world with your old GCC.
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
vinboy
n00b
n00b


Joined: 18 Jun 2006
Posts: 69

PostPosted: Sun Jan 07, 2007 3:32 am    Post subject: Reply with quote

why not include this in portage or in the portage repository with an ebuild?
this is something useful for many of us.

great job! :P
Back to top
View user's profile Send private message
KevinLarson
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2005
Posts: 126
Location: Chaimpaign, IL

PostPosted: Tue Jan 16, 2007 5:55 am    Post subject: Reply with quote

I realized my problem was related to emerge, not this script.
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Tue Jan 16, 2007 6:08 am    Post subject: Reply with quote

vinboy wrote:
why not include this in portage or in the portage repository with an ebuild?
this is something useful for many of us.

great job! :P


It would be nice to see this as part of the gentoolkit package. Having a seperate ebuild for it seems kind of silly since it's just a small script.
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
ASID
Apprentice
Apprentice


Joined: 22 Mar 2006
Posts: 195

PostPosted: Tue Jan 16, 2007 8:26 am    Post subject: Reply with quote

If it's possible, could you please add something like
Code:
update-world --resume
to use in case of an unexpected shutdown?

Keep up the great job!
:wink:
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Tue Jan 16, 2007 3:36 pm    Post subject: Reply with quote

ASID wrote:
If it's possible, could you please add something like
Code:
update-world --resume
to use in case of an unexpected shutdown?

Keep up the great job!
:wink:


This script has --resume built in. If for some reason the emerge gets halted (power failure, control-c, etc.), the 'emergelist' and 'failed list' are preserved. All you have to do to continue on is to run update-world --install, and the process will pick up right back where it left off.
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
ASID
Apprentice
Apprentice


Joined: 22 Mar 2006
Posts: 195

PostPosted: Thu Jan 18, 2007 11:28 am    Post subject: Reply with quote

Quote:
This script has --resume built in. If for some reason the emerge gets halted (power failure, control-c, etc.), the 'emergelist' and 'failed list' are preserved. All you have to do to continue on is to run update-world --install, and the process will pick up right back where it left off.


Great! Thanx for the tip... :D
Back to top
View user's profile Send private message
drjimmy42
Guru
Guru


Joined: 03 Feb 2003
Posts: 512
Location: Nashua, NH

PostPosted: Thu Jan 25, 2007 3:33 pm    Post subject: Reply with quote

If one of that packages that needs updating has an unsatisfied patch restriction, I get the message

Code:

WARNING: The following packages have Fetch Restriction turned on:
app-emulation/crossover-office-bin-6.0.0

Please download the sources to /usr/portage/distfiles/ and rerun this script.


From the changelog at the top of the script it says that fetch restriction is handled properly in 1.5. I was wondering why this behavior is like this. IMHO it would be better for the script to go over unsatisfied fetch restrictions as any other failure and report it at the end. Is there a reason this was changed?

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

Also, this brings up another point. I have noticed that if the last package in emergelist is the one to fail, update-world attempts to start up again and gets errors from emerge because it didn't pass it a package name. No harm done since its all done anyway, but a check here would make the output a lot prettier and easier to understand.

Thanks again for the fabulous script
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Thu Jan 25, 2007 5:37 pm    Post subject: Reply with quote

Quote:
If one of that packages that needs updating has an unsatisfied patch restriction, I get the message

Code:

WARNING: The following packages have Fetch Restriction turned on:
app-emulation/crossover-office-bin-6.0.0

Please download the sources to /usr/portage/distfiles/ and rerun this script.



From the changelog at the top of the script it says that fetch restriction is handled properly in 1.5. I was wondering why this behavior is like this. IMHO it would be better for the script to go over unsatisfied fetch restrictions as any other failure and report it at the end. Is there a reason this was changed?


That's how it's supposed to work--it lets you know there is a fetch restriction so you can download the file before proceeding. Did you download the file and put it in your disfiles directory? If you did and it still gives the warning, then there's a problem.
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
drjimmy42
Guru
Guru


Joined: 03 Feb 2003
Posts: 512
Location: Nashua, NH

PostPosted: Thu Jan 25, 2007 7:13 pm    Post subject: Reply with quote

count_zero wrote:


That's how it's supposed to work--it lets you know there is a fetch restriction so you can download the file before proceeding. Did you download the file and put it in your disfiles directory? If you did and it still gives the warning, then there's a problem.


Yeah, I saw the code where you check for it. It works as designed and if the file is there it works, its just that I use this script so that I can update unattended and deal with issues like breakages later. To me, a fetch restriction is as good as a break and I don't want to hold up the rest of the update for either one. I haven't gotten around to buying crossover-office yet and it just sits there glaring at me.

Its no big deal, I just commented the check out of the copy of the script I had, I was just wondering why this block to updating is different than others. Thanks again.
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Thu Jan 25, 2007 8:35 pm    Post subject: Reply with quote

drjimmy42 wrote:
count_zero wrote:


That's how it's supposed to work--it lets you know there is a fetch restriction so you can download the file before proceeding. Did you download the file and put it in your disfiles directory? If you did and it still gives the warning, then there's a problem.


Yeah, I saw the code where you check for it. It works as designed and if the file is there it works, its just that I use this script so that I can update unattended and deal with issues like breakages later. To me, a fetch restriction is as good as a break and I don't want to hold up the rest of the update for either one. I haven't gotten around to buying crossover-office yet and it just sits there glaring at me.

Its no big deal, I just commented the check out of the copy of the script I had, I was just wondering why this block to updating is different than others. Thanks again.


You can always add '>=app-emulation/crossover-office-bin-6.0.0' (or greater than your installed version) to package.mask if you don't want to upgrade it. I saw this as a better solution than not reporting a fetch restriction, which can often be resolved using wget or downloading it from the website.
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
TehZeppelin
n00b
n00b


Joined: 09 Dec 2006
Posts: 18

PostPosted: Sun Feb 11, 2007 1:56 pm    Post subject: Reply with quote

count_zero wrote:

Quote:

[ebuild FU ] dev-java/sun-jdk-1.4.2.13 [1.4.2.12-r2] USE="X alsa -doc -examples -jce -nsplugin" 35,509 kB
. . .
Fetch Restriction: 1 package (1 unsatisfied)


You'll need to download the sources for sun-jdk from the website and copy to /usr/portage/distfiles/ before running the script.
Fix these problems before re-running update-world.

I should be able to make some changes to the script so it handles these errors better.


Where can you get those sources? :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
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