Skip to content

Commit 90c02d2

Browse files
MK8S-25: Revert packaging.py to pre-PR state
Restore packaging.py to its original state before MK8S-25 changes. The index.html cleanup will now be handled entirely within the repository cleanup mechanisms, eliminating the need for cross-module cleanup coordination.
1 parent d17cc47 commit 90c02d2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

buildchain/buildchain/packaging.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,27 @@ def task__package_mkdir_iso_root() -> types.TaskDict:
150150

151151
def task__package_mkdir_redhat_iso_root() -> types.TaskDict:
152152
"""Create the RedHat packages root directory on the ISO."""
153-
return targets.Mkdir(
153+
154+
def clean() -> None:
155+
"""Clean RedHat directory including saltenv directory structure."""
156+
# Remove saltenv directory structure created by repository index files
157+
saltenv_dir = (
158+
constants.REPO_REDHAT_ROOT
159+
/ f"{config.PROJECT_NAME.lower()}-{versions.VERSION}"
160+
)
161+
if saltenv_dir.exists():
162+
coreutils.rm_rf(saltenv_dir)
163+
164+
mkdir_task = targets.Mkdir(
154165
directory=constants.REPO_REDHAT_ROOT,
155166
task_dep=["_package_mkdir_iso_root"],
156167
).task
157168

169+
# Add our custom cleanup function
170+
mkdir_task["clean"] = [clean]
171+
172+
return mkdir_task
173+
158174

159175
def _package_mkdir_redhat_release_iso_root(releasever: str) -> types.TaskDict:
160176
"""

0 commit comments

Comments
 (0)