diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-12-21 09:40:45 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:09:21 +0000 |
commit | 73ee65672f10d941f0b7d51b89b3e61c138932f0 (patch) | |
tree | 19365521965eb302c5767afa6dc2e75f8c9b8c45 /Cydia.mm | |
parent | 4bcbe7f928b8c153a3c04c914533d7faa5b9b47a (diff) |
Fixed package holds on Changes.
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -262,7 +262,7 @@ extern NSString * const kCAFilterNearest; #define lprintf(args...) fprintf(stderr, args) -#define ForRelease 0 +#define ForRelease 1 #define ForSaurik (1 && !ForRelease) #define IgnoreInstall (0 && !ForRelease) #define RecycleWebViews 0 @@ -1582,10 +1582,12 @@ class Progress : - (BOOL) upgradableAndEssential:(BOOL)essential { pkgCache::VerIterator current = iterator_.CurrentVer(); + bool value; if (current.end()) - return essential && [self essential]; + value = essential && [self essential]; else - return !version_.end() && version_ != current; + value = !version_.end() && version_ != current && (!essential || ![database_ cache][iterator_].Keep()); + return value; } - (BOOL) essential { @@ -1921,9 +1923,10 @@ class Progress : } bits; } value; - value.bits.upgradable = [self upgradableAndEssential:YES] ? 1 : 0; + bool upgradable([self upgradableAndEssential:YES]); + value.bits.upgradable = upgradable ? 1 : 0; - if ([self upgradableAndEssential:YES]) { + if (upgradable) { value.bits.timestamp = 0; value.bits.ignored = [self ignored] ? 0 : 1; value.bits.upgradable = 1; |