Fixed a bug causing alternate repositories packages to be skipped when name follows last package in main repositories (e.g. zzuf)
This commit is contained in:
parent
e4d8771c25
commit
54798cd06a
@ -821,10 +821,9 @@ addToHeaderList(struct configTag *ct,
|
|||||||
currname[0] = '\0';
|
currname[0] = '\0';
|
||||||
}
|
}
|
||||||
for (i = 0; i < ALT_REPS_MAX; i++) {
|
for (i = 0; i < ALT_REPS_MAX; i++) {
|
||||||
/* scan alternate repositories to find better matches */
|
/* scan alternate repositories to find any packge which comes first according to name sorting */
|
||||||
// printf("currname:%s alt:%s\n",currname,altscanpath[i]);
|
|
||||||
if (altscanpath[i] && (altcnt[i] < altn[i]) &&
|
if (altscanpath[i] && (altcnt[i] < altn[i]) &&
|
||||||
(rpmnamecmp(currname, altnamelist[i][altcnt[i]]->d_name,0) >= 0)) {
|
((rpmnamecmp(currname, altnamelist[i][altcnt[i]]->d_name,0) >= 0) || (currname[0] == '\0'))) {
|
||||||
strncpy(currname, altnamelist[i][altcnt[i]]->d_name,bufsize);
|
strncpy(currname, altnamelist[i][altcnt[i]]->d_name,bufsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user