1 |
commit: 0fe1b59b60c4955401b0fca414b592103e5f928f |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 10 11:28:57 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 10 11:28:57 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fe1b59b |
7 |
|
8 |
app-portage/portage-utils: revbump to fix #683432 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/683432 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
13 |
|
14 |
.../portage-utils-0.74-qdepends-Q-regex.patch | 96 ++++++++++++++++++++++ |
15 |
.../portage-utils/portage-utils-0.74-r1.ebuild | 38 +++++++++ |
16 |
2 files changed, 134 insertions(+) |
17 |
|
18 |
diff --git a/app-portage/portage-utils/files/portage-utils-0.74-qdepends-Q-regex.patch b/app-portage/portage-utils/files/portage-utils-0.74-qdepends-Q-regex.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..6d10161d704 |
21 |
--- /dev/null |
22 |
+++ b/app-portage/portage-utils/files/portage-utils-0.74-qdepends-Q-regex.patch |
23 |
@@ -0,0 +1,96 @@ |
24 |
+qdepends: restore regex matching capabilities for reverse dependencies |
25 |
+ |
26 |
+The use of atom matching unintendedly removed the ability to use |
27 |
+regexes, which broke app-admin/gentoo-perl-helpers. This patch removes |
28 |
+the atom matching, and reverts to using regex matching always to restore |
29 |
+behaviour. |
30 |
+ |
31 |
+Bug: https://bugs.gentoo.org/683430 |
32 |
+ |
33 |
+--- a/qdepends.c |
34 |
++++ b/qdepends.c |
35 |
+@@ -483,11 +483,9 @@ |
36 |
+ int ret; |
37 |
+ regex_t preg; |
38 |
+ regmatch_t match; |
39 |
+- depend_atom *aq; |
40 |
+ depend_atom *as; |
41 |
+ depend_atom *ac; |
42 |
+ char firstmatch = 0; |
43 |
+- char *sslot; |
44 |
+ |
45 |
+ if (!q_vdb_pkg_eat(pkg_ctx, state->depend_file, &depend, &depend_len)) |
46 |
+ return 0; |
47 |
+@@ -526,34 +524,17 @@ |
48 |
+ return 1; |
49 |
+ } |
50 |
+ |
51 |
+- aq = atom_explode(state->query); |
52 |
+- if (!aq) { |
53 |
+- /* "fall" back to old behaviour of just performing an extended |
54 |
+- * regular expression match */ |
55 |
+- if (wregcomp(&preg, state->query, REG_EXTENDED) != 0) { |
56 |
+- dep_burn_tree(dep_tree); |
57 |
+- return 1; |
58 |
+- } |
59 |
++ /* fallback for old behaviour of just performing an extended |
60 |
++ * regular expression match */ |
61 |
++ if (wregcomp(&preg, state->query, REG_EXTENDED) != 0) { |
62 |
++ dep_burn_tree(dep_tree); |
63 |
++ return 1; |
64 |
+ } |
65 |
+ |
66 |
+ match.rm_eo = 0; |
67 |
+ firstmatch = 1; |
68 |
+ do { /* find all matches */ |
69 |
+- if (!aq) { |
70 |
+- ret = regexec(&preg, ptr + match.rm_eo, 1, &match, 0); |
71 |
+- } else { |
72 |
+- char *loc; |
73 |
+- ret = -1; |
74 |
+- snprintf(qbuf, sizeof(qbuf), "%s%s%s", |
75 |
+- aq->CATEGORY ? aq->CATEGORY : "", |
76 |
+- aq->CATEGORY ? "/" : "", |
77 |
+- aq->PN); |
78 |
+- if ((loc = strstr(ptr + match.rm_eo, qbuf)) != NULL) { |
79 |
+- ret = 0; |
80 |
+- match.rm_so = loc - ptr; |
81 |
+- match.rm_eo = match.rm_so + strlen(qbuf); |
82 |
+- } |
83 |
+- } |
84 |
++ ret = regexec(&preg, ptr + match.rm_eo, 1, &match, 0); |
85 |
+ if (ret != 0) |
86 |
+ break; |
87 |
+ |
88 |
+@@ -571,18 +552,6 @@ |
89 |
+ ptr + match.rm_so); |
90 |
+ ac = atom_explode(qbuf); |
91 |
+ |
92 |
+- /* drop SLOT when not present in aq so we can match atoms |
93 |
+- * regardless */ |
94 |
+- sslot = ac->SLOT; |
95 |
+- if (aq->SLOT == NULL && ac->SLOT != NULL) |
96 |
+- ac->SLOT = NULL; |
97 |
+- ret = atom_compare(ac, aq); |
98 |
+- ac->SLOT = sslot; |
99 |
+- if (ret != EQUAL) { |
100 |
+- atom_implode(ac); |
101 |
+- break; |
102 |
+- } |
103 |
+- |
104 |
+ if (firstmatch == 1) { |
105 |
+ firstmatch = 0; |
106 |
+ printf("%s%s/%s%s%s%c", BOLD, catname, BLUE, |
107 |
+@@ -615,11 +584,7 @@ |
108 |
+ if (verbose && firstmatch == 0) |
109 |
+ printf("\n"); |
110 |
+ |
111 |
+- if (!aq) { |
112 |
+- regfree(&preg); |
113 |
+- } else { |
114 |
+- atom_implode(aq); |
115 |
+- } |
116 |
++ regfree(&preg); |
117 |
+ atom_implode(as); |
118 |
+ dep_burn_tree(dep_tree); |
119 |
+ |
120 |
|
121 |
diff --git a/app-portage/portage-utils/portage-utils-0.74-r1.ebuild b/app-portage/portage-utils/portage-utils-0.74-r1.ebuild |
122 |
new file mode 100644 |
123 |
index 00000000000..4f2fd4df074 |
124 |
--- /dev/null |
125 |
+++ b/app-portage/portage-utils/portage-utils-0.74-r1.ebuild |
126 |
@@ -0,0 +1,38 @@ |
127 |
+# Copyright 1999-2019 Gentoo Authors |
128 |
+# Distributed under the terms of the GNU General Public License v2 |
129 |
+ |
130 |
+EAPI="6" |
131 |
+ |
132 |
+inherit toolchain-funcs |
133 |
+ |
134 |
+DESCRIPTION="Small and fast Portage helper tools written in C" |
135 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" |
136 |
+SRC_URI="mirror://gentoo/${P}.tar.xz |
137 |
+ https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" |
138 |
+ |
139 |
+LICENSE="GPL-2" |
140 |
+SLOT="0" |
141 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
142 |
+IUSE="nls static" |
143 |
+ |
144 |
+RDEPEND="dev-libs/iniparser:0" |
145 |
+DEPEND="${RDEPEND} |
146 |
+ app-arch/xz-utils |
147 |
+ static? ( dev-libs/iniparser:0[static-libs] )" |
148 |
+ |
149 |
+PATCHES=( "${FILESDIR}"/${P}-qdepends-Q-regex.patch ) |
150 |
+ |
151 |
+src_configure() { |
152 |
+ # Avoid slow configure+gnulib+make if on an up-to-date Linux system |
153 |
+ if use prefix || ! use kernel_linux || \ |
154 |
+ has_version '<sys-libs/glibc-2.10' |
155 |
+ then |
156 |
+ econf --with-eprefix="${EPREFIX}" |
157 |
+ else |
158 |
+ tc-export CC |
159 |
+ fi |
160 |
+} |
161 |
+ |
162 |
+src_compile() { |
163 |
+ emake NLS=$(usex nls) STATIC=$(usex static) |
164 |
+} |