<label id="author"></label>
</div></a>
- <div class="commercial">
+ <!--div class="commercial">
<img class="icon" src="commercial.png"/><div>
<label>This is a commercial package!</label>
- </div></div>
+ </div></div-->
<a class="console" href="http://cydia.saurik.com/purpose/console/">
<img class="icon" src="console.png"/><div>
/* Database Interface {{{ */
@interface Database : NSObject {
+ unsigned era_;
+
pkgCacheFile cache_;
pkgDepCache::Policy *policy_;
pkgRecords *records_;
}
+ (Database *) sharedInstance;
+- (unsigned) era;
- (void) _readCydia:(NSNumber *)fd;
- (void) _readStatus:(NSNumber *)fd;
/* }}} */
/* Package Class {{{ */
@interface Package : NSObject {
+ unsigned era_;
+
pkgCache::PkgIterator iterator_;
_transient Database *database_;
pkgCache::VerIterator version_;
bool cached_;
NSString *section_;
+ bool essential_;
NSString *latest_;
NSString *installed_;
- (void) dealloc {
if (source_ != nil)
[source_ release];
-
if (section_ != nil)
[section_ release];
}
- (Package *) initWithIterator:(pkgCache::PkgIterator)iterator database:(Database *)database {
- if ((self = [super init]) != nil) { _profile(Package$initWithIterator)
+ if ((self = [super init]) != nil) {
+ _profile(Package$initWithIterator)
+ @synchronized (database) {
+ era_ = [database era];
+
iterator_ = iterator;
database_ = database;
Changed_ = true;
}
_end
- _end } return self;
+
+ const char *section(iterator_.Section());
+ if (section == NULL)
+ section_ = nil;
+ else {
+ NSString *name([[NSString stringWithUTF8String:section] stringByReplacingCharacter:' ' withCharacter:'_']);
+
+ lookup:
+ if (NSDictionary *value = [SectionMap_ objectForKey:name])
+ if (NSString *rename = [value objectForKey:@"Rename"]) {
+ name = rename;
+ goto lookup;
+ }
+
+ section_ = [[name stringByReplacingCharacter:'_' withCharacter:' '] retain];
+ }
+
+ essential_ = (iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES;
+ } _end } return self;
}
+ (Package *) packageWithIterator:(pkgCache::PkgIterator)iterator database:(Database *)database {
}
- (NSString *) section {
- if (section_ != nil)
- return section_;
-
- const char *section = iterator_.Section();
- if (section == NULL)
- return nil;
-
- NSString *name = [[NSString stringWithUTF8String:section] stringByReplacingCharacter:' ' withCharacter:'_'];
-
- lookup:
- if (NSDictionary *value = [SectionMap_ objectForKey:name])
- if (NSString *rename = [value objectForKey:@"Rename"]) {
- name = rename;
- goto lookup;
- }
-
- section_ = [[name stringByReplacingCharacter:'_' withCharacter:' '] retain];
return section_;
}
}
- (BOOL) essential {
- return (iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES;
+ return essential_;
}
- (BOOL) broken {
- (Source *) source {
if (!cached_) {
- source_ = file_.end() ? nil : [[database_ getSource:file_.File()] retain];
- cached_ = true;
+ @synchronized (database_) {
+ if ([database_ era] != era_ || file_.end())
+ source_ = nil;
+ else {
+ source_ = [database_ getSource:file_.File()];
+ if (source_ != nil)
+ [source_ retain];
+ }
+
+ cached_ = true;
+ }
}
return source_;
return instance;
}
+- (unsigned) era {
+ return era_;
+}
+
- (void) dealloc {
_assert(false);
[super dealloc];
}
- (void) reloadData { _pooled
+ @synchronized (self) {
+ ++era_;
+ }
+
_error->Discard();
delete list_;
Section: Packaging
Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
-Version: 1.0.2716-42
+Version: 1.0.2769-43
Replaces: com.sosiphone.addcydia
Depends: apt, darwintools, pcre, shell-cmds
Conflicts: com.sosiphone.addcydia