Skip to content

Commit

Permalink
better handling for packages having their PKG_PATH set to NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
iMilnb committed Dec 28, 2014
1 parent 0998446 commit 338d0dd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,14 @@ narrow_match(Pkglist *opkg)
/* not the same pkgname, next */
if (safe_strcmp(opkg->name, pkglist->name) != 0)
continue;
/*
* if PKGPATH does not match, do not try to update
* (mysql 5.1/5.5)
*/
if (safe_strcmp(opkg->pkgpath, pkglist->pkgpath) != 0)
continue;
/* some bad packages have their PKG_PATH set to NULL */
if (opkg->pkgpath != NULL && pkglist->pkgpath != NULL)
/*
* if PKGPATH does not match, do not try to update
* (mysql 5.1/5.5)
*/
if (strcmp(opkg->pkgpath, pkglist->pkgpath) != 0)
continue;

/* same package version, next */
if (safe_strcmp(opkg->full, pkglist->full) == 0)
Expand All @@ -736,7 +738,7 @@ static char **
record_upgrades(Plisthead *plisthead)
{
Pkglist *pkglist;
int count = 0;
int count = 0;
char **pkgargs;

SLIST_FOREACH(pkglist, plisthead, next)
Expand Down

0 comments on commit 338d0dd

Please sign in to comment.