summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-05-10 13:28:57 +0200
committerFabian Groffen <grobian@gentoo.org>2019-05-10 13:28:57 +0200
commit0fe1b59b60c4955401b0fca414b592103e5f928f (patch)
tree632645e57f1736d86a72b81a59cad91789b0ee7d
parentapp-portage/portage-utils: disable maintainer mode for live ebuild (diff)
downloadgentoo-0fe1b59b.tar.gz
gentoo-0fe1b59b.tar.bz2
gentoo-0fe1b59b.zip
app-portage/portage-utils: revbump to fix #683432
Bug: https://bugs.gentoo.org/683432 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
-rw-r--r--app-portage/portage-utils/files/portage-utils-0.74-qdepends-Q-regex.patch96
-rw-r--r--app-portage/portage-utils/portage-utils-0.74-r1.ebuild38
2 files changed, 134 insertions, 0 deletions
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
new file mode 100644
index 000000000000..6d10161d704e
--- /dev/null
+++ b/app-portage/portage-utils/files/portage-utils-0.74-qdepends-Q-regex.patch
@@ -0,0 +1,96 @@
+qdepends: restore regex matching capabilities for reverse dependencies
+
+The use of atom matching unintendedly removed the ability to use
+regexes, which broke app-admin/gentoo-perl-helpers. This patch removes
+the atom matching, and reverts to using regex matching always to restore
+behaviour.
+
+Bug: https://bugs.gentoo.org/683430
+
+--- a/qdepends.c
++++ b/qdepends.c
+@@ -483,11 +483,9 @@
+ int ret;
+ regex_t preg;
+ regmatch_t match;
+- depend_atom *aq;
+ depend_atom *as;
+ depend_atom *ac;
+ char firstmatch = 0;
+- char *sslot;
+
+ if (!q_vdb_pkg_eat(pkg_ctx, state->depend_file, &depend, &depend_len))
+ return 0;
+@@ -526,34 +524,17 @@
+ return 1;
+ }
+
+- aq = atom_explode(state->query);
+- if (!aq) {
+- /* "fall" back to old behaviour of just performing an extended
+- * regular expression match */
+- if (wregcomp(&preg, state->query, REG_EXTENDED) != 0) {
+- dep_burn_tree(dep_tree);
+- return 1;
+- }
++ /* fallback for old behaviour of just performing an extended
++ * regular expression match */
++ if (wregcomp(&preg, state->query, REG_EXTENDED) != 0) {
++ dep_burn_tree(dep_tree);
++ return 1;
+ }
+
+ match.rm_eo = 0;
+ firstmatch = 1;
+ do { /* find all matches */
+- if (!aq) {
+- ret = regexec(&preg, ptr + match.rm_eo, 1, &match, 0);
+- } else {
+- char *loc;
+- ret = -1;
+- snprintf(qbuf, sizeof(qbuf), "%s%s%s",
+- aq->CATEGORY ? aq->CATEGORY : "",
+- aq->CATEGORY ? "/" : "",
+- aq->PN);
+- if ((loc = strstr(ptr + match.rm_eo, qbuf)) != NULL) {
+- ret = 0;
+- match.rm_so = loc - ptr;
+- match.rm_eo = match.rm_so + strlen(qbuf);
+- }
+- }
++ ret = regexec(&preg, ptr + match.rm_eo, 1, &match, 0);
+ if (ret != 0)
+ break;
+
+@@ -571,18 +552,6 @@
+ ptr + match.rm_so);
+ ac = atom_explode(qbuf);
+
+- /* drop SLOT when not present in aq so we can match atoms
+- * regardless */
+- sslot = ac->SLOT;
+- if (aq->SLOT == NULL && ac->SLOT != NULL)
+- ac->SLOT = NULL;
+- ret = atom_compare(ac, aq);
+- ac->SLOT = sslot;
+- if (ret != EQUAL) {
+- atom_implode(ac);
+- break;
+- }
+-
+ if (firstmatch == 1) {
+ firstmatch = 0;
+ printf("%s%s/%s%s%s%c", BOLD, catname, BLUE,
+@@ -615,11 +584,7 @@
+ if (verbose && firstmatch == 0)
+ printf("\n");
+
+- if (!aq) {
+- regfree(&preg);
+- } else {
+- atom_implode(aq);
+- }
++ regfree(&preg);
+ atom_implode(as);
+ dep_burn_tree(dep_tree);
+
diff --git a/app-portage/portage-utils/portage-utils-0.74-r1.ebuild b/app-portage/portage-utils/portage-utils-0.74-r1.ebuild
new file mode 100644
index 000000000000..4f2fd4df0749
--- /dev/null
+++ b/app-portage/portage-utils/portage-utils-0.74-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+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/~grobian/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+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"
+IUSE="nls static"
+
+RDEPEND="dev-libs/iniparser:0"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ static? ( dev-libs/iniparser:0[static-libs] )"
+
+PATCHES=( "${FILESDIR}"/${P}-qdepends-Q-regex.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)
+}