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

@ -100,20 +100,9 @@ xbps_check_pkg_file_hash(prop_dictionary_t pkgd, const char *repoloc)
if (binfile == NULL)
return EINVAL;
printf("Checking SHA256 for %s ... ", filename);
(void)fflush(stdout);
rv = xbps_check_file_hash(binfile, sha256);
if (rv != 0 && rv != ERANGE)
printf("failed (%s)\n", strerror(rv));
else if (rv == ERANGE)
printf("failed! aborting installation.\n");
else if (rv == 0)
printf("ok.\n");
(void)fflush(stdout);
free(binfile);
return rv;
}