summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-05-09 23:18:57 -1000
committerSam Bingner <sam@bingner.com>2019-05-10 13:00:56 -1000
commit171c8c469797f990ad2a66a7881558155b6e13de (patch)
tree16513236b85d1c4bc187004d881c3177543a8309
parent5b200555808e798a08210f5697ad7ba80c6fdc70 (diff)
Pin elucubratus, support pining, unblock electrav1.1.32%b15
-rw-r--r--MobileCydia.mm18
-rw-r--r--Sources.mm12
-rw-r--r--cydia.preferences11
-rw-r--r--makefile5
-rw-r--r--postinst.mm4
5 files changed, 28 insertions, 22 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 21d1a67..93c196e 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -753,8 +753,7 @@ bool isSectionVisible(NSString *section) {
static NSString *VerifySource(NSString *href) {
static RegEx href_r("(http(s?)://|file:///)[^# ]*");
- if (!href_r(href) || [href rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound ||
- [href rangeOfString:@"chimera" options:NSCaseInsensitiveSearch].location != NSNotFound) {
+ if (!href_r(href)) {
[[[[UIAlertView alloc]
initWithTitle:[NSString stringWithFormat:Colon_, Error_, UCLocalize("INVALID_URL")]
message:UCLocalize("INVALID_URL_EX")
@@ -2542,6 +2541,14 @@ struct PackageNameOrdering :
essential_ |= ((iterator->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES);
ignored_ = iterator->SelectedState == pkgCache::State::Hold;
_end
+
+ _profile(Package$initWithVersion$Priority)
+ // ignore "essential" tags from non-pinned repos
+ if (essential_ && [database cache].Policy->GetPriority(version, true) == 500) {
+ essential_ = NO;
+ }
+ _end
+
_end } return self;
}
@@ -2549,7 +2556,7 @@ struct PackageNameOrdering :
pkgCache::VerIterator version;
_profile(Package$packageWithIterator$GetCandidateVer)
- version = [database policy]->GetCandidateVer(iterator);
+ version = [database cache]->GetCandidateVersion(iterator);
_end
if (version.end())
@@ -2756,7 +2763,7 @@ struct PackageNameOrdering :
return false;
}
} else {
- return version_ != current;
+ return [database_ cache][iterator_].Upgradable();
}
_end
}
@@ -4717,7 +4724,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
pkgCacheFile &cache([database_ cache]);
NSArray *packages([database_ packages]);
- pkgDepCache::Policy *policy([database_ policy]);
issues_ = [NSMutableArray arrayWithCapacity:4];
@@ -4832,7 +4838,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[removes addObject:name];
}
- substrate_ |= DepSubstrate(policy->GetCandidateVer(iterator));
+ substrate_ |= DepSubstrate(cache->GetCandidateVersion(iterator));
substrate_ |= DepSubstrate(iterator.CurrentVer());
}
diff --git a/Sources.mm b/Sources.mm
index 1fca2b5..3212ec9 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -36,7 +36,7 @@ void CydiaWriteSources() {
_assert(file != NULL);
if (kCFCoreFoundationVersionNumber >= 1443) {
- fprintf(file, "deb https://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ fprintf(file, "deb https://apt.bingner.com/ ./\n");
} else {
fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
fprintf(file, "deb https://apt.bingner.com/ ./\n");
@@ -51,11 +51,6 @@ void CydiaWriteSources() {
if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"])
continue;
- // Don't add Electra sources
- if ([[source objectForKey:@"URI"] rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound ||
- [[source objectForKey:@"URI"] rangeOfString:@"chimera" options:NSCaseInsensitiveSearch].location != NSNotFound)
- continue;
-
NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]);
fprintf(file, "%s %s %s%s%s\n",
@@ -75,11 +70,6 @@ void CydiaAddSource(NSDictionary *source) {
if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"])
return;
- // Don't add Electra sources
- if ([[source objectForKey:@"URI"] rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound ||
- [[source objectForKey:@"URI"] rangeOfString:@"chimera" options:NSCaseInsensitiveSearch].location != NSNotFound)
- return;
-
[Sources_ setObject:source forKey:[NSString stringWithFormat:@"%@:%@:%@", [source objectForKey:@"Type"], [source objectForKey:@"URI"], [source objectForKey:@"Distribution"]]];
}
diff --git a/cydia.preferences b/cydia.preferences
new file mode 100644
index 0000000..cc55339
--- /dev/null
+++ b/cydia.preferences
@@ -0,0 +1,11 @@
+Package: *
+Pin: release o=Bingner/Elucubratus
+Pin-Priority: 1001
+
+Package: *
+Pin: release o=Cydia/Telesphoreo
+Pin-Priority: 1001
+
+Package: mobilesubstrate
+Pin: release o=Bingner/Elucubratus
+Pin-Priority: 500
diff --git a/makefile b/makefile
index 1c742d2..776a543 100644
--- a/makefile
+++ b/makefile
@@ -203,11 +203,12 @@ postinst: postinst.mm CyteKit/stringWithUTF8Bytes.mm CyteKit/stringWithUTF8Bytes
$(cycc) $(plus) -o $@ $(filter %.mm,$^) $(flag) $(link) -framework CoreFoundation -framework Foundation -framework UIKit
@ldid -T0 -Sgenent.xml $@
-debs/cydia_$(version)_iphoneos-arm.deb: MobileCydia preinst postinst cfversion setnsfpn cydo $(images) $(shell find MobileCydia.app) cydia.control Library/firmware.sh Library/move.sh Library/startup
+debs/cydia_$(version)_iphoneos-arm.deb: MobileCydia preinst postinst cfversion setnsfpn cydo $(images) $(shell find MobileCydia.app) cydia.control cydia.preferences Library/firmware.sh Library/move.sh Library/startup
fakeroot rm -rf _
mkdir -p _/var/lib/cydia
- mkdir -p _/etc/apt
+ mkdir -p _/etc/apt/preferences.d
+ cp -a cydia.preferences _/etc/apt/preferences.d/cydia
cp -a Trusted.gpg _/etc/apt/trusted.gpg.d
cp -a Sources.list _/etc/apt/sources.list.d
diff --git a/postinst.mm b/postinst.mm
index e4206f6..41746b3 100644
--- a/postinst.mm
+++ b/postinst.mm
@@ -258,13 +258,11 @@ int main(int argc, const char *argv[]) {
#define Cytore_ "/metadata.cb0"
- unlink("/etc/apt/sources.list.d/electra.list");
- unlink("/etc/apt/sources.list.d/chimera.list");
#define CYDIA_LIST "/etc/apt/sources.list.d/cydia.list"
unlink(CYDIA_LIST);
if (kCFCoreFoundationVersionNumber >= 1443) {
[[NSString stringWithFormat:@
- "deb https://apt.bingner.com/ ios/%.2f main\n"
+ "deb https://apt.bingner.com/ ./\n"
"deb http://apt.thebigboss.org/repofiles/cydia/ stable main\n"
"deb http://cydia.zodttd.com/repo/cydia/ stable main\n"
"deb http://apt.modmyi.com/ stable main\n"