]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Skip deactivation when running in /
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 13 Feb 2021 16:28:42 +0000 (16:28 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 13 Feb 2021 16:28:42 +0000 (16:28 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pakfire.c

index b11dae96958693a96aa512ac6edbb3fc6bc0184a..00b01b57fd9f29b05d2666a248118343c04ea2dd 100644 (file)
@@ -458,6 +458,9 @@ PAKFIRE_EXPORT int pakfire_activate(Pakfire pakfire) {
 }
 
 PAKFIRE_EXPORT int pakfire_deactivate(Pakfire pakfire) {
+       if (strcmp(pakfire->path, "/") == 0)
+               return 0;
+
        // Do nothing if there are some activations left
        if (--pakfire->activated > 0)
                return 0;