Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some scripts to assist regular updates.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Aug 01, 2005 5:49 pm    Post subject: Some scripts to assist regular updates. Reply with quote

In case there's interest, here are some still-evolving shell scripts I wrote for
managing regular updates. Essentially, they are an elaborate way to minimize
the trouble of a full "emerge -uDN world && emerge --depclean && revdep-rebuild" update.

These are similar in intent to the "glcu" scripts, but I din't like how that program dealt with a few things.

Use or dispose of as you wish, but provide source (which is hard not to do, since they are just bash scripts!). They are hereby distributed under GPL v2.

Here they are:

1. emerge-preupdate.sh:

This is usually run with the "-c" option through a daily or weekly cron
operation. It looks at the output of "emerge -puND world" and then compiles (or
downloads, if you have BINHOST set) binary packages of whatever it can. It
should not emerge anything to the live system. The idea is to prebuild updates
when I am asleep so that when I actually the update, it is just unpacking a
binary. Some packages will fail because of updated-dependency problems, and
this cannot be avoided in any reasonable way.

-c means it creates a lockfile, so multiple machines NFS-sharing the same portage
tree don't try to sync simultaneously, and that it mails the results to root.

output looks something like this:

Code:

HOSTNAME is tock
EBUILD is world
PID is 31192
SYNCing not done in 2 days.  Syncing now.
FETCHING
updating EIX database now.
PRE-BUILDING
=app-text/enchant-1.1.6:                pre-built (or downloaded) okay
=app-office/abiword-2.2.8-r1:           PREBUILD ERROR
=net-misc/rsync-2.6.0-r6:               pre-built (or downloaded) okay

and so on.


The script is here:
http://tock.no-ip.org/~abe/emerge-scripts/emerge-preupdate.sh

2. emerge-pkgupdate.sh:
The purpose of this script is to fix the problem that emerge's "-k" option is totally broken right now. This script checks the output of "emerge -puND world" and then individually runs "emerge -1k" on the packages listed.

It has a "-p" pretend option, a "-f" fetch option, and a "-q" quiet option.

In particular, running this after emerge-preupdate.sh should use the binary packages brewed the previous night.

http://tock.no-ip.org/~abe/emerge-scripts/emerge-pkgupdate.sh

3. emerge-update.sh:

Finally, this script is simply a menu-based system for reminding me how to do a full update. Its usage is clear.


http://tock.no-ip.org/~abe/emerge-scripts/emerge-update.sh


That is all. If you use them, check to see if I defined any file paths (/usr/lan, /usr/local/portage, ... ) that you don't have. They aren't polished for general use, but seem to work fairly well for me. However, I regularly tweak them in various ways as problems come up.


I know these are pretty trivial bash scripts, but they seem pretty helpful. If you have suggestions, please let me know.
Updates will eventually be seen here:
http://tock.no-ip.org/~abe/emerge-scripts


Last edited by adsmith on Mon Aug 15, 2005 3:23 am; edited 1 time in total
Back to top
View user's profile Send private message
PiRmD
n00b
n00b


Joined: 22 Apr 2005
Posts: 49
Location: Daya Bay NPS-Shenzhen-China

PostPosted: Mon Aug 15, 2005 2:58 am    Post subject: Reply with quote

I' m interesting to have a look at your scripts but the links seem to be out of order. :(
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Aug 15, 2005 3:22 am    Post subject: Reply with quote

ermm, they should be alright. Try again -- maybe my connection was timed out from my active torrents
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Aug 15, 2005 3:24 am    Post subject: Reply with quote

Note: if anyone is actually watching this topic, I made enormous changes to a couple of the scripts -- notably, emerge-update.sh is now run through dialog, not my previous hacked-up menu.
Back to top
View user's profile Send private message
PiRmD
n00b
n00b


Joined: 22 Apr 2005
Posts: 49
Location: Daya Bay NPS-Shenzhen-China

PostPosted: Mon Aug 15, 2005 10:07 am    Post subject: Reply with quote

Strange. I still can't access your files. I've tried both at home and from the work. Seem I'm unlucky today as I was just considering working on a script like yours...
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Aug 15, 2005 12:10 pm    Post subject: Reply with quote

Sorry about that ... I'm really not sure why you'd be having problems, as I can access them fine.

If you PM me your email address, I can mail them to you
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
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