Improve informative messages when installing binpkgs.

This now looks like:

$ xbps-bin -r /raid/random/xbps/test install initramfs-tools
Installing dependency xbps-base-dirs: found xbps-base-dirs-0.2 ... done.
Installing dependency glibc: found glibc-2.9 ... done.
Installing dependency e2fsprogs: found e2fsprogs-1.41.3 ... done.
Installing dependency zlib: found zlib-1.2.3 ... done.
Installing dependency gawk: found gawk-3.1.6 ... done.
Installing dependency findutils: found findutils-4.4.0 ... done.
Installing dependency sed: found sed-4.1.5 ... done.
Installing dependency grep: found grep-2.5.3 ... done.
Installing dependency gzip: found gzip-1.3.12 ... done.
Installing dependency cpio: found cpio-2.9 ... done.
...
...
Installing initramfs-tools-0.92o ... done.
Package initramfs-tools installed successfully.
$

--HG--
extra : convert_revision : 79df585206c9ddc7f1267bc89bfd431ab572e527
This commit is contained in:
Juan RP 2009-02-16 22:48:18 +01:00
parent 82a9667049
commit 91291d5aec
2 changed files with 13 additions and 19 deletions

View file

@ -57,8 +57,14 @@ xbps_install_binary_pkg_fini(prop_dictionary_t repo, prop_dictionary_t pkg,
assert(version != NULL);
assert(desc != NULL);
if (repo == false)
if (repo == false) {
automatic = true;
printf("Installing dependency %s: found %s-%s ... ",
pkgname, pkgname, version);
} else {
printf("Installing %s-%s ... ", pkgname, version);
}
(void)fflush(stdout);
rv = xbps_unpack_binary_pkg(repo, pkg, destdir, NULL);
if (rv == 0) {
@ -67,6 +73,11 @@ xbps_install_binary_pkg_fini(prop_dictionary_t repo, prop_dictionary_t pkg,
rv = 0;
}
if (rv == 0)
printf("done.\n");
else
printf("failed!\n");
return rv;
}