app-portage/gentoolkit: Bring back from overlay

This is from gentoo commit 8e426ccff148220423503c9a1c6c512c9b63ddfa.
This commit is contained in:
Krzesimir Nowak 2021-09-09 08:54:45 +02:00
parent 9450a14ac2
commit 31736e3638
9 changed files with 472 additions and 0 deletions

View File

@ -0,0 +1,4 @@
DIST gentoolkit-0.4.6.tar.gz 3205641 BLAKE2B 7da91a313c8a9263eb7b4abd6207ece9dd602a5069a87f1e78ada13fc9f396e1f2afddaf0637c473445034cf57b5ca7631e209361a88fa3892d302b20f4cc986 SHA512 3aa3c9af7e994313400607943b9090fd813227ddd6d550b50fbcf7eeb4053da8bcdb41c9ef2579d957d2f279fdcc4e2f2ceca1091c5fd457df4204dd11792d6e
DIST gentoolkit-0.4.7.tar.gz 3205669 BLAKE2B e5f64b85546bc10ad16e7fa42d288965539177375e8796b40df699859efa13fb98bb86aec58e60363c955b2d5e4b2e6379a7597252ee4fdbeec49559de67b328 SHA512 0fab600b4323d23e12009eeb4ade595950880a88b05bcfbfeada1a9b9af615b96d31c568285629bf6e5de7b45ed857bdf98b6261dc54974fbaf70c924e093c76
DIST gentoolkit-0.4.8.tar.gz 3206070 BLAKE2B 7f689ae85136827b8af50401165ccd44bc824e12bec43dad786c7221ec78ee3c1f14d538d197e277a2fedc23f570440f4ec7c0cc707a146814315ff6de48c115 SHA512 689b4229c5d2b6f4440b7d3d57e4b9be5265eead53737890c17dbd0510df287f5c19f86b924735d4ad146d1a500c59a15869b718cbf805b894b0bf115b69f838
DIST gentoolkit-0.5.0.tar.gz 3206598 BLAKE2B a379dcbbaba9d52c241fea020b87c458384e44092539947909e14fd6c63fd9cc06d076b8081874edf17fc50e80fe48ceab3400c90046867dc409e7ac39c17231 SHA512 8a5c344f3a17c4c779abbcaa35b5e3f147106dbc61310d0d1a816ec8080914271fa45c311a8feeb1bfe14195af7cf34c0b29142d6e43e2de232dae96fbd00861

View File

@ -0,0 +1,43 @@
# https://github.com/gentoo/gentoolkit/pull/11
# https://bugs.gentoo.org/747034
diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py
index 22c249e..c3dba98 100644
--- a/pym/gentoolkit/metadata.py
+++ b/pym/gentoolkit/metadata.py
@@ -73,8 +73,7 @@ class _Maintainer(object):
self.description = None
self.restrict = node.get('restrict')
self.status = node.get('status')
- maint_attrs = node.getchildren()
- for attr in maint_attrs:
+ for attr in node.iter():
setattr(self, attr.tag, attr.text)
def __repr__(self):
@@ -101,7 +100,7 @@ class _Useflag(object):
_desc = ''
if node.text:
_desc = node.text
- for child in node.getchildren():
+ for child in node.iter():
_desc += child.text if child.text else ''
_desc += child.tail if child.tail else ''
# This takes care of tabs and newlines left from the file
@@ -213,7 +212,7 @@ class MetaData(object):
if herd in ('no-herd', 'maintainer-wanted', 'maintainer-needed'):
return None
- for node in self._herdstree.getiterator('herd'):
+ for node in self._herdstree.iter('herd'):
if node.findtext('name') == herd:
return node.findtext('email')
@@ -283,7 +282,7 @@ class MetaData(object):
return self._useflags
self._useflags = []
- for node in self._xml_tree.getiterator('flag'):
+ for node in self._xml_tree.iter('flag'):
self._useflags.append(_Useflag(node))
return self._useflags

View File

@ -0,0 +1,34 @@
From f14b6198d1dd9cb7f4a83f3822e4a1782a5581e8 Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Tue, 13 Oct 2020 10:04:07 -0400
Subject: [PATCH] metadata.py: Fix duplicated use flag text bug 748129
Regression from commit: 517581df206766
link: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=517581df206766fabf10273cde565e0a6dc62829
Gentoo bug: https://bugs.gentoo.org/748129
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
---
pym/gentoolkit/metadata.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py
index c3dba98..0b58392 100644
--- a/pym/gentoolkit/metadata.py
+++ b/pym/gentoolkit/metadata.py
@@ -101,8 +101,11 @@ class _Useflag(object):
if node.text:
_desc = node.text
for child in node.iter():
- _desc += child.text if child.text else ''
- _desc += child.tail if child.tail else ''
+ # prevent duplicate text
+ if child.text and child.text not in _desc:
+ _desc += child.text
+ if child.tail and not child.tail in _desc:
+ _desc += child.tail
# This takes care of tabs and newlines left from the file
self.description = re.sub(r'\s+', ' ', _desc)
--
libgit2 1.0.1

View File

@ -0,0 +1,75 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit distutils-r1
DESCRIPTION="Collection of administration scripts for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-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}
sys-apps/gawk
sys-apps/gentoo-functions"
python_prepare_all() {
python_setup
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
VERSION="${PVR}" "${PYTHON}" setup.py set_version
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
}
pkg_preinst() {
if has_version "<${CATEGORY}/${PN}-0.4.0"; then
SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
fi
}
pkg_postinst() {
# Create cache directory for revdep-rebuild
mkdir -p -m 0755 "${EROOT}"/var/cache
mkdir -p -m 0700 "${EROOT}"/var/cache/revdep-rebuild
if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
elog "part of the gentoolkit package."
elog "The gentoolkit-dev package is now deprecated in favor of a single"
elog "gentoolkit package. The remaining tools from gentoolkit-dev"
elog "are now obsolete/unused with the git based tree."
fi
# 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: https://wiki.gentoo.org/wiki/Gentoolkit"
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
}

View File

@ -0,0 +1,75 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python3_{6,7,8} pypy3 )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit distutils-r1
DESCRIPTION="Collection of administration scripts for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-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}
sys-apps/gawk
sys-apps/gentoo-functions"
python_prepare_all() {
python_setup
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
VERSION="${PVR}" "${PYTHON}" setup.py set_version
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
}
pkg_preinst() {
if has_version "<${CATEGORY}/${PN}-0.4.0"; then
SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
fi
}
pkg_postinst() {
# Create cache directory for revdep-rebuild
mkdir -p -m 0755 "${EROOT}"/var/cache
mkdir -p -m 0700 "${EROOT}"/var/cache/revdep-rebuild
if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
elog "part of the gentoolkit package."
elog "The gentoolkit-dev package is now deprecated in favor of a single"
elog "gentoolkit package. The remaining tools from gentoolkit-dev"
elog "are now obsolete/unused with the git based tree."
fi
# 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: https://wiki.gentoo.org/wiki/Gentoolkit"
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
}

View File

@ -0,0 +1,75 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python3_{6,7,8} pypy3 )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit distutils-r1
DESCRIPTION="Collection of administration scripts for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-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}
sys-apps/gawk
sys-apps/gentoo-functions"
python_prepare_all() {
python_setup
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
VERSION="${PVR}" "${PYTHON}" setup.py set_version
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
}
pkg_preinst() {
if has_version "<${CATEGORY}/${PN}-0.4.0"; then
SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
fi
}
pkg_postinst() {
# Create cache directory for revdep-rebuild
mkdir -p -m 0755 "${EROOT}"/var/cache
mkdir -p -m 0700 "${EROOT}"/var/cache/revdep-rebuild
if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
elog "part of the gentoolkit package."
elog "The gentoolkit-dev package is now deprecated in favor of a single"
elog "gentoolkit package. The remaining tools from gentoolkit-dev"
elog "are now obsolete/unused with the git based tree."
fi
# 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: https://wiki.gentoo.org/wiki/Gentoolkit"
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
}

View File

@ -0,0 +1,78 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit distutils-r1
DESCRIPTION="Collection of administration scripts for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-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}
sys-apps/gawk
sys-apps/gentoo-functions"
distutils_enable_tests setup.py
PATCHES=(
"${FILESDIR}"/${PN}-0.5.0-python3_9.patch
"${FILESDIR}"/${PN}-0.5.0-r1-python3_9.patch
)
python_prepare_all() {
python_setup
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
VERSION="${PVR}" "${PYTHON}" setup.py set_version
distutils-r1_python_prepare_all
}
pkg_preinst() {
if has_version "<${CATEGORY}/${PN}-0.4.0"; then
SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
fi
}
pkg_postinst() {
# Create cache directory for revdep-rebuild
mkdir -p -m 0755 "${EROOT}"/var/cache
mkdir -p -m 0700 "${EROOT}"/var/cache/revdep-rebuild
if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
elog "part of the gentoolkit package."
elog "The gentoolkit-dev package is now deprecated in favor of a single"
elog "gentoolkit package. The remaining tools from gentoolkit-dev"
elog "are now obsolete/unused with the git based tree."
fi
# 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: https://wiki.gentoo.org/wiki/Gentoolkit"
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
}

View File

@ -0,0 +1,74 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
PYTHON_REQ_USE="xml(+),threads(+)"
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git"
inherit distutils-r1 git-r3
DESCRIPTION="Collection of administration scripts for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
IUSE=""
KEYWORDS=""
DEPEND="
sys-apps/portage[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
sys-apps/gawk
sys-apps/gentoo-functions"
distutils_enable_tests setup.py
python_prepare_all() {
python_setup
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
VERSION="${PVR}" "${PYTHON}" setup.py set_version
distutils-r1_python_prepare_all
}
pkg_preinst() {
if has_version "<${CATEGORY}/${PN}-0.4.0"; then
SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
fi
}
pkg_postinst() {
# Create cache directory for revdep-rebuild
mkdir -p -m 0755 "${EROOT}"/var/cache
mkdir -p -m 0700 "${EROOT}"/var/cache/revdep-rebuild
if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
elog "part of the gentoolkit package."
elog "The gentoolkit-dev package is now deprecated in favor of a single"
elog "gentoolkit package. The remaining tools from gentoolkit-dev"
elog "are now obsolete/unused with the git based tree."
fi
# 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: https://wiki.gentoo.org/wiki/Gentoolkit"
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
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>tools-portage@gentoo.org</email>
<name>Gentoo Portage tools team</name>
</maintainer>
<longdescription>
Gentoolkit is a collection of useful adminstration scripts particular to
the Gentoo Linux distribution. It contains rough drafts and
implementations of features that may in time make it into Portage, or
into full-fledged tools in their own right.
</longdescription>
</pkgmetadata>