packages: Offline package removal for yum and dnf.

When removing packages with yum or dnf, pass the --disablerepo=*
(disable all online repositories) and -C (run from cache) arguments.
Package removals do not normally require network access, and this
measure saves time and bandwidth and prevents possible unnecessary
errors (e.g., if we do not have active network access, or if there is
some problem with the mirrors).
main
Kevin Kofler 12 years ago
parent 854c19f305
commit 412b959870

@ -48,9 +48,9 @@ class PackageManager:
elif self.backend == "zypp":
check_chroot_call(["zypper", "--non-interactive", "remove"] + pkgs)
elif self.backend == "yum":
check_chroot_call(["yum", "-y", "remove"] + pkgs)
check_chroot_call(["yum", "--disablerepo=*", "-C", "-y", "remove"] + pkgs)
elif self.backend == "dnf":
check_chroot_call(["dnf", "-y", "remove"] + pkgs)
check_chroot_call(["dnf", "--disablerepo=*", "-C", "-y", "remove"] + pkgs)
elif self.backend == "urpmi":
check_chroot_call(["urpme"] + pkgs)
elif self.backend == "apt":

Loading…
Cancel
Save