summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-05-05 05:44:41 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:13:14 +0000
commit6204f56a7d810316e2b93ef0214ca1c931c4c889 (patch)
treecac72979161b48741c4df804bf6f5aab5d91781e
parent20cb1497dc6be5c6f6af8fd79a04ec8aed24df48 (diff)
Various awesome upgrades.
-rwxr-xr-xCydia.app/Cydia5
-rw-r--r--Cydia.app/English.lproj/Localizable.strings1
-rw-r--r--Cydia.app/Modes/DOWNGRADE.png (renamed from Cydia.app/Modes/Downgrade.png)bin1176 -> 1176 bytes
-rw-r--r--Cydia.app/Modes/INSTALL.png (renamed from Cydia.app/Modes/Install.png)bin2135 -> 2135 bytes
l---------Cydia.app/Modes/NEW_INSTALL.png1
l---------Cydia.app/Modes/New Install.png1
-rw-r--r--Cydia.app/Modes/PURGE.png (renamed from Cydia.app/Modes/Purge.png)bin2443 -> 2443 bytes
-rw-r--r--Cydia.app/Modes/REINSTALL.png (renamed from Cydia.app/Modes/Reinstall.png)bin2013 -> 2013 bytes
-rw-r--r--Cydia.app/Modes/REMOVE.png (renamed from Cydia.app/Modes/Remove.png)bin2552 -> 2552 bytes
-rw-r--r--Cydia.app/Modes/UPGRADE.png (renamed from Cydia.app/Modes/Upgrade.png)bin1635 -> 1635 bytes
-rw-r--r--Cydia.app/Sources/apt.bigboss.us.com.pngbin6405 -> 0 bytes
-rw-r--r--Cydia.app/Sources/apt.modmyi.com.pngbin5186 -> 0 bytes
-rw-r--r--Cydia.app/Sources/apt.saurik.com.pngbin1952 -> 0 bytes
-rw-r--r--Cydia.app/Sources/repo.smxy.org.pngbin737 -> 0 bytes
-rw-r--r--Cydia.mm156
-rwxr-xr-xLibrary/free.sh1
-rwxr-xr-xLibrary/move.sh2
-rw-r--r--UICaboodle/BrowserView.m3
-rw-r--r--control4
-rwxr-xr-xmake.sh2
20 files changed, 111 insertions, 65 deletions
diff --git a/Cydia.app/Cydia b/Cydia.app/Cydia
index 8356734..3c72315 100755
--- a/Cydia.app/Cydia
+++ b/Cydia.app/Cydia
@@ -1,5 +1,6 @@
#!/bin/bash
-Cydia=$(dirname "$0")
+C=/${0}
+C=${C%/*}
declare -a flags
[[ :${DYLD_INSERT_LIBRARIES}: == */MobileSubstrate.dylib: ]] && flags[${#flags[@]}]=--substrate
-exec "${Cydia}"/Cydia_ "${flags[@]}" -- "$@" 2>>/tmp/cydia.log
+exec "${C:-.}"/Cydia_ "${flags[@]}" -- "$@" 2>>/tmp/cydia.log
diff --git a/Cydia.app/English.lproj/Localizable.strings b/Cydia.app/English.lproj/Localizable.strings
index 01b1a77..3ccfa62 100644
--- a/Cydia.app/English.lproj/Localizable.strings
+++ b/Cydia.app/English.lproj/Localizable.strings
@@ -95,6 +95,7 @@
"LOGIN" = "Login";
"MAINTAINER" = "Contact";
"MANAGE" = "Manage";
+"MODIFICATIONS" = "Modifications";
"MODIFY" = "Modify";
"MORE_INFORMATION" = "More Information";
"MORE_PACKAGE_SOURCES" = "More Package Sources";
diff --git a/Cydia.app/Modes/Downgrade.png b/Cydia.app/Modes/DOWNGRADE.png
index 41c0d70..41c0d70 100644
--- a/Cydia.app/Modes/Downgrade.png
+++ b/Cydia.app/Modes/DOWNGRADE.png
Binary files differ
diff --git a/Cydia.app/Modes/Install.png b/Cydia.app/Modes/INSTALL.png
index a83f354..a83f354 100644
--- a/Cydia.app/Modes/Install.png
+++ b/Cydia.app/Modes/INSTALL.png
Binary files differ
diff --git a/Cydia.app/Modes/NEW_INSTALL.png b/Cydia.app/Modes/NEW_INSTALL.png
new file mode 120000
index 0000000..475bda6
--- /dev/null
+++ b/Cydia.app/Modes/NEW_INSTALL.png
@@ -0,0 +1 @@
+INSTALL.png \ No newline at end of file
diff --git a/Cydia.app/Modes/New Install.png b/Cydia.app/Modes/New Install.png
deleted file mode 120000
index 3330a1b..0000000
--- a/Cydia.app/Modes/New Install.png
+++ /dev/null
@@ -1 +0,0 @@
-Install.png \ No newline at end of file
diff --git a/Cydia.app/Modes/Purge.png b/Cydia.app/Modes/PURGE.png
index 795fa19..795fa19 100644
--- a/Cydia.app/Modes/Purge.png
+++ b/Cydia.app/Modes/PURGE.png
Binary files differ
diff --git a/Cydia.app/Modes/Reinstall.png b/Cydia.app/Modes/REINSTALL.png
index 0b7754c..0b7754c 100644
--- a/Cydia.app/Modes/Reinstall.png
+++ b/Cydia.app/Modes/REINSTALL.png
Binary files differ
diff --git a/Cydia.app/Modes/Remove.png b/Cydia.app/Modes/REMOVE.png
index 1b2e691..1b2e691 100644
--- a/Cydia.app/Modes/Remove.png
+++ b/Cydia.app/Modes/REMOVE.png
Binary files differ
diff --git a/Cydia.app/Modes/Upgrade.png b/Cydia.app/Modes/UPGRADE.png
index 631b7ef..631b7ef 100644
--- a/Cydia.app/Modes/Upgrade.png
+++ b/Cydia.app/Modes/UPGRADE.png
Binary files differ
diff --git a/Cydia.app/Sources/apt.bigboss.us.com.png b/Cydia.app/Sources/apt.bigboss.us.com.png
deleted file mode 100644
index 8c79a38..0000000
--- a/Cydia.app/Sources/apt.bigboss.us.com.png
+++ /dev/null
Binary files differ
diff --git a/Cydia.app/Sources/apt.modmyi.com.png b/Cydia.app/Sources/apt.modmyi.com.png
deleted file mode 100644
index 18885ea..0000000
--- a/Cydia.app/Sources/apt.modmyi.com.png
+++ /dev/null
Binary files differ
diff --git a/Cydia.app/Sources/apt.saurik.com.png b/Cydia.app/Sources/apt.saurik.com.png
deleted file mode 100644
index f2bfcab..0000000
--- a/Cydia.app/Sources/apt.saurik.com.png
+++ /dev/null
Binary files differ
diff --git a/Cydia.app/Sources/repo.smxy.org.png b/Cydia.app/Sources/repo.smxy.org.png
deleted file mode 100644
index 26c9655..0000000
--- a/Cydia.app/Sources/repo.smxy.org.png
+++ /dev/null
Binary files differ
diff --git a/Cydia.mm b/Cydia.mm
index 4966a1b..5b3eb80 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -1423,6 +1423,7 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
/* Source Class {{{ */
@interface Source : NSObject {
+ CYString depiction_;
CYString description_;
CYString label_;
CYString origin_;
@@ -1445,6 +1446,7 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
- (NSComparisonResult) compareByNameAndType:(Source *)source;
+- (NSString *) depictionForPackage:(NSString *)package;
- (NSString *) supportForPackage:(NSString *)package;
- (NSDictionary *) record;
@@ -1476,6 +1478,7 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
description_.clear();
label_.clear();
origin_.clear();
+ depiction_.clear();
support_.clear();
version_.clear();
defaultIcon_.clear();
@@ -1533,6 +1536,7 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
CYString *value_;
} names[] = {
{"default-icon", &defaultIcon_},
+ {"depiction", &depiction_},
{"description", &description_},
{"label", &label_},
{"origin", &origin_},
@@ -1587,6 +1591,10 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
return [lhs compare:rhs options:LaxCompareOptions_];
}
+- (NSString *) depictionForPackage:(NSString *)package {
+ return depiction_.empty() ? nil : [depiction_ stringByReplacingOccurrencesOfString:@"*" withString:package];
+}
+
- (NSString *) supportForPackage:(NSString *)package {
return support_.empty() ? nil : [support_ stringByReplacingOccurrencesOfString:@"*" withString:package];
}
@@ -2094,6 +2102,8 @@ struct PackageNameOrdering :
_end
}
+ visible_ = true;
+
_profile(Package$initWithVersion$Tags)
pkgCache::TagIterator tag(iterator_.TagList());
if (!tag.end()) {
@@ -2101,8 +2111,12 @@ struct PackageNameOrdering :
do {
const char *name(tag.Name());
[tags_ addObject:(NSString *)CFCString(name)];
- if (role_ == nil && strncmp(name, "role::", 6) == 0)
+ if (role_ == nil && strncmp(name, "role::", 6) == 0 && strcmp(name, "role::leaper") != 0)
role_ = (NSString *) CFCString(name + 6);
+ if (visible_ && strncmp(name, "require::", 9) == 0 && (
+ true
+ ))
+ visible_ = false;
++tag;
} while (!tag.end());
}
@@ -2162,7 +2176,7 @@ struct PackageNameOrdering :
_end
essential_ = ((iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES) || [self hasTag:@"cydia::essential"];
- visible_ = [self hasSupportingRole] && [self unfiltered];
+ visible_ &&= [self hasSupportingRole] && [self unfiltered];
} _end } return self;
}
@@ -2428,7 +2442,7 @@ struct PackageNameOrdering :
}
- (NSString *) depiction {
- return depiction_;
+ return !depiction_.empty() ? depiction_ : [[self source] depictionForPackage:id_];
}
- (Address *) sponsor {
@@ -3331,6 +3345,8 @@ static NSArray *Finishes_;
for (pkgAcquire::ItemIterator item = fetcher_->ItemsBegin(); item != fetcher_->ItemsEnd(); item++) {
if ((*item)->Status == pkgAcquire::Item::StatDone && (*item)->Complete)
continue;
+ if ((*item)->Status == pkgAcquire::Item::StatIdle)
+ continue;
std::string uri = (*item)->DescURI();
std::string error = (*item)->ErrorText;
@@ -3991,64 +4007,25 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[transition_ transition:6 toView:view_];
}
-- (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button {
- NSString *context([sheet context]);
-
- if ([context isEqualToString:@"error"])
- [sheet dismiss];
- else if ([context isEqualToString:@"conffile"]) {
- FILE *input = [database_ input];
-
- switch (button) {
- case 1:
- fprintf(input, "N\n");
- fflush(input);
- break;
- case 2:
- fprintf(input, "Y\n");
- fflush(input);
- break;
- default:
- _assert(false);
- }
-
- [sheet dismiss];
- }
-}
-
-- (void) closeButtonPushed {
- running_ = NO;
-
- switch (Finish_) {
- case 0:
- [self resetView];
- break;
-
- case 1:
- [delegate_ suspendWithAnimation:YES];
- break;
+- (void) _checkError {
+ if (_error->PendingError()) {
+ std::string error;
+ if (!_error->PopMessage(error))
+ _assert(false);
- case 2:
- system("launchctl stop com.apple.SpringBoard");
- break;
+ UIActionSheet *sheet = [[[UIActionSheet alloc]
+ initWithTitle:CYLocalize("ERROR")
+ buttons:[NSArray arrayWithObjects:CYLocalize("OKAY"), nil]
+ defaultButtonIndex:0
+ delegate:self
+ context:@"_error"
+ ] autorelease];
- case 3:
- system("launchctl unload "SpringBoard_"; launchctl load "SpringBoard_);
- break;
+ [sheet setBodyText:[NSString stringWithUTF8String:error.c_str()]];
+ [sheet popupAlertAnimated:YES];
- case 4:
- system("reboot");
- break;
+ return;
}
-}
-
-- (void) _retachThread {
- UINavigationItem *item = [navbar_ topItem];
- [item setTitle:CYLocalize("COMPLETE")];
-
- [overlay_ addSubview:close_];
- [progress_ removeFromSuperview];
- [status_ removeFromSuperview];
[delegate_ progressViewIsComplete:self];
@@ -4137,6 +4114,71 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[delegate_ setStatusBarShowsProgress:NO];
}
+- (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button {
+ NSString *context([sheet context]);
+
+ if ([context isEqualToString:@"error"])
+ [sheet dismiss];
+ else if ([context isEqualToString:@"_error"]) {
+ [sheet dismiss];
+ [self _checkError];
+ } else if ([context isEqualToString:@"conffile"]) {
+ FILE *input = [database_ input];
+
+ switch (button) {
+ case 1:
+ fprintf(input, "N\n");
+ fflush(input);
+ break;
+ case 2:
+ fprintf(input, "Y\n");
+ fflush(input);
+ break;
+ default:
+ _assert(false);
+ }
+
+ [sheet dismiss];
+ }
+}
+
+- (void) closeButtonPushed {
+ running_ = NO;
+
+ switch (Finish_) {
+ case 0:
+ [self resetView];
+ break;
+
+ case 1:
+ [delegate_ suspendWithAnimation:YES];
+ break;
+
+ case 2:
+ system("launchctl stop com.apple.SpringBoard");
+ break;
+
+ case 3:
+ system("launchctl unload "SpringBoard_"; launchctl load "SpringBoard_);
+ break;
+
+ case 4:
+ system("reboot");
+ break;
+ }
+}
+
+- (void) _retachThread {
+ UINavigationItem *item = [navbar_ topItem];
+ [item setTitle:CYLocalize("COMPLETE")];
+
+ [overlay_ addSubview:close_];
+ [progress_ removeFromSuperview];
+ [status_ removeFromSuperview];
+
+ [self _checkError];
+}
+
- (void) _detachNewThreadData:(ProgressData *)data { _pooled
[[data target] performSelector:[data selector] withObject:[data object]];
[data release];
diff --git a/Library/free.sh b/Library/free.sh
index 703d302..c38b269 100755
--- a/Library/free.sh
+++ b/Library/free.sh
@@ -5,6 +5,7 @@ for dir in \
/Library/Wallpaper \
/Library/Ringtones \
/usr/include \
+ /usr/lib/pam \
/usr/libexec \
/usr/share \
; do
diff --git a/Library/move.sh b/Library/move.sh
index abfe2ed..4a15ca7 100755
--- a/Library/move.sh
+++ b/Library/move.sh
@@ -45,7 +45,7 @@ function shift_() {
dir=${1%/}
if [[ -d ${dir} && ! -h ${dir} ]]; then
- used=$(du -bs "${dir}")
+ used=$(/usr/libexec/cydia/du -bs "${dir}")
used=${used%%$'\t'*}
free=$(df_ /var)
diff --git a/UICaboodle/BrowserView.m b/UICaboodle/BrowserView.m
index 10cc193..fbec7b7 100644
--- a/UICaboodle/BrowserView.m
+++ b/UICaboodle/BrowserView.m
@@ -240,7 +240,8 @@
_assert(dup2(fds[1], 1) != -1);
_assert(close(fds[0]) != -1);
_assert(close(fds[1]) != -1);
- execlp("du", "du", "-s", [path UTF8String], NULL);
+ /* XXX: this should probably not use du */
+ execl("/usr/libexec/cydia/du", "du", "-s", [path UTF8String], NULL);
exit(1);
_assert(false);
}
diff --git a/control b/control
index 5843ad6..a7ad6e2 100644
--- a/control
+++ b/control
@@ -3,9 +3,9 @@ Priority: required
Section: Packaging
Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
-Version: 1.0.2847-1
+Version: 1.0.2881-1
Replaces: com.sosiphone.addcydia
-Depends: apr, apt7, darwintools, pcre, shell-cmds, system-cmds
+Depends: apr-lib, apt7-lib, darwintools, pcre, shell-cmds, system-cmds
Pre-Depends: dpkg (>= 1.14.25-8)
Conflicts: com.sosiphone.addcydia
Description: graphical iPhone front-end for APT
diff --git a/make.sh b/make.sh
index f8edbe1..0ed2d3e 100755
--- a/make.sh
+++ b/make.sh
@@ -1,2 +1,2 @@
#!/bin/bash
-/apl/tel/exec.sh :apr:apr-lib:apt7:pcre make package
+/apl/tel/exec.sh :apr:apr-lib:apt7:apt7-lib:pcre make package