Skip to content

Commit

Permalink
Only consider a refresh if PKGPATH matches.
Browse files Browse the repository at this point in the history
Fixes an issue where "pkgin upgrade" considered nodejs-8 a refresh of
nodejs-6 when calculating it as a dependency of yarn, whereas "pkgin
full-upgrade" did not.
  • Loading branch information
Jonathan Perkin committed Jun 18, 2018
1 parent 0459d10 commit 6b502bc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions impact.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,14 @@ deps_impact(Plisthead *impacthead, Pkglist *pdp)
*/
if (pkg_match(pdp->depend, plist->full) == 0)
toupgrade = TOUPGRADE;
else if (!pkgstr_identical(plist->build_date,
mapplist->build_date))
/*
* Only consider a package for refresh if it has an
* identical PKGPATH.
*/
else if (pkgstr_identical(plist->pkgpath,
mapplist->pkgpath) &&
!pkgstr_identical(plist->build_date,
mapplist->build_date))
toupgrade = TOREFRESH;

/*
Expand Down

0 comments on commit 6b502bc

Please sign in to comment.