diff --git a/NEWS b/NEWS index 1119bdc6..f1a7d82b 100644 --- a/NEWS +++ b/NEWS @@ -70,9 +70,8 @@ xbps-0.8.0 (???): * Merged the `progress_callback' branch that makes possible to specify a function callback to update progress while unpacking binary packages - and while fetching files. xbps-bin(8) now reports a percentage while - unpacking package files if -v not set, otherwise it will list the - current extracted file with its size in bytes. + and while fetching files. xbps-bin(8) now lists current extract files + with its size in bytes if -v flag is set. * Improved package dependency resolution in repositories by using a new function, xbps_repository_pool_find_pkg() that returns a package dictionary diff --git a/bin/xbps-bin/install.c b/bin/xbps-bin/install.c index 0132bd0c..17c5e53e 100644 --- a/bin/xbps-bin/install.c +++ b/bin/xbps-bin/install.c @@ -526,14 +526,12 @@ exec_transaction(struct transaction *trans) /* * Unpack binary package. */ - printf("Unpacking `%s' (from ../%s) ... ", pkgver, filen); + printf("Unpacking `%s' (from ../%s) ...\n", pkgver, filen); if ((rv = xbps_unpack_binary_pkg(obj)) != 0) { xbps_error_printf("xbps-bin: error unpacking %s " "(%s)\n", pkgver, strerror(rv)); return rv; } - if ((xhp->flags & XBPS_FLAG_VERBOSE) == 0) - printf("\n"); /* * Register binary package. */ diff --git a/bin/xbps-bin/main.c b/bin/xbps-bin/main.c index d92f5d93..66bcdb82 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -164,24 +164,6 @@ unpack_progress_cb_verbose(void *data) xpd->entry_size); } -static void -unpack_progress_cb_percentage(void *data) -{ - struct xbps_unpack_progress_data *xpd = data; - double percent = 0; - - if (xpd->entry_is_metadata) - return; - - percent = - (double)((xpd->entry_extract_count * 100.0) / xpd->entry_total_count); - if (percent > 100.0 || - xpd->entry_extract_count >= xpd->entry_total_count) - percent = 100.0; - - printf("\033[s(%3.2f%%)\033[u", percent); -} - int main(int argc, char **argv) { @@ -266,8 +248,6 @@ main(int argc, char **argv) xh.xfpd = &xfpd; if (flags & XBPS_FLAG_VERBOSE) xh.xbps_unpack_cb = unpack_progress_cb_verbose; - else - xh.xbps_unpack_cb = unpack_progress_cb_percentage; xh.xupd = &xupd; xh.rootdir = rootdir; xh.cachedir = cachedir;