pkg_depends: propagate virtual provided detail flag to providers
authorJo-Philipp Wich <jo@mein.io>
Mon, 27 Feb 2017 18:24:31 +0000 (19:24 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 27 Feb 2017 19:15:27 +0000 (20:15 +0100)
When the provided abstract package (e.g. "px5g" provided by "px5g-mbedtls") is
marked as requiring details, then mark the provider abstract package as well.

This ensures that package info for discrete provider packages is acquired and
retained if the virtual package they provide is being depended upon by another
package requiring details.

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

index 0883b4f8c4509a22ceb62209ac06f07d6e8df883..aa349873e35c310b961a2599e10782e170de7fc1 100644 (file)
@@ -678,6 +678,14 @@ void parse_providelist(pkg_t *pkg, char *list)
 
                provided_abpkg = ensure_abstract_pkg_by_name(item);
 
+               if (provided_abpkg->state_flag & SF_NEED_DETAIL) {
+                       if (!(ab_pkg->state_flag & SF_NEED_DETAIL)) {
+                               opkg_msg(DEBUG, "propagating provided abpkg flag to "
+                                               "provider abpkg %s\n", ab_pkg->name);
+                               ab_pkg->state_flag |= SF_NEED_DETAIL;
+                       }
+               }
+
                if (!abstract_pkg_vec_contains(provided_abpkg->provided_by, ab_pkg))
                        abstract_pkg_vec_insert(provided_abpkg->provided_by, ab_pkg);