rpmpm.c: fixed rpmdepCheck() call
It is not clear what rpmdepCheck() return code is supposed to mean. Logically, non-zero return code should mean that the dependency check failed. However, rpm can also return 0 (for "no error") while setting "conflicts" pointer. So, for now, it seems that we should check both the return code and the pointer.
This commit is contained in:
parent
cfd2cddf4a
commit
ccee73bb59
@ -852,14 +852,14 @@ bool pkgRPMLibPM::Process(vector<const char*> &install,
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if RPM_VERSION < 0x040000
|
||||
rpmDependencyConflict *conflicts;
|
||||
#else
|
||||
rpmDependencyConflict conflicts;
|
||||
#endif
|
||||
if (_config->FindB("RPM::NoDeps", false) == false) {
|
||||
#if RPM_VERSION < 0x040000
|
||||
rpmDependencyConflict *conflicts = NULL;
|
||||
#else
|
||||
rpmDependencyConflict conflicts = NULL;
|
||||
#endif
|
||||
int numConflicts;
|
||||
if (rpmdepCheck(TS, &conflicts, &numConflicts)) {
|
||||
if (rpmdepCheck(TS, &conflicts, &numConflicts) || conflicts) {
|
||||
_error->Error(_("Transaction set check failed"));
|
||||
if (conflicts) {
|
||||
printDepProblems(stderr, conflicts, numConflicts);
|
||||
|
Loading…
Reference in New Issue
Block a user