helpers: pkgrel_bump: fix formatting (MR 2252)

f-strings

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-18 23:08:37 +02:00 committed by Oliver Smith
parent 099bd2f4fa
commit d4d6382897
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -36,13 +36,12 @@ def package(args: PmbArgs, pkgname, reason="", dry=False):
pmb.helpers.file.replace(path, old, new) pmb.helpers.file.replace(path, old, new)
# Verify # Verify
del pmb.helpers.other.cache["apkbuild"][path] pmb.parse.apkbuild.cache_clear()
apkbuild = pmb.parse.apkbuild(path) apkbuild = pmb.parse.apkbuild(path)
if int(apkbuild["pkgrel"]) != pkgrel_new: if int(apkbuild["pkgrel"]) != pkgrel_new:
raise RuntimeError("Failed to bump pkgrel for package '" + pkgname + raise RuntimeError(f"Failed to bump pkgrel for package '{pkgname}'."
"'. Make sure that there's a line with exactly the" " Make sure that there's a line with exactly the"
" string '" + old + "' and nothing else in: " + f" string '{old.strip()}' and nothing else in: {path}")
path)
def auto_apkindex_package(args: PmbArgs, arch, aport, apk, dry=False): def auto_apkindex_package(args: PmbArgs, arch, aport, apk, dry=False):