]> git.saurik.com Git - cydia.git/commitdiff
Use cydo to delete half-installed package scripts.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 2 Jul 2015 10:39:27 +0000 (03:39 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 2 Jul 2015 10:39:27 +0000 (03:39 -0700)
MobileCydia.mm

index a97fb96cd2f30536a901d28a2251292c6439582d..9eaa4cf9b891b586ad2f46642fbff43259ccfea9 100644 (file)
@@ -9441,12 +9441,12 @@ _end
                     [broken remove];
                     NSString *id = [broken id];
 
-                    _root({
-                        unlink([[NSString stringWithFormat:@"/var/lib/dpkg/info/%@.prerm", id] UTF8String]);
-                        unlink([[NSString stringWithFormat:@"/var/lib/dpkg/info/%@.postrm", id] UTF8String]);
-                        unlink([[NSString stringWithFormat:@"/var/lib/dpkg/info/%@.preinst", id] UTF8String]);
-                        unlink([[NSString stringWithFormat:@"/var/lib/dpkg/info/%@.postinst", id] UTF8String]);
-                    });
+                    system([[NSString stringWithFormat:@"/usr/libexec/cydia/cydo /bin/rm -f"
+                        " /var/lib/dpkg/info/%@.prerm"
+                        " /var/lib/dpkg/info/%@.postrm"
+                        " /var/lib/dpkg/info/%@.preinst"
+                        " /var/lib/dpkg/info/%@.postinst"
+                    , id, id, id, id] UTF8String]);
                 }
 
                 [self resolve];