X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/f6b68b2c49618bf8df27e993bc3df42e913180db..7ccc1484ab74ebf5797820bdd24edccfd42aaa50:/Sources.mm?ds=inline diff --git a/Sources.mm b/Sources.mm index 4cc2f9e9..a156ee2f 100644 --- a/Sources.mm +++ b/Sources.mm @@ -19,24 +19,28 @@ **/ /* }}} */ +#include "CyteKit/UCPlatform.h" + #include #include -#include #include #include "Sources.h" extern _H Sources_; -extern bool Changed_; void CydiaWriteSources() { + unlink(SOURCES_LIST); FILE *file(fopen(SOURCES_LIST, "w")); _assert(file != NULL); fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber); for (NSString *key in [Sources_ allKeys]) { + if ([key hasPrefix:@"deb:http:"] && [Sources_ objectForKey:[NSString stringWithFormat:@"deb:https:%s", [key UTF8String] + 9]]) + continue; + NSDictionary *source([Sources_ objectForKey:key]); NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]); @@ -55,7 +59,6 @@ void CydiaWriteSources() { void CydiaAddSource(NSDictionary *source) { [Sources_ setObject:source forKey:[NSString stringWithFormat:@"%@:%@:%@", [source objectForKey:@"Type"], [source objectForKey:@"URI"], [source objectForKey:@"Distribution"]]]; - Changed_ = true; } void CydiaAddSource(NSString *href, NSString *distribution, NSArray *sections) {