diff --git a/files/etc/ublue-update.d/system/00-system-update.py b/files/etc/ublue-update.d/system/00-system-update.py index 8eedd09..eb3e399 100755 --- a/files/etc/ublue-update.d/system/00-system-update.py +++ b/files/etc/ublue-update.d/system/00-system-update.py @@ -3,6 +3,8 @@ from subprocess import run from json import loads, load from json.decoder import JSONDecodeError +from pathlib import Path + import os @@ -22,6 +24,18 @@ def check_for_rebase(): print("uBlue image info file does not exist") return False, "" + # Branch away from the default tag when one is set + branch_file = Path("/var/ublue-update/branch") + if branch_file.exists(): + with branch_file.open() as f: + branch = f.readline() + branch_file.unlink() + if branch: + return ( + True, + f"{default_image_ref[0]}:{default_image_ref[1]}:{default_image_ref[2]}:{branch}", + ) + status_cmd = [ "rpm-ostree", "status", diff --git a/setup.cfg b/setup.cfg index 71b8f58..52fc9f9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,4 +23,4 @@ install_requires = [flake8] max-line-length = 90 -ignore = E501 +ignore = E501,W503,W504