当前位置: 首页>>代码示例>>Python>>正文


Python SyncPkg.upgrade方法代码示例

本文整理汇总了Python中synctool_pkgclass.SyncPkg.upgrade方法的典型用法代码示例。如果您正苦于以下问题:Python SyncPkg.upgrade方法的具体用法?Python SyncPkg.upgrade怎么用?Python SyncPkg.upgrade使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在synctool_pkgclass.SyncPkg的用法示例。


在下文中一共展示了SyncPkg.upgrade方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: upgrade

# 需要导入模块: from synctool_pkgclass import SyncPkg [as 别名]
# 或者: from synctool_pkgclass.SyncPkg import upgrade [as 别名]
	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
开发者ID:samuelet,项目名称:synctool,代码行数:13,代码来源:synctool_pkg_brew.py

示例2: upgrade

# 需要导入模块: from synctool_pkgclass import SyncPkg [as 别名]
# 或者: from synctool_pkgclass.SyncPkg import upgrade [as 别名]
    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
开发者ID:gyepisam,项目名称:synctool,代码行数:14,代码来源:synctool_pkg_pacman.py

示例3: upgrade

# 需要导入模块: from synctool_pkgclass import SyncPkg [as 别名]
# 或者: from synctool_pkgclass.SyncPkg import upgrade [as 别名]
	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
开发者ID:samuelet,项目名称:synctool,代码行数:15,代码来源:synctool_pkg_aptget.py

示例4: upgrade

# 需要导入模块: from synctool_pkgclass import SyncPkg [as 别名]
# 或者: from synctool_pkgclass.SyncPkg import upgrade [as 别名]
    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
开发者ID:gyepisam,项目名称:synctool,代码行数:15,代码来源:synctool_pkg_aptget.py

示例5: upgrade

# 需要导入模块: from synctool_pkgclass import SyncPkg [as 别名]
# 或者: from synctool_pkgclass.SyncPkg import upgrade [as 别名]
	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
开发者ID:samuelet,项目名称:synctool,代码行数:24,代码来源:synctool_pkg_bsdpkg.py


注:本文中的synctool_pkgclass.SyncPkg.upgrade方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。