Thank you for the interesting and useful script I will jump to play with it.

Yay! Thanks mudrii, it's always nice to hear someone likes what you've done :D It looks a bit mushy under screen but it does still run fine; I guess we should really sort that out as a priority as well, since it is so helpful to be able to log into someone's machine and sort it out via screen.

Just for ref about screen over ssh: Never allow root login, just make a user acct, allow the person to login as that (after opening a port on your router) and change root pw temporarily, so they can su and run screen -x. Ofc they can still do whatever they want as root so make sure you trust em :) but changing root pw after they've left and closing the port are the two things one should do.

Woops i forgot about the -x option which is for use on servers; it appears fine under screen. Be aware you don't get asked and also it will log to system log as well as disable X Terminal title bar updates (implicit -c console mode.) You only see output about configuration. (It's designed to be sent to a logfile.)

How about adding an option that calls "eclean packages" or "eclean distfiles" after the update?

Sounds like a great idea; I've been `persuaded' (that uberpinguin tsk tsk ;) to add layman -S and update-eix. The new portage changes mean that there's some other tweaks needed, all of which mean we are leaning towards a config file, rather than asking users to edit the script. Should be done in a week or so (the new sync is lovely.) Ranjit wants to sort out revdep-rebuild as well, so we'll probably have to add the capability to merge any list of packages the user specifies (apparently it's the same thing, and will also give us the module-rebuild stuff.) I don't personally think that'll make it this time.. ;) Heh, who cares?! Gentoo ROCKS! :P

One of the thing that usually annoys me with gentoo is that I always miss important build notes when I do an emerge -u world.
How do people usually deal with that? There used to be a program that kept track of them but I can't remember its name.

Edit: another thing that could be useful is to highlight services in /etc/init.d that have been updated and should be restarted.

Thanks for your script, it's really what I was missing when I needed to upgrade during the night and the compilation failed because of that or that...

You really should improve it and make a nice documentation and to make an ebuild!

Thanks again

That's a pretty vague comment. What do you think needs improvement? The script works pretty good for me, and the '-h' switch shows all the documentation I need. I agree, an ebuild would be easier for people to install and also upgrade. Should be an extremely easy ebuild to make._________________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

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="Update - emerge the way we like it ;)"
HOMEPAGE="http://forums.gentoo.org/viewtopic-t-546828.html"
SRC_URI="http://phpfi.com/241954?download"

# License of the package. This must match the name of file(s) in
# /usr/portage/licenses/. For complex license combination see the developer
# docs on gentoo.org for details.
LICENSE=""
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="app-shells/bash \
sys-apps/portage"

Thanks for the ebuild, really nice idea; I was thinking of doing one at some point, so we can specify portage-utils and gentoolkit as required deps. gentoolkit should be on everybody's system as should portage-utils. We don't actually use q in the program atm since it's not guaranteed to be there, but it'd make things easier.

Beta of update is here: http://phpfi.com/255656 if you want to test it out; bear in mind we are still coding the maintenance stuff (new revdep-rebuild in ~ gentoolkit and adding other stuff as per url.) MD5: 70bfd3a6d38e5aa6ab5aed1b8a53e662

The sync is much nicer, but for some reason it isn't running eix-sync. We're working on fixing that today, though, as well as the glsa and depclean bits (don't know if those'll be finished today mind.. ;) update --stop is really cool too ;) Bear in mind it saves a default config to /etc/update which we'll hose for the production release. (Thereafter I am reliably informed it'll handle upgrades, but this is first version with a config and we're more worried about getting the new stuff sorted for this release than ensuring a beta config is upgraded nicely.)

Sorry for the delays, we got held up by linux-headers being newer than running kernel, and Ranjit insisted on coding a check for it. Grrr ;) Honestly, isn't USE flag editing more important?!

HTH,
steveL.
dosbin $S/update should be "$S"/update btw; /msg greybot quotes on irc.freenode.org (links is a good one too ;)

Nice script. One suggestion if it is not already there. For laptops, I think it is useful fetching all the sources before actual emerging (compiling) starts. So we don't need to stay online during the update process. Even a shutdown at the and would be great. To achieve that I usually use this:

Actully at first I tried "update --help" then "update -h" but they gave me this;
Making /root/emerge as it does not exist
About to proceed (N to cancel)?
Then I thought help option does not work and tries to update, thus pressed N. Stupid me

And one bug. If I run revdep-rebuild within update it fails with this:

Thanks for the ebuild, really nice idea;
...
dosbin $S/update should be "$S"/update btw; /msg greybot quotes on irc.freenode.org (links is a good one too

Thanks for the ebuild tip. Here is an updated ebuild with the dependencies set. Also I made the SRC_URI more variable.

sys-apps/update/update-0.1.3.3d-r2.ebuild

Code:

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="Update - emerge the way we like it ;)"
HOMEPAGE="http://forums.gentoo.org/viewtopic-t-546828.html"
PHPFI=255656
SRC_URI="http://phpfi.com/$PHPFI?download"

# License of the package. This must match the name of file(s) in
# /usr/portage/licenses/. For complex license combination see the developer
# docs on gentoo.org for details.
LICENSE=""
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="app-shells/bash \
sys-apps/portage \
app-portage/gentoolkit \
app-portage/portage-utils"

Actully at first I tried "update --help" then "update -h" but they gave me this;
Making /root/emerge as it does not exist
About to proceed (N to cancel)?
Then I thought help option does not work and tries to update, thus pressed N. Stupid me

Not at all, stupid us; we'll fix that for the release version (sorry we decided to stop work on it for a couple of days, as we're burnt-out, and just have a nice weekend.) It is confusing I agree.

Quote:

And one bug. If I run revdep-rebuild within update it fails with this:

Yeah that's the new revdep-rebuild which uses package names by default (and no longer supports the switch). I think FuzzyRay is adding it back in for backwards-compatibility, but the beta version I posted does not use -X any more (since there's no need.)

It's better to go by package name and not version, as sometimes the old version will have been deleted from the tree, and in any case we want the "best-visible" (ie latest, according to settings) version.

found a bit of a bug.
update will hang with the app-emulation/virtualbox-additions
it asks for confirmation of a license agreement.

Yeah that's the same problem as with games (it did that to me when I installed EnemyTerritory and really freaked me out!) I am not sure how we get round it; I was told those kinds of ebuilds (interactive) are not supposed to be in the tree. (If they are OFC, they can not be in stable.) Ideas welcome!

Quote:

i think there also needs to be a --skipfirst option when resuming.

Yeah I guess you're right; I was trying to avoid long options (I coded the options check using getopts, and using long-options means a different mechanism [/msg greybot faq easily]) but we're running out of letters so I guess we should, heh. You can use SKIP='cat/pkg cat/pkg' update in the meantime, although it's better to do:

Code:

export SKIP='cat/pkg cat/pkg'
update blah

since the export means it applies to all subsequent updates from the same shell.

Ugh sorry, I could have sworn that worked here last week :) Could you outline what you'd like to be able to do in this situation? ATM you should be able to add virtual-additions to noCompile in /etc/update, but it'd be cooler if we start discussing what users want here and then we can just implement that, without having to argue on the best approach (man coders can be so annoying.. ;) Any other suggestions you have are welcome too. I really want to add autounmask and ufed support for myself.

BTW we tested it on a fresh 2007.0 install yesterday, and it turns out there we added some new regexes which are incompatible with BASH 3.1 (although ofc 3.2 is in stable, guess which one's on the install disk?) An emerge bash sorted that problem, but there were some weird things happening, I think to do with the expat upgrade, but noxHand had to go to school today (aww ;) so we can't work on his box till later. (I'm just glad he's come back to Gentoo from *cough* Ubuntu. ;) So we'll sort the regexes and do some more testing in the next day or two (I know the depclean is unfinished for one, and module-rebuild is untested since we didn't upgrade kernel as we 'had' to do the kernel-header check..)

TBH Ranjit told me not to put the beta in the thread, but I was getting stressed out about this as it's been taking up too much time.. *sigh* meh I hate it when he's right! ;p Ah well, at least I didn't put it at the top of the thread i guess.

Thanks for the feedback (and the ebuild ofc!) and for bearing with us while we get it working.

Great Script! Found one little bug: when i manually start a second emerge during the update run the portage message 'waiting for portage lockfile' (or something similar) causes it to stop with a message like

Code:

** update: Dependency Error - x11-libs/motif-config-0.10 requires waiting which is not in the install list!

Could you outline what you'd like to be able to do in this situation? ... I really want to add autounmask and ufed support for myself.

I guess removing the offending line from the emergeList file isn't proper.

For the noCompile, if it's not too much trouble, how about a file with the atoms one per line instead of an array in a file just like portage is configured with masks and USE.

autounmask support would be quite neat. I haven't found a USE flag editor I can stand. My /etc/portage/package.use is hand crafted and quite large at ~300 lines last checked. I'm sure much of it could be consolidated, but that's another thread.

I guess removing the offending line from the emergeList file isn't proper.

Nah it's a dirty hack ;P Main problem is that it will only affect that merge, and not subsequent ones.

Quote:

For the noCompile, if it's not too much trouble, how about a file with the atoms one per line instead of an array in a file just like portage is configured with masks and USE.

It's not particularly hard; how about if we allow that format and also an array? Ebuilds are pure BASH already and we both think it's a good idea to get people into mucking about with BASH. So user could either set noCompile=('cat/pkg' 'cat/pkg') or

Code:

noCompile="cat/pkg
cat/pkg
"

which is simpy a long string as far as BASH is concerned. We can enforce the line separation with IFS=$'\n' before we process it. (The last " can be on the line before ofc, it's just easier to edit if you don't have to worry about it.)

Quote:

autounmask support would be quite neat. I haven't found a USE flag editor I can stand. My /etc/portage/package.use is hand crafted and quite large at ~300 lines last checked. I'm sure much of it could be consolidated, but that's another thread.

Yeah we use package.use much more than make.conf, but we setup with ufed at the beginning. It's easy enough for us just to echo the local ones to the file and use ufed for the global ones. After all, why reinvent the wheel? We'd only be doing a dialog the same way in any case, so let someone else maintain it