Skip to content

Commit

Permalink
pkglistgen.py: Run productcomposer iif there's a *.productcompose.in …
Browse files Browse the repository at this point in the history
…file and a 000productcompose directory.

Previously pkglistgen.py assumed that a project either used
product-builder or the new product-composer, by exiting unrecoverably
when a *.productcompose.in file was found but the relative
000productcompose directory was absent.

This is not the case for SL Micro as the shared SLFO codebase is still
an hybrid OBS/git project and hence its stagings are not git based and
can't use product composer.

This patch was tested for the SUSE:ALP:Source:Standard:1.0:Staging:A and
SUSE:ALP:Products:Marble:6.0 projects (together with
#3078). Instead
of raising an exception when the 000productcompose directory is not
found it makes a log stating that product-composer will be skipped.
  • Loading branch information
gleidi-suse committed May 13, 2024
1 parent 91ddc8a commit c120c9b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkglistgen/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,7 @@ def update_and_solve_target(

# new product-composer
fn = os.path.join(group_dir, 'default.productcompose.in')
if os.path.isfile(fn):
if not os.path.isdir(self.productcompose_dir):
raise Exception('default.productcompose.in exists, but output directory is missing in git!')
if os.path.isfile(fn) and os.path.isdir(self.productcompose_dir):
lines = open(fn).readlines()
new_lines = []
for line in lines:
Expand All @@ -789,6 +787,7 @@ def update_and_solve_target(
else:
# No template file, so we don't create one either
self.skip_productcompose = True
logging.debug('skipping productcompose')

logging.debug('-> do_update')
# make sure we only calculcate existant architectures
Expand Down

0 comments on commit c120c9b

Please sign in to comment.