def refresh_installed_packages(self):
"""Fetch latest git information for installed packages.
This retrieves information about outdated packages, but does
not actually upgrade their installations.
Raises:
IOError: if the package manifest file can't be written
"""
for ipkg in self.installed_packages():
clonepath = os.path.join(self.package_clonedir, ipkg.package.name)
clone = git.Repo(clonepath)
LOG.debug('fetch package %s', ipkg.package.qualified_name())
try:
clone.remote().fetch()
except git.exc.GitCommandError as error:
LOG.warn('failed to fetch package %s: %s',
ipkg.package.qualified_name(), error)
ipkg.status.is_outdated = _is_clone_outdated(
clone, ipkg.status.current_version, ipkg.status.tracking_method)
self._write_manifest()
评论列表
文章目录