Skip to content

Commit 7d165e5

Browse files
committed
Address package conflicts
1 parent b51006d commit 7d165e5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

atomic-update

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ from shlex import quote
2828
import xml.etree.ElementTree as ET
2929

3030
# Constants
31-
VERSION = "0.1.9"
31+
VERSION = "0.1.10"
3232
ZYPPER_PID_FILE = "/run/zypp.pid"
3333
VALID_CMD = ["dup", "run", "rollback"]
3434
VALID_OPT = ["--reboot", "--apply", "--shell", "--continue", "--no-verify", \
@@ -404,12 +404,16 @@ chroot {TMP_MOUNT_DIR} mount -a -O no_netdev;
404404
pre_failed_units = verify_snapshot()
405405
if COMMAND == "dup":
406406
# check if dup has anything to do
407-
logging.info("Checking for packages to upgrade")
407+
logging.info("Checking for packages to upgrade...")
408408
xml_output, ret = shell_exec(f"LC_ALL=C zypper --root {TMP_MOUNT_DIR} --non-interactive --no-cd --xmlout dist-upgrade --dry-run")
409409
docroot = ET.fromstring(xml_output)
410+
num_pkgs = None
410411
for item in docroot.iter('install-summary'):
411412
num_pkgs = int(item.attrib["packages-to-change"])
412413
if not num_pkgs:
414+
if xml_output.find("conflicts") != -1:
415+
logging.warning("There are package conflicts that must be manually resolved. See output of:\n" \
416+
"zypper --non-interactive --no-cd dist-upgrade --dry-run")
413417
logging.info("Nothing to do. Exiting...")
414418
cleanup()
415419
sys.exit()

0 commit comments

Comments
 (0)