Skip to content

Commit

Permalink
Merge pull request #384 from ginglis13/app-inventory-pkg-version
Browse files Browse the repository at this point in the history
rpm2img: use package version, release, and epoch
  • Loading branch information
ginglis13 authored Oct 9, 2024
2 parents 8799f7b + 44a2623 commit 698314f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions twoliter/embedded/rpm2img
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ INVENTORY_QUERY="\{\"Name\":\"%{NAME}\"\
,\"Publisher\":\"Bottlerocket\"\
,\"Version\":\"%{Version}\"\
,\"Release\":\"%{Release}\"\
,\"Epoch\":\"%|Epoch?{%{EPOCH}}:{0}|\"\
,\"InstalledTime\":\"${INSTALL_TIME}\"\
,\"ApplicationType\":\"%{GROUP}\"\
,\"Architecture\":\"%{ARCH}\"\
Expand Down Expand Up @@ -237,11 +238,7 @@ if [[ -n "${CORE_KIT_VERSION}" && -n "${CORE_KIT_VENDOR}" ]]; then
# the version with the core kit's version, and replace the name with the unprefixed name.
INVENTORY_DATA="$(jq \
--argfile replace core-kit-replacements.json \
--arg CORE_KIT_VERSION "${CORE_KIT_VERSION}" \
--arg CORE_KIT_GIT_SHA "${CORE_KIT_GIT_SHA}" \
'(.Content[] | select(.Name | $replace[.] != null) | .Version) = $CORE_KIT_VERSION |
(.Content[] | select(.Name | $replace[.] != null) | .Release) = $CORE_KIT_GIT_SHA |
.Content[].Name |= (if $replace[.] then $replace[.] else . end)' \
'.Content[].Name |= (if $replace[.] then $replace[.] else . end)' \
<<<"${INVENTORY_DATA}")"
fi

Expand Down

0 comments on commit 698314f

Please sign in to comment.