View previous topic :: View next topic |
Author |
Message |
manouchk Apprentice
Joined: 08 May 2006 Posts: 288 Location: Vitória (ES), Brasil
|
Posted: Wed Jan 30, 2008 1:11 am Post subject: |
|
|
For the one that like does not like to restart 100 times emerge, I made a very bad python script certainly full of bugs etc...
The principle is to run emerge -uDpv world or similar once and stop it (Ctrl-c), a bit after displaying the list of packages. Then run the script. The script get the list of packages from emerge -resume --resume --pretend.
Then it try to install the 1st package of the list. If it's okay it goes on
If not, it remove the package from the start of the list and put at the end...
It may end or not but it will most probably install more package than a simple emerge --....etc
If you want to stop just use your keyboard!
HéHé! One known problem is that you don't read the warning and may hands up with some few problems.
SOmething that is shurely missing is to make 2 threads : one for downloading the packages and another for compilation that would boost up things especially with slow connection like mine ! Here I use dtu download stuff and I don't yet know a dman thing about how it works!
Code: |
import os,sys
def instal(pack):
a='emerge -1 '+pack
return os.system(a)
class pack_update:
def __init__(self):
self.packlist=[]
self.nostop = 1
#pass
def get_packages(self):
#get package list
os.system("emerge --resume --pretend>last_emerge")
l=open("last_emerge")
ll=l.readlines()
#put package names in packlist
for lll in ll[:]:
if lll.count('['):
l4=lll.split(' ')
for i in l4:
if i.count('-')>=2 and i.count('/')>=1:
self.packlist.append("="+i)
def print_packlist(self):
print self.packlist
def insert_package(self,aditionalpack):
self.packlist.insert(0,aditionalpack)
def install_packlist(self):
#try to install all packages if one packages fail, it will install it in the end...
#it also tries to install another packages before
while self.nostop and self.packlist:
if instal(self.packlist[0]) != 0:#if error
self.packlist.append(self.packlist.pop(0))
else:self.packlist.pop(0)#if no error
if __name__ == "__main__":
import threading
import time
import threading
class MyThread ( threading.Thread ):
def __init__(self):
threading.Thread.__init__(self)
self.P=pack_update()
self.P.get_packages()
self.P.print_packlist()
for pack in sys.argv[1:]:
self.P.insert_package(pack)
def run ( self ):
while self.P.nostop and self.P.packlist:
self.P.install_packlist()
A=MyThread()
A.start()
while A.P.nostop:
if "" == raw_input():
A.P.nostop = 0
print "stopped!"
|
|
|
Back to top |
|
|
sundialsvc4 Guru
Joined: 10 Nov 2005 Posts: 436
|
Posted: Wed Jan 30, 2008 3:34 am Post subject: |
|
|
I routinely do nice emerge --sync, followed by nice emerge --ask --deep --update world.
With --ask, I get to see a list of what would be "emerge"d, and then I make a decision as to whether or not to proceed at this time. Sometimes, I do. Sometimes, I choose to individually emerge a smaller subset of packages. And sometimes, I choose to wait another week or two.
Mostly, I want to know "what's comin' down," but that does not mean that I automatically want to take action now. Furthermore, when (from time to time) I do encounter an emerge-problem, I'm quite content to wait a day or so to see if the problem "resolves itself." It usually does. The folks who are releasing these packages will, from time to time (and quite inevitably), "goof up" and need to adjust something -- which they will very quickly do. "No harm, no foul."
I should add that, in this all volunteer(!) effort, the overall sustained level of quality that has been achieved is excellent, and to all of you who are responsible for a part of that (you know who you are...), I am very happy to say ... thank you! we (all) appreciate you! |
|
Back to top |
|
|
cord Guru
Joined: 28 Apr 2007 Posts: 344
|
Posted: Wed Dec 18, 2013 11:43 am Post subject: |
|
|
What is the difference between 'emerge -avuDN world' and 'emerge -avuDN @world'? |
|
Back to top |
|
|
|
|
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
|
|