diff options
author | Stefan Cristian B. <steven.darklight@gmail.com> | 2014-12-10 08:16:03 +0200 |
---|---|---|
committer | Stefan Cristian B. <steven.darklight@gmail.com> | 2014-12-10 08:16:03 +0200 |
commit | b7b015f12552c64a0b1eedc038fd94451b03ebcf (patch) | |
tree | bbfcee929a909f70056c8efab21ee31a33c0a9cd | |
parent | a7804ec8db338ef607e9b9eb70e188ee96400f33 (diff) | |
parent | 8559bdd9dfa6174faccd666efea74d081ea393ca (diff) |
Merge pull request #19 from V3n3RiX/master
fix gentoolkit multiple portageq envvar portdir is deprecated warnings
8 files changed, 250 insertions, 0 deletions
diff --git a/app-portage/gentoolkit/Manifest b/app-portage/gentoolkit/Manifest new file mode 100644 index 00000000..7ab11268 --- /dev/null +++ b/app-portage/gentoolkit/Manifest @@ -0,0 +1 @@ +DIST gentoolkit-0.3.0.9.tar.gz 3194703 SHA256 c660d150dfccbaea6f291fb7fc2659c8e0e38eaebe6e68f92dee728c8c7e320d SHA512 75b2d15b2b9ed08055840b56b239ed5d63838a10e8d31ec3ed8822cf1d3ef32841609763433736e17f93a5fdd293ccbda4a3dfa0f007241321aec3333bcde847 WHIRLPOOL 5e9dc038c161361eb2dd8f0cd17e8efaa41183a281d6fcf620c1631c6da661673d085c60572424cd48504222c29613473591f8dd276792ab96ba3cfda88f1fe1 diff --git a/app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch b/app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch new file mode 100644 index 00000000..3fc67d36 --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch @@ -0,0 +1,37 @@ +From 9a33ceffe2e0045bf75b1209a90e9a53530d4e0d Mon Sep 17 00:00:00 2001 +From: Tobias Heinlein <keytoaster@gentoo.org> +Date: Sat, 19 Apr 2014 18:39:03 +0200 +Subject: [PATCH 01/14] equery: Don't always print the license field (bug + #508114). + +--- + pym/gentoolkit/equery/meta.py | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py +index e2d2124..d3342cd 100644 +--- a/pym/gentoolkit/equery/meta.py ++++ b/pym/gentoolkit/equery/meta.py +@@ -373,12 +373,13 @@ def call_format_functions(best_match, matches): + useflags = format_useflags(best_match.metadata.use()) + print_sequence(format_list(useflags)) + +- _license = best_match.environment(["LICENSE"]) +- if QUERY_OPTS["license"]: +- _license = format_list(_license) +- else: +- _license = format_list(_license, "License: ", " " * 13) +- print_sequence(_license) ++ if QUERY_OPTS["license"] or not got_opts: ++ _license = best_match.environment(["LICENSE"]) ++ if QUERY_OPTS["license"]: ++ _license = format_list(_license) ++ else: ++ _license = format_list(_license, "License: ", " " * 13) ++ print_sequence(_license) + + if QUERY_OPTS["stablereq"]: + # Get {<Package 'dev-libs/glib-2.20.5'>: [u'ia64', u'm68k', ...], ...} +-- +2.1.3 + diff --git a/app-portage/gentoolkit/files/0.3.0.9-equery-strip-XXXFLAGS.patch b/app-portage/gentoolkit/files/0.3.0.9-equery-strip-XXXFLAGS.patch new file mode 100644 index 00000000..42c5e35e --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0.9-equery-strip-XXXFLAGS.patch @@ -0,0 +1,27 @@ +From 1351a6b8f09ab2f4a7469d6e2be874b56a31d3c4 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec <dolsen@gentoo.org> +Date: Thu, 28 Aug 2014 20:56:22 -0700 +Subject: [PATCH 03/14] equery has: Add CFLAGS, CXXFLAGS, LDFLAGS to strip the + leading '-' + +Strip the leading '-' from values found in these files. +--- + pym/gentoolkit/equery/has.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pym/gentoolkit/equery/has.py b/pym/gentoolkit/equery/has.py +index 15c60b9..180f7f0 100644 +--- a/pym/gentoolkit/equery/has.py ++++ b/pym/gentoolkit/equery/has.py +@@ -74,7 +74,7 @@ def query_in_env(query, env_var, pkg): + """Check if the query is in the pkg's environment.""" + + try: +- if env_var in ("USE", "IUSE"): ++ if env_var in ("USE", "IUSE", "CFLAGS", "CXXFLAGS", "LDFLAGS"): + results = set( + [x.lstrip("+-") for x in pkg.environment(env_var).split()] + ) +-- +2.1.3 + diff --git a/app-portage/gentoolkit/files/0.3.0.9-fix-multiple-portageq-envvar-portdir-is-deprecated-warnings.patch b/app-portage/gentoolkit/files/0.3.0.9-fix-multiple-portageq-envvar-portdir-is-deprecated-warnings.patch new file mode 100644 index 00000000..892b378f --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0.9-fix-multiple-portageq-envvar-portdir-is-deprecated-warnings.patch @@ -0,0 +1,12 @@ +diff -Nur a/bin/euse b/bin/euse +--- a/bin/euse 2014-02-11 20:53:30.000000000 +0200 ++++ b/bin/euse 2014-12-10 07:53:36.876716157 +0200 +@@ -720,7 +720,7 @@ + # Use a subshell so we don't have to protect the variables in + # the current scope + ( +- eval $(portageq envvar -v PORTDIR) ++ : ${PORTDIR="$(portageq get_repo_path $(portageq envvar EROOT) gentoo)"} + echo "${PORTDIR}" + ) + } # }}} diff --git a/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-526400.patch b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-526400.patch new file mode 100644 index 00000000..a9f45b6d --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-526400.patch @@ -0,0 +1,26 @@ +From 91023ef967c680db9307b5c58762e8872346167e Mon Sep 17 00:00:00 2001 +From: Paul Varner <fuzzyray@gentoo.org> +Date: Fri, 24 Oct 2014 12:59:59 -0500 +Subject: [PATCH 06/14] Fix gawk warning escape sequence \. treated as plain. + Bug 526400 + +--- + bin/revdep-rebuild.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/revdep-rebuild.sh b/bin/revdep-rebuild.sh +index 3179a83..01a0454 100755 +--- a/bin/revdep-rebuild.sh ++++ b/bin/revdep-rebuild.sh +@@ -842,7 +842,7 @@ main_checks() { + done < <( + # Regexify LD_LIBRARY_MASK. Exclude it from the search. + LD_LIBRARY_MASK="${LD_LIBRARY_MASK//$'\n'/|}" +- gawk -v ldmask="(${LD_LIBRARY_MASK//./\\\.})" ' ++ gawk -v ldmask="(${LD_LIBRARY_MASK//./\\\\.})" ' + /no version information available/ && $0 !~ ldmask { + gsub(/[()]/, "", $NF) + if (seen[$NF]++) next +-- +2.1.3 + diff --git a/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-1.patch b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-1.patch new file mode 100644 index 00000000..3af64a2a --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-1.patch @@ -0,0 +1,26 @@ +From c5baf551987e2fb412caa396ae34f7f4341ad819 Mon Sep 17 00:00:00 2001 +From: slis <lis.slawek@gmail.com> +Date: Mon, 17 Mar 2014 07:42:01 +0100 +Subject: [PATCH 1/2] Fix #504654 - problem with encoding for non-ascii + filenames + +--- + pym/gentoolkit/revdep_rebuild/stuff.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py +index cc3da7b..7a8373d 100644 +--- a/pym/gentoolkit/revdep_rebuild/stuff.py ++++ b/pym/gentoolkit/revdep_rebuild/stuff.py +@@ -22,7 +22,7 @@ def call_program(args): + subp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = subp.communicate() + stdout = stdout.decode('utf-8') +- return str(stdout) ++ return stdout + + + def scan(params, files, max_args, logger): +-- +1.9.1 + diff --git a/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-2.patch b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-2.patch new file mode 100644 index 00000000..ca3894db --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0.9-revdep-rebuild-py-504654-2.patch @@ -0,0 +1,30 @@ +From ae20dbd7f2ef2810d3150e870ece6f5b7278f676 Mon Sep 17 00:00:00 2001 +From: slis <lis.slawek@gmail.com> +Date: Mon, 17 Mar 2014 07:48:19 +0100 +Subject: [PATCH 2/2] Fix for non-existing libraries version + (https://bugs.gentoo.org/show_bug.cgi?id=504654#c5) + +--- + pym/gentoolkit/revdep_rebuild/analyse.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py +index d7b210b..bd1b6b7 100644 +--- a/pym/gentoolkit/revdep_rebuild/analyse.py ++++ b/pym/gentoolkit/revdep_rebuild/analyse.py +@@ -185,7 +185,11 @@ class LibCheck(object): + scanned_files = self.scanned_files + found_libs = {} + for bits in self.searchbits: +- scanned = scanned_files[bits] ++ try: ++ scanned = scanned_files[bits] ++ except KeyError: ++ self.logger.debug('There are no %s-bit libraries'%bits) ++ continue + self.logger.debug(self.smsg % bits) + self.setlibs(sorted(scanned), bits) + for soname, filepaths in scanned.items(): +-- +1.9.1 + diff --git a/app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild b/app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild new file mode 100644 index 00000000..3ead12a9 --- /dev/null +++ b/app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit/gentoolkit-0.3.0.9-r2.ebuild,v 1.4 2014/12/09 08:14:12 jer Exp $ + +EAPI="5" + +PYTHON_COMPAT=(python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0) +PYTHON_REQ_USE="xml(+)" + +inherit distutils-r1 + +DESCRIPTION="Collection of administration scripts for Gentoo" +HOMEPAGE="http://www.gentoo.org/proj/en/portage/tools/index.xml" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +DEPEND="sys-apps/portage[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + !<=app-portage/gentoolkit-dev-0.2.7 + || ( >=sys-apps/coreutils-8.15 app-misc/realpath sys-freebsd/freebsd-bin ) + sys-apps/gawk + !prefix? ( sys-apps/gentoo-functions ) + sys-apps/grep" + +PATCHES=( + "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-1.patch + "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-2.patch + "${FILESDIR}"/${PV}-equery-508114.patch + "${FILESDIR}"/${PV}-equery-strip-XXXFLAGS.patch + "${FILESDIR}"/${PV}-revdep-rebuild-526400.patch + "${FILESDIR}"/${PV}-fix-multiple-portageq-envvar-portdir-is-deprecated-warnings.patch +) + +python_prepare_all() { + python_export_best + echo VERSION="${PVR}" "${PYTHON}" setup.py set_version + VERSION="${PVR}" "${PYTHON}" setup.py set_version + mv ./bin/revdep-rebuild{,.py} || die + distutils-r1_python_prepare_all +} + +python_install_all() { + distutils-r1_python_install_all + + # Rename the python versions of revdep-rebuild, since we are not ready + # to switch to the python version yet. Link /usr/bin/revdep-rebuild to + # revdep-rebuild.sh. Leaving the python version available for potential + # testing by a wider audience. + dosym revdep-rebuild.sh /usr/bin/revdep-rebuild + + # TODO: Fix this as it is now a QA violation + # Create cache directory for revdep-rebuild + keepdir /var/cache/revdep-rebuild + use prefix || fowners root:0 /var/cache/revdep-rebuild + fperms 0700 /var/cache/revdep-rebuild + + # remove on Gentoo Prefix platforms where it's broken anyway + if use prefix; then + elog "The revdep-rebuild command is removed, the preserve-libs" + elog "feature of portage will handle issues." + rm "${ED}"/usr/bin/revdep-rebuild* + rm "${ED}"/usr/share/man/man1/revdep-rebuild.1 + rm -rf "${ED}"/etc/revdep-rebuild + rm -rf "${ED}"/var + fi +} + +pkg_postinst() { + # Only show the elog information on a new install + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog + elog "For further information on gentoolkit, please read the gentoolkit" + elog "guide: http://www.gentoo.org/doc/en/gentoolkit.xml" + elog + elog "Another alternative to equery is app-portage/portage-utils" + elog + elog "Additional tools that may be of interest:" + elog + elog " app-admin/eclean-kernel" + elog " app-portage/diffmask" + elog " app-portage/flaggie" + elog " app-portage/install-mask" + elog " app-portage/portpeek" + elog " app-portage/smart-live-rebuild" + fi +} |