Ejemplo n.º 1
0
    def apply(self, st):
        fcmd = ''

        cmd = 'pacman -S --noconfirm '
        a = False
        for x in st.pending:
            if st.pending[x] == 'install':
                cmd += x + ' '
                a = True

        if a:
            fcmd += cmd + '; '

        cmd = 'pacman -Rc --noconfirm '
        a = False
        for x in st.pending:
            if st.pending[x] != 'install':
                cmd += x + ' '
                a = True

        if a:
            fcmd += cmd

        utils.shell_bg(fcmd,
                       output='/tmp/genesis-pacman-output',
                       deleteout=True)
Ejemplo n.º 2
0
 def apply(self, st):
     cmd = 'emerge '
     cmd2 = 'emerge --unmerge'
     for x in st.pending:
         if st.pending[x] == 'install':
             cmd += ' ' + x
         else:
             cmd2 += ' ' + x
     shell_bg('%s; %s'%(cmd,cmd2), output='/tmp/genesis-portage-output', deleteout=True)
Ejemplo n.º 3
0
 def apply(self, st):
     cmd = 'portupgrade -R'
     cmd2 = 'pkg_deinstall -r'
     for x in st.pending:
         if st.pending[x] == 'install':
             cmd += ' ' + x
         else:
             cmd2 += ' ' + x
     utils.shell_bg('%s; %s'%(cmd,cmd2), output='/tmp/genesis-ports-output', deleteout=True)
Ejemplo n.º 4
0
 def apply(self, st):
     cmd = 'portupgrade -R'
     cmd2 = 'pkg_deinstall -r'
     for x in st.pending:
         if st.pending[x] == 'install':
             cmd += ' ' + x
         else:
             cmd2 += ' ' + x
     utils.shell_bg('%s; %s' % (cmd, cmd2),
                    output='/tmp/genesis-ports-output',
                    deleteout=True)
Ejemplo n.º 5
0
 def apply(self, st):
     cmd = 'emerge '
     cmd2 = 'emerge --unmerge'
     for x in st.pending:
         if st.pending[x] == 'install':
             cmd += ' ' + x
         else:
             cmd2 += ' ' + x
     shell_bg('%s; %s' % (cmd, cmd2),
              output='/tmp/genesis-portage-output',
              deleteout=True)
Ejemplo n.º 6
0
    def apply(self, st):
        fcmd = ''
        
        cmd = 'pacman -S --noconfirm '
        a = False
        for x in st.pending:
            if st.pending[x] == 'install':
                cmd += x + ' '
                a = True
                
        if a:
            fcmd += cmd + '; '
        
        cmd = 'pacman -Rc --noconfirm '
        a = False
        for x in st.pending:
            if st.pending[x] != 'install':
                cmd += x + ' '
                a = True

        if a:
            fcmd += cmd
        
        utils.shell_bg(fcmd, output='/tmp/genesis-pacman-output', deleteout=True)
Ejemplo n.º 7
0
    def apply(self, st):
        fcmd = ""

        cmd = "pacman -S --noconfirm "
        a = False
        for x in st.pending:
            if st.pending[x] == "install":
                cmd += x + " "
                a = True

        if a:
            fcmd += cmd + "; "

        cmd = "pacman -Rc --noconfirm "
        a = False
        for x in st.pending:
            if st.pending[x] != "install":
                cmd += x + " "
                a = True

        if a:
            fcmd += cmd

        utils.shell_bg(fcmd, output="/tmp/genesis-pacman-output", deleteout=True)
Ejemplo n.º 8
0
 def get_lists(self):
     utils.shell_bg('pacman -Sy',
                    output='/tmp/genesis-pacman-output',
                    deleteout=True)
Ejemplo n.º 9
0
 def apply(self, st):
     cmd = 'apt-get -y --force-yes install '
     for x in st.pending:
         cmd += x + ('+ ' if st.pending[x] == 'install' else '- ')
     utils.shell_bg(cmd, output='/tmp/genesis-apt-output', deleteout=True)
Ejemplo n.º 10
0
 def get_lists(self):
     utils.shell_bg('apt-get update', output='/tmp/genesis-apt-output', deleteout=True)
Ejemplo n.º 11
0
 def apply(self, st):
     cmd = 'apt-get -y --force-yes install '
     for x in st.pending:
         cmd += x + ('+ ' if st.pending[x] == 'install' else '- ')
     utils.shell_bg(cmd, output='/tmp/genesis-apt-output', deleteout=True)
Ejemplo n.º 12
0
 def get_lists(self):
     utils.shell_bg('apt-get update',
                    output='/tmp/genesis-apt-output',
                    deleteout=True)
Ejemplo n.º 13
0
 def get_lists(self):
     utils.shell_bg('pacman -Sy', output='/tmp/genesis-pacman-output', deleteout=True)
Ejemplo n.º 14
0
 def get_lists(self):
     shell_bg('emerge --sync', output='/tmp/genesis-portage-output', deleteout=True)
Ejemplo n.º 15
0
 def get_lists(self):
     shell_bg('emerge --sync',
              output='/tmp/genesis-portage-output',
              deleteout=True)
Ejemplo n.º 16
0
 def apply(self, st):
     cmd = 'yum -y install '
     for x in st.pending:
         cmd += x + (' ' if st.pending[x] == 'install' else ' ')
     utils.shell_bg(cmd, output='/tmp/genesis-yum-output', deleteout=True)
Ejemplo n.º 17
0
 def get_lists(self):
     utils.shell_bg('yum check-update', output='/tmp/genesis-yum-output', deleteout=True)
Ejemplo n.º 18
0
 def get_lists(self):
     utils.shell_bg('portsnap fetch', output='/tmp/genesis-ports-output', deleteout=True)
Ejemplo n.º 19
0
 def get_lists(self):
     utils.shell_bg('portsnap fetch',
                    output='/tmp/genesis-ports-output',
                    deleteout=True)
Ejemplo n.º 20
0
 def get_lists(self):
     utils.shell_bg("pacman -Sy", output="/tmp/genesis-pacman-output", deleteout=True)