Remove knowledge from the library to install packages.

The library is only responsible now to find all binary packages
from repositories, sort them and create a dictionary with all
details. The frontend (xbps-bin) provides support for this,
and this allows for more flexibility and removes some stuff
that didn't belong in the library.

While here implemented support to show total download/installed
size for all packages that are going to be installed.

Next step will be to implement user interactivity before
installing/removing/updating packages.

--HG--
extra : convert_revision : 858e9a89bc6a60b348435f2416a8af3ebb6ea5c9
This commit is contained in:
Juan RP 2009-04-09 02:29:15 +02:00
parent acd07f61e3
commit f80e1753a8
13 changed files with 580 additions and 482 deletions

View file

@ -79,7 +79,7 @@ xbps_sort_pkg_deps(prop_dictionary_t chaindeps)
*/
unsorted = prop_dictionary_get(chaindeps, "unsorted_deps");
if (prop_array_count(unsorted) == 0) {
prop_object_release(sorted);
prop_dictionary_set(chaindeps, "packages", sorted);
return 0;
}
@ -185,7 +185,7 @@ again:
goto out;
}
if (!prop_dictionary_set(chaindeps, "required_deps", sorted))
if (!prop_dictionary_set(chaindeps, "packages", sorted))
rv = EINVAL;
out:
/*