mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
yum: fallback to epoch=0 if not available
This commit is contained in:
parent
fd8b1e5f34
commit
59702318e1
1 changed files with 2 additions and 2 deletions
|
@ -616,7 +616,7 @@ def local_envra(path):
|
|||
finally:
|
||||
os.close(fd)
|
||||
|
||||
return '%s:%s-%s-%s.%s' % (header[rpm.RPMTAG_EPOCH],
|
||||
return '%s:%s-%s-%s.%s' % (header[rpm.RPMTAG_EPOCH] or '0',
|
||||
header[rpm.RPMTAG_NAME],
|
||||
header[rpm.RPMTAG_VERSION],
|
||||
header[rpm.RPMTAG_RELEASE],
|
||||
|
@ -755,7 +755,7 @@ def install(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, i
|
|||
elif '://' in spec:
|
||||
# download package so that we can check if it's already installed
|
||||
package = fetch_rpm_from_url(spec, module=module)
|
||||
envra = local_envra(module, package)
|
||||
envra = local_envra(package)
|
||||
if is_installed(module, repoq, envra, conf_file, en_repos=en_repos, dis_repos=dis_repos, installroot=installroot):
|
||||
# if it's there, skip it
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue