Refine preservation detection messaging and label fallback

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/8a51f052-83d0-4079-8338-5cfdbb849aa2

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-15 20:15:59 +00:00
committed by GitHub
parent 846e2af705
commit 5fe2ecd56d
2 changed files with 4 additions and 3 deletions

View File

@@ -699,7 +699,7 @@ class InstallerWindow(Adw.ApplicationWindow):
disk_group.add(data_row)
if self.data_drive_has_timechain:
note_row = Adw.ActionRow()
note_row.set_title(f"Existing Bitcoin timechain detected on /dev/{self.data_disk}")
note_row.set_title(f"Existing Bitcoin timechain detected on /dev/{self.data_disk}")
note_row.set_subtitle("Data will be preserved and mounted as-is.")
note_row.add_prefix(symbolic_icon("emblem-ok-symbolic"))
disk_group.add(note_row)
@@ -808,7 +808,8 @@ class InstallerWindow(Adw.ApplicationWindow):
):
proc = subprocess.run(cmd, capture_output=True, text=True)
if proc.returncode == 0:
label = proc.stdout.strip().splitlines()[0] if proc.stdout.strip() else ""
stdout = proc.stdout.strip()
label = stdout.splitlines()[0] if stdout else ""
if label:
break

View File

@@ -108,7 +108,7 @@ if [[ -n "$DATA_DISK" ]]; then
DATA_P1=$(part_suffix "$DATA_DISK" 1)
if [[ -b "$DATA_P1" ]]; then
DATA_LABEL=$(lsblk -no LABEL "$DATA_P1" 2>/dev/null | head -n1 || true)
if [[ "$DATA_LABEL" != "BTCEcoandBackup" ]]; then
if [[ -z "$DATA_LABEL" ]]; then
DATA_LABEL=$(blkid -o value -s LABEL "$DATA_P1" 2>/dev/null || true)
fi