From 08f3453cee400c57be1c5fa6909ce0663b33cbba Mon Sep 17 00:00:00 2001 From: Max Lin Date: Mon, 4 Sep 2017 16:35:05 +0800 Subject: [PATCH] freeze_command: update product version for openSUSE only Make freeze SLE Staging's DVD subproject can work. Update product version is necessary for openSUSE only. --- osclib/freeze_command.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osclib/freeze_command.py b/osclib/freeze_command.py index cf6814ca..a5d9c732 100644 --- a/osclib/freeze_command.py +++ b/osclib/freeze_command.py @@ -157,15 +157,16 @@ class FreezeCommand(object): self.update_product_version(prj, 'Test-DVD-' + arch, arch, version) # now try to freeze sub project - much easier - if self.api.item_exists(prj + ':DVD') and self.api.item_exists(prj, "openSUSE-release"): + if self.api.item_exists(prj + ':DVD'): self.prj = prj + ':DVD' self.set_links() self.freeze_prjlinks() # Update the version information found in the Test-DVD package, to match openSUSE-release - version = self.api.package_version(prj, 'openSUSE-release') - for arch in ['x86_64', 'ppc64le']: - self.update_product_version(prj + ':DVD', 'Test-DVD-' + arch, arch, version) + if self.api.item_exists(prj, "openSUSE-release"): + version = self.api.package_version(prj, 'openSUSE-release') + for arch in ['x86_64', 'ppc64le']: + self.update_product_version(prj + ':DVD', 'Test-DVD-' + arch, arch, version) # Set the original build status for the project self.api.build_switch_prj(prj, build_status)