Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
a small script for tweaking "update world"
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
mvc
Tux's lil' helper
Tux's lil' helper


Joined: 27 Nov 2002
Posts: 98
Location: Portugal

PostPosted: Sat Jul 05, 2003 11:50 pm    Post subject: a small script for tweaking "update world" Reply with quote

hi,

If you're one of those that (like me) don't have the time or bandwidth for constant "update world"s, but still want your system up to date to a certain degree then maybe this will be useful to you.

A while ago, I posted a functionality request but since today I had some spare time, I did it myself.

The main ideia is to have a file with 2 columns like this:
    ebuild-name updating-policy
    ...


where updating-policy can be one of:
    major
    minor
    release
    always
    never
    ask


Then, I created a python script to use this file to do a costumizable "update world". For example, if there is an entry "sys-apps/debianutils major" then the debianutils package will be updated only if the major version of the new package is newer than the one I already have. Likewise for "minor" and "release" options. If I put "always" the package will be always updated (at each new revision), and if I put "never" it will never be updated. The "ask" option will interactively ask me if I want to update the package, with an option to first see the changes that the new package introduces (extracts them from the ChangeLogs).

The usual way to run the script is:
c-update-world.py --policy update-policy

update-policy is usually "use-file" for using a file as explained above, but can also be "major","minor",... for applying the same policy for all the packages.

If there is no file or if there is a new package to update that isn't on the file, and you pass the "use-file" option, the script will interactively ask you for each package and create/append the file for you.

I didn't post the script here because I didn't know if I should (the script is small, but still has 280 lines). You can mail me to mvc@netcabo.pt if you're interested in this and I'll send it to you. If you're an administrator and don't see a problem in I posting the script here, then I don't mind of course.

Also I have to say that it is just a script that works for me, and it's certainly not bug-free. However I don't suppose it can damage seriously your system since all it does are a lot of "emerge --update ebuild" , but as always I don't take the responsability if it makes your computer explode.

regards
marco
Back to top
View user's profile Send private message
To
Veteran
Veteran


Joined: 12 Apr 2003
Posts: 1145
Location: Coimbra, Portugal

PostPosted: Sun Jul 06, 2003 12:27 am    Post subject: Reply with quote

Seams nice Marco.

You can allways post it on the portuguese forum;)


_________________

------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------
Back to top
View user's profile Send private message
mvc
Tux's lil' helper
Tux's lil' helper


Joined: 27 Nov 2002
Posts: 98
Location: Portugal

PostPosted: Sun Jul 06, 2003 2:00 am    Post subject: Reply with quote

ok -> https://forums.gentoo.org/viewtopic.php?p=400215#400215

By the way, I don't know why I'm unable to spawn an emerge process (the last commented lines on the script) so I had to make an ugly workaround. For using the script, copy it to a new file (e.g c-update-world.py), make it executable, and run as:

Code:
c-update-world.py && sh ~/.upkgs_tmp


This workaround uses ~/.upkgs_tmp as a temporary buffer of commands, so they can be executed outside the c-update-world.py process with no problems.

regards
Marco
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