- while (!cache_.Open(progress, true)) { pop:
- std::string error;
- bool warning(!_error->PopMessage(error));
- lprintf("cache_.Open():[%s]\n", error.c_str());
-
- if (error == "dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. ")
- [delegate_ repairWithSelector:@selector(configure)];
- //else if (error == "The package lists or status file could not be parsed or opened.")
- // [delegate_ repairWithSelector:@selector(update)];
- // else if (error == "Could not get lock /var/lib/dpkg/lock - open (35 Resource temporarily unavailable)")
- // else if (error == "Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)")
- // else if (error == "Malformed Status line")
- // else if (error == "The list of sources could not be read.")
- else {
+ open:
+ if (!cache_.Open(progress, true)) {
+ // XXX: what if there are errors, but Open() == true? this should be merged with popError:
+ while (!_error->empty()) {
+ std::string error;
+ bool warning(!_error->PopMessage(error));
+
+ lprintf("cache_.Open():[%s]\n", error.c_str());
+