Fix xbps_prepare_pkg() in pkgs without deps.

--HG--
extra : convert_revision : 9be76ef482e54bfbd7e6a038a504f8225aa89cfe
This commit is contained in:
Juan RP 2009-04-10 01:36:22 +02:00
parent ad0bdbc375
commit 01be3b5920

View file

@ -208,6 +208,20 @@ xbps_prepare_pkg(const char *pkgname)
*/
if ((rv = xbps_sort_pkg_deps(pkg_props)) != 0)
goto out;
} else {
/*
* Package has no deps, so we have to create the
* "packages" array.
*/
pkgs_array = prop_array_create();
if (pkgs_array == NULL) {
rv = errno;
goto out;
}
if (!prop_dictionary_set(pkg_props, "packages", pkgs_array)) {
rv = errno;
goto out;
}
}
/*