|
@@ -122,7 +122,7 @@ int main(int argc, const char * argv[]) {
|
|
|
|
|
|
NSString *pwd = [[HelperClass returnForProcess:@"/bin/pwd"] componentsJoinedByString:@"\n"];
|
|
NSString *pwd = [[HelperClass returnForProcess:@"/bin/pwd"] componentsJoinedByString:@"\n"];
|
|
DLog(@"\nProcessing file: %@\n", repackage);
|
|
DLog(@"\nProcessing file: %@\n", repackage);
|
|
- StatusPackage *output = [HelperClass packageForDeb:repackage];
|
|
|
|
|
|
+ InputPackage *output = [HelperClass packageForDeb:repackage];
|
|
|
|
|
|
DLog(@"\nFound package: '%@' at version: '%@'...\n", output.packageName, output.version );
|
|
DLog(@"\nFound package: '%@' at version: '%@'...\n", output.packageName, output.version );
|
|
|
|
|
|
@@ -164,11 +164,11 @@ int main(int argc, const char * argv[]) {
|
|
DLog(@"\n [INFO] Cleaning status file: %@", statusFile);
|
|
DLog(@"\n [INFO] Cleaning status file: %@", statusFile);
|
|
|
|
|
|
NSString *testStatusFile = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/status"];
|
|
NSString *testStatusFile = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/status"];
|
|
- NSArray <DebPackageModel*> *installedPackages = [HelperClass statusInstalledPackagesFromFile:statusFile];
|
|
|
|
|
|
+ NSArray <StatusPackageModel*> *installedPackages = [HelperClass statusInstalledPackagesFromFile:statusFile];
|
|
__block NSMutableString *newStatusFile = [NSMutableString new];
|
|
__block NSMutableString *newStatusFile = [NSMutableString new];
|
|
__block NSMutableArray *alreadyAdded = [NSMutableArray new];
|
|
__block NSMutableArray *alreadyAdded = [NSMutableArray new];
|
|
|
|
|
|
- [installedPackages enumerateObjectsUsingBlock:^(DebPackageModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
|
+ [installedPackages enumerateObjectsUsingBlock:^(StatusPackageModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
|
DLog(@"\n [INFO] Processing pacakge: %@", obj.package);
|
|
DLog(@"\n [INFO] Processing pacakge: %@", obj.package);
|
|
|
|
|
|
@@ -180,7 +180,7 @@ int main(int argc, const char * argv[]) {
|
|
if (doubleCheck.count > 1){
|
|
if (doubleCheck.count > 1){
|
|
|
|
|
|
NSSortDescriptor *sortDesc = [NSSortDescriptor sortDescriptorWithKey:@"version" ascending:FALSE];
|
|
NSSortDescriptor *sortDesc = [NSSortDescriptor sortDescriptorWithKey:@"version" ascending:FALSE];
|
|
- DebPackageModel *latestVersion = [[doubleCheck sortedArrayUsingDescriptors:@[sortDesc]] firstObject];
|
|
|
|
|
|
+ StatusPackageModel *latestVersion = [[doubleCheck sortedArrayUsingDescriptors:@[sortDesc]] firstObject];
|
|
DLog(@"\n [INFO] We found a duplicate package, choosing latestVersion: %@", latestVersion);
|
|
DLog(@"\n [INFO] We found a duplicate package, choosing latestVersion: %@", latestVersion);
|
|
|
|
|
|
|
|
|
|
@@ -223,9 +223,9 @@ int main(int argc, const char * argv[]) {
|
|
__block NSString *postInstFile = nil;
|
|
__block NSString *postInstFile = nil;
|
|
|
|
|
|
NSString *statusFile = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/status"];
|
|
NSString *statusFile = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/status"];
|
|
- NSArray <DebPackageModel*> *installedPackages = [HelperClass statusInstalledPackagesFromFile:statusFile];
|
|
|
|
|
|
+ NSArray <StatusPackageModel*> *installedPackages = [HelperClass statusInstalledPackagesFromFile:statusFile];
|
|
|
|
|
|
- DebPackageModel *model = [[installedPackages filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"package == %@", deletePackage]] lastObject];
|
|
|
|
|
|
+ StatusPackageModel *model = [[installedPackages filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"package == %@", deletePackage]] lastObject];
|
|
|
|
|
|
if (model) {
|
|
if (model) {
|
|
|
|
|
|
@@ -309,7 +309,7 @@ int main(int argc, const char * argv[]) {
|
|
|
|
|
|
__block NSMutableString *newStatusFile = [NSMutableString new];
|
|
__block NSMutableString *newStatusFile = [NSMutableString new];
|
|
|
|
|
|
- [installedPackages enumerateObjectsUsingBlock:^(DebPackageModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
|
+ [installedPackages enumerateObjectsUsingBlock:^(StatusPackageModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
|
|
if (obj != model){
|
|
if (obj != model){
|
|
|
|
|
|
@@ -367,13 +367,13 @@ int main(int argc, const char * argv[]) {
|
|
//DLog(@"installedPackages: %@", installedPackages);
|
|
//DLog(@"installedPackages: %@", installedPackages);
|
|
|
|
|
|
DLog(@"\nProcessing file: %@\n", debFile);
|
|
DLog(@"\nProcessing file: %@\n", debFile);
|
|
- StatusPackage *output = [HelperClass packageForDeb:debFile];
|
|
|
|
|
|
+ InputPackage *output = [HelperClass packageForDeb:debFile];
|
|
|
|
|
|
DLog(@"\nFound package: '%@' at version: '%@'...\n", output.packageName, output.version );
|
|
DLog(@"\nFound package: '%@' at version: '%@'...\n", output.packageName, output.version );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- DebPackageModel *model = [[installedPackages filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"package == %@", output.packageName]] lastObject];
|
|
|
|
|
|
+ StatusPackageModel *model = [[installedPackages filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"package == %@", output.packageName]] lastObject];
|
|
|
|
|
|
if (model) {
|
|
if (model) {
|
|
|
|
|