+static NSDate *GetStatusDate() {
+ return [[[NSFileManager defaultManager] attributesOfItemAtPath:@"/var/lib/dpkg/status" error:NULL] fileModificationDate];
+}
+
+static void SaveConfig(NSObject *lock) {
+ @synchronized (lock) {
+ _trace();
+ MetaFile_.Sync();
+ _trace();
+ }
+
+ CFPreferencesSetMultiple((CFDictionaryRef) [NSDictionary dictionaryWithObjectsAndKeys:
+ Values_, @"CydiaValues",
+ Sections_, @"CydiaSections",
+ (id) Sources_, @"CydiaSources",
+ Version_, @"CydiaVersion",
+ nil], NULL, CFSTR("com.saurik.Cydia"), kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+
+ if (!CFPreferencesAppSynchronize(CFSTR("com.saurik.Cydia")))
+ NSLog(@"CFPreferencesAppSynchronize(com.saurik.Cydia) == false");
+
+ CydiaWriteSources();
+}
+