From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A625C138334 for ; Sat, 28 Sep 2019 13:19:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3AB3E087E; Sat, 28 Sep 2019 13:19:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4E83E087E for ; Sat, 28 Sep 2019 13:19:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AE0C134B691 for ; Sat, 28 Sep 2019 13:19:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 198C87E7 for ; Sat, 28 Sep 2019 13:19:33 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1569676711.ea7f00529fa689a6624f6b26b5d3b7197f4fbfd5.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: /, man/ X-VCS-Repository: proj/portage-utils X-VCS-Files: applets.h man/qpkg.1 qpkg.c X-VCS-Directories: man/ / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: ea7f00529fa689a6624f6b26b5d3b7197f4fbfd5 X-VCS-Branch: master Date: Sat, 28 Sep 2019 13:19:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 192502c9-a798-4dff-8b9f-7eeb4d2cdcb7 X-Archives-Hash: a10b7a63de403e3a0045d0962cd1dfe1 commit: ea7f00529fa689a6624f6b26b5d3b7197f4fbfd5 Author: Fabian Groffen gentoo org> AuthorDate: Sat Sep 28 13:18:31 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Sep 28 13:18:31 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ea7f0052 qpkg: don't emit hypothetical messages when real work has been done drop the "would be" part of how many bytes were freed when we're not pretending Bug: https://bugs.gentoo.org/695586 Signed-off-by: Fabian Groffen gentoo.org> applets.h | 2 +- man/qpkg.1 | 4 ++-- qpkg.c | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/applets.h b/applets.h index 520ff23..364f457 100644 --- a/applets.h +++ b/applets.h @@ -82,7 +82,7 @@ static const struct applet_t { {"qmanifest", qmanifest_main, "", "verify or generate thick Manifest files"}, #endif {"qmerge", qmerge_main, "", "fetch and merge binary package"}, - {"qpkg", qpkg_main, "", "manipulate Gentoo binpkgs"}, + {"qpkg", qpkg_main, "", "create or manipulate Gentoo binpkgs"}, {"qsearch", qsearch_main, "", "search pkgname/desc"}, {"qsize", qsize_main, "", "calculate size usage"}, {"qtbz2", qtbz2_main, "", "manipulate tbz2 packages"}, diff --git a/man/qpkg.1 b/man/qpkg.1 index c471ea1..161a8bb 100644 --- a/man/qpkg.1 +++ b/man/qpkg.1 @@ -1,7 +1,7 @@ .\" generated by mkman.py, please do NOT edit! -.TH qpkg "1" "Jul 2019" "Gentoo Foundation" "qpkg" +.TH qpkg "1" "Sep 2019" "Gentoo Foundation" "qpkg" .SH NAME -qpkg \- manipulate Gentoo binpkgs +qpkg \- create or manipulate Gentoo binpkgs .SH SYNOPSIS .B qpkg \fI[opts] \fR diff --git a/qpkg.c b/qpkg.c index 0ac6e92..947ff84 100644 --- a/qpkg.c +++ b/qpkg.c @@ -171,8 +171,9 @@ qpkg_clean(char *dirp) disp_units = KILOBYTE; if ((num_all_bytes / KILOBYTE) > 1000) disp_units = MEGABYTE; - qprintf(" %s*%s Total space that would be freed in packages " - "directory: %s%s %ciB%s\n", GREEN, NORM, RED, + qprintf(" %s*%s Total space %sfreed in packages " + "directory: %s%s %ciB%s\n", GREEN, NORM, + pretend ? "that would be " : "", RED, make_human_readable_str(num_all_bytes, 1, disp_units), disp_units == MEGABYTE ? 'M' : 'K', NORM); @@ -297,10 +298,11 @@ qpkg_make(depend_atom *atom) xpak_create(AT_FDCWD, tbz2, 1, xpak_argv, 1, verbose); stat(tbz2, &st); + xpaksize = st.st_size - xpaksize; /* save tbz2 tail: OOOOSTOP */ fp = fopen(tbz2, "a"); - WRITE_BE_INT32(buf, st.st_size - xpaksize); + WRITE_BE_INT32(buf, xpaksize); fwrite(buf, 1, 4, fp); fwrite("STOP", 1, 4, fp); fclose(fp);