build: use get_pkgver() again (MR 2353)

During rework this got lost, re-incorporate it so packages built with
--src have a relevant pkgver.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-07-08 18:21:57 +02:00 committed by Oliver Smith
parent 319d9681f3
commit c5135ac62a
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,6 @@
import enum
from pathlib import Path
from typing import Any
from pmb.core.pkgrepo import pkgrepo_paths
import pmb.helpers.run
import pmb.chroot
@ -180,7 +181,8 @@ def handle_csum_failure(apkbuild, chroot: Chroot):
def run_abuild(
context: Context,
apkbuild,
apkbuild: dict[str, Any],
pkgver: str,
channel,
arch: Arch,
strict=False,
@ -283,7 +285,7 @@ def run_abuild(
if src and strict:
logging.debug(f"({suffix}) Ensuring previous build artifacts are removed")
pmb.chroot.root(["rm", "-rf", "/tmp/pmbootstrap-local-source-copy"], suffix)
override_source(apkbuild, apkbuild["pkgver"], src, suffix)
override_source(apkbuild, pkgver, src, suffix)
link_to_git_dir(suffix)
try: