pkg: forward "provided_by_hand" flag in pkg_merge()
authorJo-Philipp Wich <jo@mein.io>
Tue, 28 Feb 2017 23:08:40 +0000 (00:08 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 28 Feb 2017 23:16:28 +0000 (00:16 +0100)
Due to the fact that we now load status files after preparing the abstract
structures describing the cli specified packages, we need to ensure that the
"provided_by_hand" flag is properly conveyed in pkg_merge(), otherwise the
cli provided package archive might get ignored in favor to a newer version
from feeds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/pkg.c

index 114cf05..5370cf9 100644 (file)
@@ -481,6 +481,9 @@ int pkg_merge(pkg_t * oldpkg, pkg_t * newpkg)
        if (!oldpkg->essential)
                oldpkg->essential = newpkg->essential;
 
+       if (!oldpkg->provided_by_hand)
+               oldpkg->provided_by_hand = newpkg->provided_by_hand;
+
        return 0;
 }