When just a package name is passed to opkg install, we need to retrieve
information about this package from the feeds list so stage an abstract
package with the given name and flag it with SF_NEED_DETAIL.
Packages specified as local file paths or direct download URLs do not
need this special treatment as the required details can be extracted
from their embedded control files.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{
int err = 0;
pkg_t *pkg;
+ abstract_pkg_t *ab_pkg;
pkg = pkg_new();
pkg->provided_by_hand = 1;
} else {
+ ab_pkg = ensure_abstract_pkg_by_name(url);
+
+ if (!(ab_pkg->state_flag & SF_NEED_DETAIL)) {
+ opkg_msg(DEBUG, "applying abpkg flag to %s\n", ab_pkg->name);
+ ab_pkg->state_flag |= SF_NEED_DETAIL;
+ }
+
pkg_deinit(pkg);
free(pkg);
return 0;