コード例 #1
0
ファイル: synctool_pkg_yum.py プロジェクト: samuelet/synctool
	def update(self):
		SyncPkg.update(self)
		
		# yum has no 'update' command, but will fetch a new database
		# next time when it has no metadata
		
		synctool_lib.shell_command('yum -y clean headers')
		synctool_lib.shell_command('yum -y clean metadata')
コード例 #2
0
	def remove(self, pkgs):
		SyncPkg.remove(self, pkgs)
		
		os.putenv('DEBIAN_FRONTEND', 'noninteractive')
		
		cmd = 'apt-get -y remove ' + string.join(pkgs)
		
		synctool_lib.shell_command(cmd)
コード例 #3
0
    def remove(self, pkgs):
        SyncPkg.remove(self, pkgs)

        os.putenv("DEBIAN_FRONTEND", "noninteractive")

        cmd = "apt-get -y remove " + string.join(pkgs)

        synctool_lib.shell_command(cmd)
コード例 #4
0
	def list(self, pkgs = None):
		SyncPkg.list(self, pkgs)
		
		cmd = 'rpm -qa'			# zypper has no 'list-installed' ?
		
		if pkgs:
			cmd = cmd + ' ' + string.join(pkgs)
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #5
0
	def list(self, pkgs = None):
		SyncPkg.list(self, pkgs)
		
		cmd = 'dpkg -l'
		
		if pkgs:
			cmd = cmd + ' ' + string.join(pkgs)
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #6
0
	def upgrade(self):
		SyncPkg.upgrade(self)
		
		if self.dryrun:
			cmd = 'zypper list-updates'
		else:
			cmd = 'zypper --non-interactive update --auto-agree-with-licenses'
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #7
0
ファイル: synctool_pkg_yum.py プロジェクト: samuelet/synctool
	def upgrade(self):
		SyncPkg.upgrade(self)
		
		if self.dryrun:
			cmd = 'yum -y check-update'
		else:
			cmd = 'yum -y update'
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #8
0
	def upgrade(self):
		SyncPkg.upgrade(self)
		
		if self.dryrun:
			cmd = 'brew outdated'
		else:
			cmd = 'brew upgrade'
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #9
0
    def list(self, pkgs=None):
        SyncPkg.list(self, pkgs)

        cmd = "pacman -Q"

        if pkgs:
            cmd = cmd + "s " + string.join(pkgs)  # use pacman -Qs ...

        synctool_lib.DRY_RUN = False
        synctool_lib.shell_command(cmd)
        synctool_lib.DRY_RUN = self.dryrun
コード例 #10
0
    def upgrade(self):
        SyncPkg.upgrade(self)

        synctool_lib.DRY_RUN = False

        if self.dryrun:
            cmd = "pacman -Qu --noconfirm"  # query updates
        else:
            cmd = "pacman -Su --noconfirm"  # do upgrade

        synctool_lib.shell_command(cmd)
        synctool_lib.DRY_RUN = self.dryrun
コード例 #11
0
    def upgrade(self):
        SyncPkg.upgrade(self)

        os.putenv("DEBIAN_FRONTEND", "noninteractive")

        if self.dryrun:
            cmd = "apt-get -s upgrade"  # --simulate
        else:
            cmd = "apt-get -y upgrade"

        synctool_lib.DRY_RUN = False
        synctool_lib.shell_command(cmd)
        synctool_lib.DRY_RUN = self.dryrun
コード例 #12
0
	def upgrade(self):
		SyncPkg.upgrade(self)
		
		os.putenv('DEBIAN_FRONTEND', 'noninteractive')
		
		if self.dryrun:
			cmd = 'apt-get -s upgrade'		# --simulate
		else:
			cmd = 'apt-get -y upgrade'
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #13
0
	def list(self, pkgs = None):
		SyncPkg.list(self, pkgs)
		
		cmd = 'pkg_info'
		
		if pkgs:
			cmd = cmd + ' ' + string.join(pkgs)
		else:
			cmd = cmd + ' -a'		# list all installed packages
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #14
0
	def upgrade(self):
		SyncPkg.upgrade(self)
		
		if os.uname()[0] == 'FreeBSD':
			# FreeBSD has no pkg_add -u, but freebsd-update instead
			
			if self.dryrun:
				cmd = 'freebsd-update fetch'
			else:
				cmd = 'freebsd-update fetch install'
		
		else:
			# OpenBSD/NetBSD/other BSD, use pkg_add -u
			
			if self.dryrun:
				cmd = 'pkg_add -uvn'
			else:
				cmd = 'pkg_add -uv'
			
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command(cmd)
		synctool_lib.DRY_RUN = self.dryrun
コード例 #15
0
	def install(self, pkgs):
		SyncPkg.install(self, pkgs)

		cmd = 'zypper --non-interactive install --auto-agree-with-licenses ' + string.join(pkgs)
		
		synctool_lib.shell_command(cmd)
コード例 #16
0
	def __init__(self):
		SyncPkg.__init__(self)
コード例 #17
0
	def clean(self):
		SyncPkg.clean(self)
		
		synctool_lib.shell_command('brew cleanup')
コード例 #18
0
	def update(self):
		SyncPkg.update(self)
		
		synctool_lib.shell_command('zypper --non-interactive refresh')
コード例 #19
0
	def update(self):
		SyncPkg.update(self)
		
		synctool_lib.shell_command('brew update')
コード例 #20
0
	def remove(self, pkgs):
		SyncPkg.remove(self, pkgs)
		
		cmd = 'brew remove ' + string.join(pkgs)
		
		synctool_lib.shell_command(cmd)
コード例 #21
0
	def install(self, pkgs):
		SyncPkg.install(self, pkgs)

		cmd = 'brew install ' + string.join(pkgs)
		
		synctool_lib.shell_command(cmd)
コード例 #22
0
    def clean(self):
        SyncPkg.clean(self)

        synctool_lib.shell_command("pacman -Scc --noconfirm")
コード例 #23
0
	def clean(self):
		SyncPkg.clean(self)
		
		synctool_lib.DRY_RUN = False
		synctool_lib.shell_command('zypper clean')
		synctool_lib.DRY_RUN = self.dryrun
コード例 #24
0
    def update(self):
        SyncPkg.update(self)

        synctool_lib.shell_command("pacman -Sy --noconfirm")
コード例 #25
0
	def remove(self, pkgs):
		SyncPkg.remove(self, pkgs)
		
		cmd = 'zypper --non-interactive remove ' + string.join(pkgs)
		
		synctool_lib.shell_command(cmd)
コード例 #26
0
ファイル: synctool_pkg_yum.py プロジェクト: samuelet/synctool
	def clean(self):
		SyncPkg.clean(self)
		
		synctool_lib.shell_command('yum clean packages')
コード例 #27
0
	def update(self):
		SyncPkg.update(self)
		
		os.putenv('DEBIAN_FRONTEND', 'noninteractive')
		synctool_lib.shell_command('apt-get update')
コード例 #28
0
    def install(self, pkgs):
        SyncPkg.install(self, pkgs)

        cmd = "pacman -S --noconfirm " + string.join(pkgs)

        synctool_lib.shell_command(cmd)
コード例 #29
0
	def clean(self):
		SyncPkg.clean(self)
		
		synctool_lib.shell_command('apt-get clean')
コード例 #30
0
    def remove(self, pkgs):
        SyncPkg.remove(self, pkgs)

        cmd = "pacman -Rs --noconfirm " + string.join(pkgs)

        synctool_lib.shell_command(cmd)