Commit 4fde5f10 authored by Timo Teräs's avatar Timo Teräs
Browse files

state: show changed packages as upgrades

If version is equal, but package contents are different we should
show the package being upgraded.
parent 4a21764e
......@@ -689,10 +689,18 @@ static int cmp_downgrade(struct apk_change *change)
static int cmp_upgrade(struct apk_change *change)
int t;
if (change->newpkg == NULL || change->oldpkg == NULL)
return 0;
if (apk_pkg_version_compare(change->newpkg, change->oldpkg)
t = apk_pkg_version_compare(change->newpkg, change->oldpkg);
return 1;
/* Count swapping package as upgrade too - this can happen if
* same package version is used after it was rebuilt against
* newer libraries. Basically, different (and probably newer)
* package, but equal version number. */
if ((t & APK_VERSION_EQUAL) && (change->newpkg != change->oldpkg))
return 1;
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment