]> git.saurik.com Git - cydia.git/blobdiff - Sources.mm
Ignore .dSYM folders I am suddenly ending up with.
[cydia.git] / Sources.mm
index 372aa1eea07155b5aa85be6f7033f51b38a4747b..a156ee2f404e1e73aa09cfeafff15d91f8e6d908 100644 (file)
 **/
 /* }}} */
 
+#include "CyteKit/UCPlatform.h"
+
 #include <Foundation/Foundation.h>
 #include <Menes/ObjectHandle.h>
-#include <CyteKit/UCPlatform.h>
 
 #include <cstdio>
 
 #include "Sources.h"
 
 extern _H<NSMutableDictionary> Sources_;
-extern bool Changed_;
 
 void CydiaWriteSources() {
     unlink(SOURCES_LIST);
@@ -38,6 +38,9 @@ void CydiaWriteSources() {
     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]);
@@ -56,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) {