Skip to content

Commit

Permalink
oscontainer: move pkglist.txt creation down
Browse files Browse the repository at this point in the history
Pure cut & paste. Prep for future patch.
  • Loading branch information
jlebon committed Jan 28, 2021
1 parent 11a2a20 commit e552a8c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/oscontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ def oscontainer_build(containers_storage, tmpdir, src, ref, image_name_and_tag,
subprocess.check_call(['/usr/lib/coreos-assembler/cp-reflink', entry.path, dest])
print(f"Copied in content from: {d}")

# We use /noentry to trick `podman create` into not erroring out
# on a container with no cmd/entrypoint. It won't actually be run.
config = ['--entrypoint', '["/noentry"]',
'-l', OSCONTAINER_COMMIT_LABEL + '=' + rev]
if ostree_version is not None:
config += ['-l', 'version=' + ostree_version]

# Generate pkglist.txt in to the oscontainer at /
pkg_list_dest = os.path.join(mnt, 'pkglist.txt')
pkgs = RpmOstree.db_query_all(r, rev, None)
Expand All @@ -162,13 +169,6 @@ def oscontainer_build(containers_storage, tmpdir, src, ref, image_name_and_tag,
f.write(nevra)
f.write('\n')

# We use /noentry to trick `podman create` into not erroring out
# on a container with no cmd/entrypoint. It won't actually be run.
config = ['--entrypoint', '["/noentry"]',
'-l', OSCONTAINER_COMMIT_LABEL + '=' + rev]
if ostree_version is not None:
config += ['-l', 'version=' + ostree_version]

meta = {}
builddir = None
if os.path.isfile('builds/builds.json'):
Expand Down

0 comments on commit e552a8c

Please sign in to comment.