diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2017-11-26 23:59:42 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-11-26 23:59:46 -0800 |
commit | 111ea5abbac500854cd22c00dd09a9557bf001b0 (patch) | |
tree | 49b9df4d654c5d9d96c4ad1ac918901e2912bab7 /app-portage | |
parent | net-analyzer/wireshark: Fix header install (bug #638866 by Garri), configure ... (diff) | |
download | gentoo-111ea5abbac500854cd22c00dd09a9557bf001b0.tar.gz gentoo-111ea5abbac500854cd22c00dd09a9557bf001b0.tar.bz2 gentoo-111ea5abbac500854cd22c00dd09a9557bf001b0.zip |
app-portage/portage-utils: fix quietness.
Make PORTAGE_QUIET=1 actually be quiet properly.
Thanks to Zac for the suggestion of checking how PORTAGE_QUIET was being
handled.
Thanks: Zac Medico <zmedico@gentoo.org>
Closes: https://bugs.gentoo.org/635828
Package-Manager: Portage-2.3.16, Repoman-2.3.6
Diffstat (limited to 'app-portage')
-rw-r--r-- | app-portage/portage-utils/Manifest | 6 | ||||
-rw-r--r-- | app-portage/portage-utils/files/portage-utils-0.64-fix-quiet.patch | 51 | ||||
-rw-r--r-- | app-portage/portage-utils/portage-utils-0.64-r1.ebuild | 40 |
3 files changed, 94 insertions, 3 deletions
diff --git a/app-portage/portage-utils/Manifest b/app-portage/portage-utils/Manifest index e6d7be883897..be71e22516c1 100644 --- a/app-portage/portage-utils/Manifest +++ b/app-portage/portage-utils/Manifest @@ -1,3 +1,3 @@ -DIST portage-utils-0.62.tar.xz 527216 SHA256 f6ce1938e41ec2073be12568470a7aae51489579add0709c08af5d9be1c0c563 SHA512 71b2888cef1bf7549c3829cc7d4bbe2e99a711434bae4fb78c55b9c37815b61623518f19ab87db30f533d771398933c085640dc7c8ffcedf87a70ac702a52fa1 WHIRLPOOL 105d60d3f778a79972e39d2d8e78aa8b971f085721362e4d594d86006752d97b25d41a1e5a9006f603cda0088da89abb179d8bc129815c1363f30dfb6ff59891 -DIST portage-utils-0.63.tar.xz 529012 SHA256 7a754cccad2d4c3331d348ba9df51bb3b9565866674303152b55248b05130a02 SHA512 2b0bceee63b894e7f517f3c938a1873aa90c41b668abbf6a39125a1bb9ce1059731e34216cc357787b5cbf83a0cf0748530147262673ea0bc26404d6274714eb WHIRLPOOL fdaec19af639c744394063dd57f7e64fb02ff10c4ee5b1ef2f49928df6d47fb5bf732e547264390787e20ca6e3251be3935e9f348f2510aa0fc6779778ca44ba -DIST portage-utils-0.64.tar.xz 533124 SHA256 a53505758d04b2115f636afc9f0c15176a591f3cdb58f684cfd148b29c4783f0 SHA512 e384b88454607aa9123ac3a71d55fb16de475ba59f4ba6efd236594f42140e75650696430138cdb6e1c4e1792db091bbc1db42b1c1102fd579af6514ecefffb7 WHIRLPOOL 19e34782c2f1ed637db73865acc6c07c4162ace55c0b24287bf92c66a9ebea4ca0ab230bb94478aa71bee72280231f75dd5de4eb8fc10248b52ee77cc977392e +DIST portage-utils-0.62.tar.xz 527216 BLAKE2B ac8331b74998ddb86db55a937992447bccf60611cc259ceb5fe79918c1a43b6dc4633e4ad64462e2df5c39e8d8aa193bd57ab24dcd714e088357eb3cb177e972 SHA512 71b2888cef1bf7549c3829cc7d4bbe2e99a711434bae4fb78c55b9c37815b61623518f19ab87db30f533d771398933c085640dc7c8ffcedf87a70ac702a52fa1 +DIST portage-utils-0.63.tar.xz 529012 BLAKE2B 25ecf32a6a64484af5d3c73c2a9482b379ba420260de159b59a17ebd864b0ff49fcaa248db1e7d9a9c9582655ed6d4cb7a3e413212247890167b37c4275d201a SHA512 2b0bceee63b894e7f517f3c938a1873aa90c41b668abbf6a39125a1bb9ce1059731e34216cc357787b5cbf83a0cf0748530147262673ea0bc26404d6274714eb +DIST portage-utils-0.64.tar.xz 533124 BLAKE2B c3e0ecdc2d82af197dabb8434677d4c3bfbbee01c482c496d89d2f7be988ef894e0b3c7cb64337216144644a48ee3213fc1683ae6d75091e471189a4550b8c71 SHA512 e384b88454607aa9123ac3a71d55fb16de475ba59f4ba6efd236594f42140e75650696430138cdb6e1c4e1792db091bbc1db42b1c1102fd579af6514ecefffb7 diff --git a/app-portage/portage-utils/files/portage-utils-0.64-fix-quiet.patch b/app-portage/portage-utils/files/portage-utils-0.64-fix-quiet.patch new file mode 100644 index 000000000000..447fe3aa4138 --- /dev/null +++ b/app-portage/portage-utils/files/portage-utils-0.64-fix-quiet.patch @@ -0,0 +1,51 @@ +commit 237d1b34166fea2e4cb0eb28098a5b2759548b86 +Author: Robin H. Johnson <robbat2@gentoo.org> +Date: Sun Nov 26 23:50:58 2017 -0800 + + Fix PORTAGE_QUIET quiet result. + + Having PORTAGE_QUIET set caused the quiet variable to be incremented, + but it did not also setup the warnout variable. + + Add a common setup function for warnout quiet, and use consistently. + + Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff --git a/main.c b/main.c +index d124695..dea03a8 100644 +--- a/main.c ++++ b/main.c +@@ -78,6 +78,15 @@ no_colors(void) + setenv("NOCOLOR", "true", 1); + } + ++static void ++setup_quiet(void) ++{ ++ /* "e" for FD_CLOEXEC */ ++ if (quiet == 0) ++ warnout = fopen("/dev/null", "we"); ++ ++quiet; ++} ++ + /* include common applet defs */ + #include "applets.h" + +@@ -102,7 +111,7 @@ no_colors(void) + #define COMMON_GETOPTS_CASES(applet) \ + case 0x1: portroot = optarg; break; \ + case 'v': ++verbose; break; \ +- case 'q': if (quiet == 0) { warnout = fopen("/dev/null", "we"); } ++quiet; break; \ ++ case 'q': setup_quiet(); break; \ + case 'V': version_barf(); break; \ + case 'h': applet ## _usage(EXIT_SUCCESS); break; \ + case 'C': no_colors(); break; \ +@@ -952,7 +961,7 @@ initialize_portage_env(void) + xarraypush_str(overlays, main_overlay); + + if (getenv("PORTAGE_QUIET") != NULL) +- quiet = 1; ++ setup_quiet(); + + if (nocolor) + no_colors(); diff --git a/app-portage/portage-utils/portage-utils-0.64-r1.ebuild b/app-portage/portage-utils/portage-utils-0.64-r1.ebuild new file mode 100644 index 000000000000..43a1f4df9846 --- /dev/null +++ b/app-portage/portage-utils/portage-utils-0.64-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit toolchain-funcs epatch + +DESCRIPTION="small and fast portage helper tools written in C" +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls static" + +RDEPEND="dev-libs/iniparser:0" +DEPEND="${RDEPEND} + app-arch/xz-utils + static? ( dev-libs/iniparser:0[static-libs] )" + +PATCHES=( + "${FILESDIR}"/portage-utils-0.64-fix-quiet.patch +) + +src_configure() { + # Avoid slow configure+gnulib+make if on an up-to-date Linux system + if use prefix || ! use kernel_linux || \ + has_version '<sys-libs/glibc-2.10' + then + econf --with-eprefix="${EPREFIX}" + else + tc-export CC + fi +} + +src_compile() { + emake NLS=$(usex nls) STATIC=$(usex static) +} |