Skip to content

Commit 48d63ec

Browse files
Merge pull request #38 from ejoerns/bb-pv
umpf: output version infos to bitbake variables during format-patch
2 parents ec64f74 + 8d0d4cc commit 48d63ec

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/series-format-patch-bb.ref

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ SRC_URI += "\
1313
SRC_URI += "\
1414
file://patches/0101-b1.patch \
1515
"
16+
UMPF_BASE = "base"
17+
UMPF_VERSION = "20221209-1"
18+
PV = "${UMPF_BASE}-${UMPF_VERSION}"
1619
# umpf-end

umpf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,15 @@ format_patch_end() {
14141414
if ${NIX}; then
14151415
echo "]" >&${series_out}
14161416
fi
1417+
if ${BB}; then
1418+
local base_name="$(<"${STATE}/base-name")"
1419+
echo "UMPF_BASE = \"${base_name//v/}\"" >&${series_out}
1420+
echo "UMPF_VERSION = \"$(<"${STATE}/version")\"" >&${series_out}
1421+
echo "PV = \"\${UMPF_BASE}-\${UMPF_VERSION}\"" >&${series_out}
1422+
if [ "$(head -n 1 README 2>/dev/null)" = "Linux kernel" ]; then
1423+
echo "LINUX_VERSION = \"\${UMPF_BASE}\"" >&${series_out}
1424+
fi
1425+
fi
14171426
echo "$line" >&${series_out}
14181427
}
14191428

0 commit comments

Comments
 (0)