Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge -U world - How often
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
manouchk
Apprentice
Apprentice


Joined: 08 May 2006
Posts: 288
Location: Vitória (ES), Brasil

PostPosted: Wed Jan 30, 2008 1:11 am    Post subject: Reply with quote

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 :cry: ! 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
View user's profile Send private message
sundialsvc4
Guru
Guru


Joined: 10 Nov 2005
Posts: 436

PostPosted: Wed Jan 30, 2008 3:34 am    Post subject: Reply with quote

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 ... :D :D thank you! :D :D we (all) appreciate you! :D :D
Back to top
View user's profile Send private message
cord
Guru
Guru


Joined: 28 Apr 2007
Posts: 344

PostPosted: Wed Dec 18, 2013 11:43 am    Post subject: Reply with quote

What is the difference between 'emerge -avuDN world' and 'emerge -avuDN @world'?
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
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Page 10 of 10

 
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