]> git.saurik.com Git - cydia.git/commitdiff
Various awesome upgrades.
authorJay Freeman (saurik) <saurik@saurk.com>
Tue, 5 May 2009 05:44:41 +0000 (05:44 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:13:14 +0000 (07:13 +0000)
26 files changed:
Cydia.app/Cydia
Cydia.app/English.lproj/Localizable.strings
Cydia.app/Modes/DOWNGRADE.png [new file with mode: 0644]
Cydia.app/Modes/Downgrade.png [deleted file]
Cydia.app/Modes/INSTALL.png [new file with mode: 0644]
Cydia.app/Modes/Install.png [deleted file]
Cydia.app/Modes/NEW_INSTALL.png [new symlink]
Cydia.app/Modes/New Install.png [deleted symlink]
Cydia.app/Modes/PURGE.png [new file with mode: 0644]
Cydia.app/Modes/Purge.png [deleted file]
Cydia.app/Modes/REINSTALL.png [new file with mode: 0644]
Cydia.app/Modes/REMOVE.png [new file with mode: 0644]
Cydia.app/Modes/Reinstall.png [deleted file]
Cydia.app/Modes/Remove.png [deleted file]
Cydia.app/Modes/UPGRADE.png [new file with mode: 0644]
Cydia.app/Modes/Upgrade.png [deleted file]
Cydia.app/Sources/apt.bigboss.us.com.png [deleted file]
Cydia.app/Sources/apt.modmyi.com.png [deleted file]
Cydia.app/Sources/apt.saurik.com.png [deleted file]
Cydia.app/Sources/repo.smxy.org.png [deleted file]
Cydia.mm
Library/free.sh
Library/move.sh
UICaboodle/BrowserView.m
control
make.sh

index 8356734e0e133c76afbff68d4aec66ec7652b845..3c723156a65b9841d6a529a9fe6cf4be43ec55a8 100755 (executable)
@@ -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
index 01b1a77c33c68a76c685f48ec496a1a53acc5cd2..3ccfa62fd2230d4e07cc8f8ba0e70925e80c0a38 100644 (file)
@@ -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
new file mode 100644 (file)
index 0000000..41c0d70
Binary files /dev/null and b/Cydia.app/Modes/DOWNGRADE.png differ
diff --git a/Cydia.app/Modes/Downgrade.png b/Cydia.app/Modes/Downgrade.png
deleted file mode 100644 (file)
index 41c0d70..0000000
Binary files a/Cydia.app/Modes/Downgrade.png and /dev/null differ
diff --git a/Cydia.app/Modes/INSTALL.png b/Cydia.app/Modes/INSTALL.png
new file mode 100644 (file)
index 0000000..a83f354
Binary files /dev/null and b/Cydia.app/Modes/INSTALL.png differ
diff --git a/Cydia.app/Modes/Install.png b/Cydia.app/Modes/Install.png
deleted file mode 100644 (file)
index a83f354..0000000
Binary files a/Cydia.app/Modes/Install.png and /dev/null differ
diff --git a/Cydia.app/Modes/NEW_INSTALL.png b/Cydia.app/Modes/NEW_INSTALL.png
new file mode 120000 (symlink)
index 0000000..475bda6
--- /dev/null
@@ -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 (symlink)
index 3330a1b..0000000
+++ /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
new file mode 100644 (file)
index 0000000..795fa19
Binary files /dev/null and b/Cydia.app/Modes/PURGE.png differ
diff --git a/Cydia.app/Modes/Purge.png b/Cydia.app/Modes/Purge.png
deleted file mode 100644 (file)
index 795fa19..0000000
Binary files a/Cydia.app/Modes/Purge.png and /dev/null differ
diff --git a/Cydia.app/Modes/REINSTALL.png b/Cydia.app/Modes/REINSTALL.png
new file mode 100644 (file)
index 0000000..0b7754c
Binary files /dev/null and b/Cydia.app/Modes/REINSTALL.png differ
diff --git a/Cydia.app/Modes/REMOVE.png b/Cydia.app/Modes/REMOVE.png
new file mode 100644 (file)
index 0000000..1b2e691
Binary files /dev/null and b/Cydia.app/Modes/REMOVE.png differ
diff --git a/Cydia.app/Modes/Reinstall.png b/Cydia.app/Modes/Reinstall.png
deleted file mode 100644 (file)
index 0b7754c..0000000
Binary files a/Cydia.app/Modes/Reinstall.png and /dev/null differ
diff --git a/Cydia.app/Modes/Remove.png b/Cydia.app/Modes/Remove.png
deleted file mode 100644 (file)
index 1b2e691..0000000
Binary files a/Cydia.app/Modes/Remove.png and /dev/null differ
diff --git a/Cydia.app/Modes/UPGRADE.png b/Cydia.app/Modes/UPGRADE.png
new file mode 100644 (file)
index 0000000..631b7ef
Binary files /dev/null and b/Cydia.app/Modes/UPGRADE.png differ
diff --git a/Cydia.app/Modes/Upgrade.png b/Cydia.app/Modes/Upgrade.png
deleted file mode 100644 (file)
index 631b7ef..0000000
Binary files a/Cydia.app/Modes/Upgrade.png and /dev/null 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 (file)
index 8c79a38..0000000
Binary files a/Cydia.app/Sources/apt.bigboss.us.com.png and /dev/null differ
diff --git a/Cydia.app/Sources/apt.modmyi.com.png b/Cydia.app/Sources/apt.modmyi.com.png
deleted file mode 100644 (file)
index 18885ea..0000000
Binary files a/Cydia.app/Sources/apt.modmyi.com.png and /dev/null differ
diff --git a/Cydia.app/Sources/apt.saurik.com.png b/Cydia.app/Sources/apt.saurik.com.png
deleted file mode 100644 (file)
index f2bfcab..0000000
Binary files a/Cydia.app/Sources/apt.saurik.com.png and /dev/null differ
diff --git a/Cydia.app/Sources/repo.smxy.org.png b/Cydia.app/Sources/repo.smxy.org.png
deleted file mode 100644 (file)
index 26c9655..0000000
Binary files a/Cydia.app/Sources/repo.smxy.org.png and /dev/null differ
index 4966a1bcf0f6c1424cba5423a95933ab76891de5..5b3eb8057fbdac91c6b3f6393dcddee9eeea9c1c 100644 (file)
--- 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];
index 703d3027d68386e2a45c0e3851b5a3b2ebeb8067..c38b269764afae8914aec26959d3b28c6fde8272 100755 (executable)
@@ -5,6 +5,7 @@ for dir in \
     /Library/Wallpaper \
     /Library/Ringtones \
     /usr/include \
+    /usr/lib/pam \
     /usr/libexec \
     /usr/share \
 ; do
index abfe2edf9b13d6e6e4408433b6f901ed84d079e2..4a15ca711039e23e032041c2067cee251bf24023 100755 (executable)
@@ -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)
 
index 10cc19376a28f83930195cf501ccc7670e7aa06e..fbec7b7c123ca436e5e5a8d4fcbadce85d0f5e77 100644 (file)
         _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 5843ad6e251fbe5f4508aa426b329e8138d8a06f..a7ad6e2e8282c329ef447ff2555ca6af6b837609 100644 (file)
--- 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 f8edbe1ae931c4a44b6187d28a32277ddc8cd8e5..0ed2d3e9c9ed7bfdcc09e361623ab9acb765a26b 100755 (executable)
--- 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