From fa9cf11e2fe8009e2ebfc87186c5bb2648d31da1 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 17 Oct 2025 15:31:06 +0200 Subject: [PATCH 1/2] umpf: preserve flags while creating a umerge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flags are never stored in a file. So creating the umpf-build-flags note from a file is a noop and the flags are lost. Instead, handle flags like the 'relative'. Set the FLAGS variable when flags are found and use that to create the note. This is a modified version of #60 from Alvin Šipraga . Signed-off-by: Michael Olbrich --- umpf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/umpf b/umpf index eded88c..56fa2f7 100755 --- a/umpf +++ b/umpf @@ -934,6 +934,7 @@ parse() { ${has_base} || bailout "${cmd} before base" test -n "${content}" || bailout "${cmd} line without value" if [ -z "${FLAGS}" ]; then + FLAGS="${content}" do_exec flags fi ;; @@ -1621,8 +1622,8 @@ build_hashinfo() { run_build() { parse_series build "${STATE}/series" ${GIT} notes add -m "umpf-build-note: $(<"${STATE}/base-name") $(<"${STATE}/name")" - if [ -f "${FLAGS}" ]; then - ${GIT} notes append -m "umpf-build-flags: $(<"${FLAGS}")" + if [ -n "${FLAGS}" ]; then + ${GIT} notes append -m "umpf-build-flags: ${FLAGS}" fi if [ -n "${GIT_RELATIVE}" ]; then ${GIT} notes append -m "umpf-build-relative: ${GIT_RELATIVE}" From cdeac4cb90dfc891170157a938d3d387e099a42e Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 17 Oct 2025 15:38:36 +0200 Subject: [PATCH 2/2] umpf: display flags when showing a umerge When runing 'umpf show' on an umerge, all lines are explicitly generated. There is no code for the flags, so they are not shown even though they are available internally and running e.g. 'umpf tag' propagates the flags correctly. Add the relevant code so that 'umpf show' works correctly as well. Signed-off-by: Michael Olbrich --- umpf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/umpf b/umpf index 56fa2f7..91d4f64 100755 --- a/umpf +++ b/umpf @@ -680,6 +680,9 @@ import_series() { if [ -n "${GIT_RELATIVE}" ]; then echo "# umpf-relative: ${GIT_RELATIVE}" >> "${series}" fi + if [ -n "${FLAGS}" ]; then + echo "# umpf-flags: ${FLAGS}" >> "${series}" + fi if [ -z "${NAME}" ]; then if ! NAME="$(${GIT} symbolic-ref -q --short "${import}")"; then if ${GIT} show-ref --tags --heads -q "${import}"; then