New configuration scheme changes, round 2 (virtual pkgs).

- XBPS now expects to read individual virtual pkg settings from
  .plist files in PREFIX/etc/xbps/virtualpkg.d.wants.

This really implements the missing part in issue #12 in
googlecode: http://code.google.com/p/xbps/issues/detail?id=12
This commit is contained in:
Juan RP
2011-10-17 14:24:30 +02:00
parent 5642ffa86e
commit 08f7169eff
7 changed files with 127 additions and 6 deletions

View File

@@ -127,11 +127,10 @@ find_virtualpkg_user_in_conf(const char *vpkg, bool bypattern)
char *vpkgname = NULL;
xhp = xbps_handle_get();
if (xhp->virtualpkg_dictionary == NULL)
if (prop_object_type(xhp->virtualpkgs_array) != PROP_TYPE_ARRAY)
return NULL;
if ((iter = xbps_array_iter_from_dict(xhp->virtualpkg_dictionary,
"virtual-packages")) == NULL)
if ((iter = prop_array_iterator(xhp->virtualpkgs_array)) == NULL)
return NULL;
while ((obj = prop_object_iterator_next(iter)) != NULL) {