Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/portage-utils/files/, app-portage/portage-utils/
Date: Mon, 27 Nov 2017 08:01:06
Message-Id: 1511769586.111ea5abbac500854cd22c00dd09a9557bf001b0.robbat2@gentoo
1 commit: 111ea5abbac500854cd22c00dd09a9557bf001b0
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 27 07:59:42 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 27 07:59:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111ea5ab
7
8 app-portage/portage-utils: fix quietness.
9
10 Make PORTAGE_QUIET=1 actually be quiet properly.
11
12 Thanks to Zac for the suggestion of checking how PORTAGE_QUIET was being
13 handled.
14
15 Thanks: Zac Medico <zmedico <AT> gentoo.org>
16 Closes: https://bugs.gentoo.org/635828
17 Package-Manager: Portage-2.3.16, Repoman-2.3.6
18
19 app-portage/portage-utils/Manifest | 6 +--
20 .../files/portage-utils-0.64-fix-quiet.patch | 51 ++++++++++++++++++++++
21 .../portage-utils/portage-utils-0.64-r1.ebuild | 40 +++++++++++++++++
22 3 files changed, 94 insertions(+), 3 deletions(-)
23
24 diff --git a/app-portage/portage-utils/Manifest b/app-portage/portage-utils/Manifest
25 index e6d7be88389..be71e22516c 100644
26 --- a/app-portage/portage-utils/Manifest
27 +++ b/app-portage/portage-utils/Manifest
28 @@ -1,3 +1,3 @@
29 -DIST portage-utils-0.62.tar.xz 527216 SHA256 f6ce1938e41ec2073be12568470a7aae51489579add0709c08af5d9be1c0c563 SHA512 71b2888cef1bf7549c3829cc7d4bbe2e99a711434bae4fb78c55b9c37815b61623518f19ab87db30f533d771398933c085640dc7c8ffcedf87a70ac702a52fa1 WHIRLPOOL 105d60d3f778a79972e39d2d8e78aa8b971f085721362e4d594d86006752d97b25d41a1e5a9006f603cda0088da89abb179d8bc129815c1363f30dfb6ff59891
30 -DIST portage-utils-0.63.tar.xz 529012 SHA256 7a754cccad2d4c3331d348ba9df51bb3b9565866674303152b55248b05130a02 SHA512 2b0bceee63b894e7f517f3c938a1873aa90c41b668abbf6a39125a1bb9ce1059731e34216cc357787b5cbf83a0cf0748530147262673ea0bc26404d6274714eb WHIRLPOOL fdaec19af639c744394063dd57f7e64fb02ff10c4ee5b1ef2f49928df6d47fb5bf732e547264390787e20ca6e3251be3935e9f348f2510aa0fc6779778ca44ba
31 -DIST portage-utils-0.64.tar.xz 533124 SHA256 a53505758d04b2115f636afc9f0c15176a591f3cdb58f684cfd148b29c4783f0 SHA512 e384b88454607aa9123ac3a71d55fb16de475ba59f4ba6efd236594f42140e75650696430138cdb6e1c4e1792db091bbc1db42b1c1102fd579af6514ecefffb7 WHIRLPOOL 19e34782c2f1ed637db73865acc6c07c4162ace55c0b24287bf92c66a9ebea4ca0ab230bb94478aa71bee72280231f75dd5de4eb8fc10248b52ee77cc977392e
32 +DIST portage-utils-0.62.tar.xz 527216 BLAKE2B ac8331b74998ddb86db55a937992447bccf60611cc259ceb5fe79918c1a43b6dc4633e4ad64462e2df5c39e8d8aa193bd57ab24dcd714e088357eb3cb177e972 SHA512 71b2888cef1bf7549c3829cc7d4bbe2e99a711434bae4fb78c55b9c37815b61623518f19ab87db30f533d771398933c085640dc7c8ffcedf87a70ac702a52fa1
33 +DIST portage-utils-0.63.tar.xz 529012 BLAKE2B 25ecf32a6a64484af5d3c73c2a9482b379ba420260de159b59a17ebd864b0ff49fcaa248db1e7d9a9c9582655ed6d4cb7a3e413212247890167b37c4275d201a SHA512 2b0bceee63b894e7f517f3c938a1873aa90c41b668abbf6a39125a1bb9ce1059731e34216cc357787b5cbf83a0cf0748530147262673ea0bc26404d6274714eb
34 +DIST portage-utils-0.64.tar.xz 533124 BLAKE2B c3e0ecdc2d82af197dabb8434677d4c3bfbbee01c482c496d89d2f7be988ef894e0b3c7cb64337216144644a48ee3213fc1683ae6d75091e471189a4550b8c71 SHA512 e384b88454607aa9123ac3a71d55fb16de475ba59f4ba6efd236594f42140e75650696430138cdb6e1c4e1792db091bbc1db42b1c1102fd579af6514ecefffb7
35
36 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
37 new file mode 100644
38 index 00000000000..447fe3aa413
39 --- /dev/null
40 +++ b/app-portage/portage-utils/files/portage-utils-0.64-fix-quiet.patch
41 @@ -0,0 +1,51 @@
42 +commit 237d1b34166fea2e4cb0eb28098a5b2759548b86
43 +Author: Robin H. Johnson <robbat2@g.o>
44 +Date: Sun Nov 26 23:50:58 2017 -0800
45 +
46 + Fix PORTAGE_QUIET quiet result.
47 +
48 + Having PORTAGE_QUIET set caused the quiet variable to be incremented,
49 + but it did not also setup the warnout variable.
50 +
51 + Add a common setup function for warnout quiet, and use consistently.
52 +
53 + Signed-off-by: Robin H. Johnson <robbat2@g.o>
54 +
55 +diff --git a/main.c b/main.c
56 +index d124695..dea03a8 100644
57 +--- a/main.c
58 ++++ b/main.c
59 +@@ -78,6 +78,15 @@ no_colors(void)
60 + setenv("NOCOLOR", "true", 1);
61 + }
62 +
63 ++static void
64 ++setup_quiet(void)
65 ++{
66 ++ /* "e" for FD_CLOEXEC */
67 ++ if (quiet == 0)
68 ++ warnout = fopen("/dev/null", "we");
69 ++ ++quiet;
70 ++}
71 ++
72 + /* include common applet defs */
73 + #include "applets.h"
74 +
75 +@@ -102,7 +111,7 @@ no_colors(void)
76 + #define COMMON_GETOPTS_CASES(applet) \
77 + case 0x1: portroot = optarg; break; \
78 + case 'v': ++verbose; break; \
79 +- case 'q': if (quiet == 0) { warnout = fopen("/dev/null", "we"); } ++quiet; break; \
80 ++ case 'q': setup_quiet(); break; \
81 + case 'V': version_barf(); break; \
82 + case 'h': applet ## _usage(EXIT_SUCCESS); break; \
83 + case 'C': no_colors(); break; \
84 +@@ -952,7 +961,7 @@ initialize_portage_env(void)
85 + xarraypush_str(overlays, main_overlay);
86 +
87 + if (getenv("PORTAGE_QUIET") != NULL)
88 +- quiet = 1;
89 ++ setup_quiet();
90 +
91 + if (nocolor)
92 + no_colors();
93
94 diff --git a/app-portage/portage-utils/portage-utils-0.64-r1.ebuild b/app-portage/portage-utils/portage-utils-0.64-r1.ebuild
95 new file mode 100644
96 index 00000000000..43a1f4df984
97 --- /dev/null
98 +++ b/app-portage/portage-utils/portage-utils-0.64-r1.ebuild
99 @@ -0,0 +1,40 @@
100 +# Copyright 1999-2017 Gentoo Foundation
101 +# Distributed under the terms of the GNU General Public License v2
102 +
103 +EAPI="6"
104 +
105 +inherit toolchain-funcs epatch
106 +
107 +DESCRIPTION="small and fast portage helper tools written in C"
108 +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
109 +SRC_URI="mirror://gentoo/${P}.tar.xz
110 + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
111 +
112 +LICENSE="GPL-2"
113 +SLOT="0"
114 +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"
115 +IUSE="nls static"
116 +
117 +RDEPEND="dev-libs/iniparser:0"
118 +DEPEND="${RDEPEND}
119 + app-arch/xz-utils
120 + static? ( dev-libs/iniparser:0[static-libs] )"
121 +
122 +PATCHES=(
123 + "${FILESDIR}"/portage-utils-0.64-fix-quiet.patch
124 +)
125 +
126 +src_configure() {
127 + # Avoid slow configure+gnulib+make if on an up-to-date Linux system
128 + if use prefix || ! use kernel_linux || \
129 + has_version '<sys-libs/glibc-2.10'
130 + then
131 + econf --with-eprefix="${EPREFIX}"
132 + else
133 + tc-export CC
134 + fi
135 +}
136 +
137 +src_compile() {
138 + emake NLS=$(usex nls) STATIC=$(usex static)
139 +}