qvm-template: Slight improvements to package verification.
This commit is contained in:
parent
ed8fca6494
commit
b7a603b9fe
@ -721,9 +721,6 @@ def install(
|
||||
if not package_hdr:
|
||||
parser.error('Package \'%s\' verification failed.' % rpmfile)
|
||||
|
||||
if reponame != '@commandline':
|
||||
os.rename(path, rpmfile)
|
||||
|
||||
package_name = package_hdr[rpm.RPMTAG_NAME]
|
||||
if not package_name.startswith(PACKAGE_NAME_PREFIX):
|
||||
parser.error(
|
||||
@ -731,6 +728,9 @@ def install(
|
||||
# Remove prefix to get the real template name
|
||||
name = package_name[len(PACKAGE_NAME_PREFIX):]
|
||||
|
||||
if path != rpmfile:
|
||||
os.rename(path, rpmfile)
|
||||
|
||||
# Check if already installed
|
||||
if not override_existing and name in app.domains:
|
||||
print(('Template \'%s\' already installed, skipping...'
|
||||
|
Loading…
Reference in New Issue
Block a user