summaryrefslogtreecommitdiff
path: root/postinst.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2015-07-02 03:28:10 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2015-07-02 03:28:10 -0700
commitf6b68b2c49618bf8df27e993bc3df42e913180db (patch)
treec2fcefbac9ab3d7b1f763c1bee1a1c89713b338c /postinst.mm
parent7bc0d82556d4169b4b2221a0373ca2262abebcc8 (diff)
Use a private (owned by mobile!) APT sources.list.
Diffstat (limited to 'postinst.mm')
-rw-r--r--postinst.mm33
1 files changed, 1 insertions, 32 deletions
diff --git a/postinst.mm b/postinst.mm
index 45a7da3..35c92b1 100644
--- a/postinst.mm
+++ b/postinst.mm
@@ -171,11 +171,6 @@ static bool FixApplications() {
}
}
-_H<NSMutableDictionary> Sources_;
-bool Changed_;
-
-_H<NSString> System_;
-
int main(int argc, const char *argv[]) {
if (argc < 2 || strcmp(argv[1], "configure") != 0)
return 0;
@@ -195,33 +190,7 @@ int main(int argc, const char *argv[]) {
}
}
- size_t size;
- sysctlbyname("kern.osversion", NULL, &size, NULL, 0);
- char *osversion = new char[size];
- if (sysctlbyname("kern.osversion", osversion, &size, NULL, 0) != -1)
- System_ = [NSString stringWithUTF8String:osversion];
-
- NSDictionary *metadata([[[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/lib/cydia/metadata.plist"] autorelease]);
- NSUInteger version(0);
-
- if (metadata != nil) {
- Sources_ = [metadata objectForKey:@"Sources"];
-
- if (NSNumber *number = [metadata objectForKey:@"Version"])
- version = [number unsignedIntValue];
- }
-
- if (Sources_ == nil)
- Sources_ = [NSMutableDictionary dictionaryWithCapacity:8];
-
- if (version == 0) {
- CydiaAddSource(@"http://apt.thebigboss.org/repofiles/cydia/", @"stable", [NSMutableArray arrayWithObject:@"main"]);
- CydiaAddSource(@"http://apt.modmyi.com/", @"stable", [NSMutableArray arrayWithObject:@"main"]);
- CydiaAddSource(@"http://cydia.zodttd.com/repo/cydia/", @"stable", [NSMutableArray arrayWithObject:@"main"]);
- CydiaAddSource(@"http://repo666.ultrasn0w.com/", @"./");
- }
-
- CydiaWriteSources();
+ unlink("/etc/apt/sources.list.d/cydia.list");
#define OldCache_ "/var/root/Library/Caches/com.saurik.Cydia"
if (access(OldCache_, F_OK) == 0)