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-27 14:31:08 -1000
commit97e900b2ad67c8f16716dff496180b09b33d9eaf (patch)
treebfba7b6693990aadd1f25a0ecd3d2544bf34ae4a
parent04f7858ab3a4ae343dee401efc7ecd777d422b1b (diff)
Pin elucubratus, support pining, unblock electra
-rw-r--r--MobileCydia.mm18
-rw-r--r--Sources.mm12
-rw-r--r--cydia.preferences11
-rw-r--r--makefile3
-rw-r--r--postinst.mm4
5 files changed, 27 insertions, 21 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index b7a9c15..993b4e3 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -749,8 +749,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 2a64210..aaf20f1 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -43,7 +43,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");
@@ -58,11 +58,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",
@@ -82,11 +77,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 1eaaf68..2d6565a 100644
--- a/makefile
+++ b/makefile
@@ -306,13 +306,14 @@ postinst: postinst.mm CyteKit/stringWith.mm CyteKit/stringWith.h CyteKit/UCPlatf
$(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 _/etc/apt/apt.conf.d
mkdir _/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 dfa2c38..07a1611 100644
--- a/postinst.mm
+++ b/postinst.mm
@@ -256,13 +256,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"