diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-30 05:50:13 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-12-01 01:46:25 -0800 |
commit | 0a377825005a118bc5f14a26bee745ec432a1a70 (patch) | |
tree | fe1670d168050b260d1a631e0258f9e203ecfb60 /MobileCydia.mm | |
parent | 9781428743d8ad07f073423d451286548af7ec7f (diff) |
Avoid using hasTag: during Package initialization.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index d558ad8..10e8199 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -2243,8 +2243,17 @@ struct PackageNameOrdering : do { const char *name(tag.Name()); [tags_ addObject:[(NSString *)CYStringCreate(name) autorelease]]; + if (role_ == nil && strncmp(name, "role::", 6) == 0 /*&& strcmp(name, "role::leaper") != 0*/) role_ = (NSString *) CYStringCreate(name + 6); + + if (strncmp(name, "cydia::", 7) == 0) { + if (strcmp(name + 7, "essential") == 0) + essential_ = true; + else if (strcmp(name + 7, "obsolete") == 0) + obsolete_ = true; + } + ++tag; } while (!tag.end()); } @@ -2277,8 +2286,7 @@ struct PackageNameOrdering : _end _profile(Package$initWithVersion$hasTag) - obsolete_ = [self hasTag:@"cydia::obsolete"]; - essential_ = ((iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES) || [self hasTag:@"cydia::essential"]; + essential_ |= ((iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES); _end ignored_ = iterator_->SelectedState == pkgCache::State::Hold; |