Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for #637 - ls2string does not append to the package list #677

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions common_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
hasDockerLibrary,
hasEco,
hasFailed,
hasFiles,
hasGalera,
hasInstall,
hasPackagesGenerated,
hasRpmLint,
hasS3,
hasUpgrade,
Expand Down Expand Up @@ -755,7 +755,7 @@ def getRpmAutobakeFactory(mtrDbPool):
"""
),
doStepIf=(
lambda step: hasFiles(step)
lambda step: hasPackagesGenerated(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
),
descriptionDone=util.Interpolate(
Expand Down Expand Up @@ -797,7 +797,7 @@ def getRpmAutobakeFactory(mtrDbPool):
doStepIf=(
lambda step: hasInstall(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
and hasFiles(step)
and hasPackagesGenerated(step)
),
)
)
Expand All @@ -816,7 +816,7 @@ def getRpmAutobakeFactory(mtrDbPool):
doStepIf=(
lambda step: hasUpgrade(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
and hasFiles(step)
and hasPackagesGenerated(step)
),
)
)
Expand Down
4 changes: 2 additions & 2 deletions master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ f_deb_autobake.addStep(
doStepIf=(
lambda step: hasInstall(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
and hasFiles(step)
and hasPackagesGenerated(step)
),
)
)
Expand All @@ -277,7 +277,7 @@ f_deb_autobake.addStep(
doStepIf=(
lambda step: hasUpgrade(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
and hasFiles(step)
and hasPackagesGenerated(step)
),
)
)
Expand Down
8 changes: 4 additions & 4 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def createDebRepo() -> steps.ShellCommand:
),
],
doStepIf=(
lambda step: hasFiles(step)
lambda step: hasPackagesGenerated(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
),
)
Expand Down Expand Up @@ -249,7 +249,7 @@ def uploadDebArtifacts() -> steps.ShellCommand:
),
],
doStepIf=(
lambda step: hasFiles(step)
lambda step: hasPackagesGenerated(step)
and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES)
),
descriptionDone=util.Interpolate(
Expand Down Expand Up @@ -322,7 +322,7 @@ def ls2string(rc: int, stdout: str, stderr: str) -> dict[str, str]:
ls_filenames = []
for line in stdout.strip().split("\n"):
line = line.strip()
if not line:
if line:
ls_filenames.append(line)

return {"packages": " ".join(ls_filenames)}
Expand Down Expand Up @@ -444,7 +444,7 @@ def dockerfile(props: IProperties) -> str:


# checks if the list of files is empty
def hasFiles(step: BuildStep) -> bool:
def hasPackagesGenerated(step: BuildStep) -> bool:
return len(step.getProperty("packages")) >= 1


Expand Down