From 9743c0151780da71d82a33fd28ed72b75750072d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 17 Mar 2008 07:00:47 +0000 Subject: [PATCH] Ghost packages suck. --- Cydia.mm | 14 ++++++++++---- makefile | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Cydia.mm b/Cydia.mm index 174fdfd4..8702e29a 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -1,7 +1,9 @@ /* #include Directives {{{ */ #include #include -#import +#include + +#include #include #include @@ -25,7 +27,8 @@ extern "C" { #include } -#include +#include +#include #include #include @@ -60,6 +63,8 @@ while (false) #define UITable UITableView #endif +OBJC_EXPORT const char *class_getName(Class cls); + /* Reset View (UIView) {{{ */ @interface UIView (CYResetView) - (void) resetViewAnimated:(BOOL)animated; @@ -68,7 +73,7 @@ while (false) @implementation UIView (CYResetView) - (void) resetViewAnimated:(BOOL)animated { - fprintf(stderr, "%s\n", self->isa->name); + fprintf(stderr, "%s\n", class_getName(self->isa)); _assert(false); } @@ -2011,7 +2016,8 @@ NSString *Scour(const char *field, const char *begin, const char *end) { [packages_ removeAllObjects]; for (pkgCache::PkgIterator iterator = cache_->PkgBegin(); !iterator.end(); ++iterator) if (Package *package = [Package packageWithIterator:iterator database:self]) - [packages_ addObject:package]; + if ([package source] != nil || [package installed] != nil) + [packages_ addObject:package]; } - (void) prepare { diff --git a/makefile b/makefile index 365ced3d..88785d3e 100644 --- a/makefile +++ b/makefile @@ -10,7 +10,7 @@ exec: exec.mm makefile arm-apple-darwin-g++ -Wall -Werror -o $@ $< -framework Foundation -framework CoreFoundation -lobjc Cydia-1.2: Cydia.mm *.h makefile - arm-apple-darwin-g++ -fobjc-abi-version=2 -fobjc-call-cxx-cdtors -g3 -O2 -Wall -o $@ $< -framework UIKit -framework IOKit -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework GraphicsServices -lobjc -lapt-pkg -lpcre -fobjc-exceptions -save-temps -F $(Aspen)/System/Library/Frameworks -I $(Aspen)/usr/include -DTARGET_OS_EMBEDDED -DSRK_ASPEN + arm-apple-darwin9-g++ -fobjc-abi-version=2 -fobjc-call-cxx-cdtors -g3 -O2 -Wall -o $@ $< -framework UIKit -framework IOKit -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework GraphicsServices -lobjc -lapt-pkg -lpcre -fobjc-exceptions -save-temps -DTARGET_OS_EMBEDDED -DSRK_ASPEN Cydia: Cydia.mm *.h makefile arm-apple-darwin-g++ -fobjc-call-cxx-cdtors -g3 -O2 -Wall -Werror -o $@ $< -framework UIKit -framework IOKit -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework GraphicsServices -lobjc -lapt-pkg -lpcre -fobjc-exceptions -- 2.45.2