Robuste Darktable-Synchronisation: sequenzieller Ablauf, Versions- und Concurrent-Schutz

- Race Condition behoben: Pre-Sync wird vollstaendig abgewartet bevor Darktable startet
- Post-Sync nach Schliessen von Darktable eingefuehrt (bisher fehlend)
- .env aus festem Pfad ~/.config/darktable-sync/.env geladen (nicht mehr relativ)
- Server-Erreichbarkeit per SSH statt ping (Firewall-sicher)
- Darktable-Versionscheck (Major.Minor) vor Download mit Abbruch bei Konflikt
- DB-Backup vor jedem Download (library.db.bak, data.db.bak)
- sync_pending-Marker bei Offline/Fehler, Hinweis beim naechsten Start
- darktable.active-Marker auf Server fuer Concurrent-Erkennung
- Lock-Dateien vom Sync ausgeschlossen
- systemd-Timer entfernt, Service bleibt als manueller Trigger
- Gemeinsame Hilfsfunktionen in darktable_common.sh extrahiert
- 20 BATS-Tests mit vollstaendigem Stub-System ohne GUI-Dialoge

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 19:41:26 +02:00
parent 3bdd26ed81
commit 6a6ce52cf9
21 changed files with 777 additions and 201 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Darktable sync only
Comment=Run Darktable sync without starting Darktable
Name=Darktable Sync
Comment=Nur Synchronisation ausfuehren ohne Darktable zu starten
Exec=/home/%u/.local/bin/darktable_sync.sh --with-notify-start-stop
Terminal=false
Categories=Graphics;Photography;
+1 -1
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Darktable (with sync)
Comment=Start Darktable and run sync in background
Comment=Darktable mit Synchronisation starten (vor und nach dem Start)
Exec=/home/%u/.local/bin/darktable_wrapper.sh
Terminal=false
Categories=Graphics;Photography;