mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
app-portage/gentoolkit: Sync with Gentoo
It's from Gentoo commit 45be97b4062ce6c22dd88e10f7349857ac7369a5.
This commit is contained in:
parent
5ffd30773f
commit
4a9cab846f
@ -1,2 +1,2 @@
|
||||
DIST gentoolkit-0.6.1.tar.gz 3195781 BLAKE2B 27e370de77586b375dc70caa1abba4c2bc4207e8f08e0a7ea2953097135506949db71ff9102a0ead198e4dea425440c57b94ac7a811ca2d5e0016fc7e234bb0d SHA512 1ffc466b69a9c53f1bbd40f6f4d1eb33d5f0f4287bb65ba1a7b1b2675ad61ecffa55ed9fda7c1ae8148744f0a77e224315eb1903dfd61a2a3dab1600fc672d2d
|
||||
DIST gentoolkit-0.6.3.tar.bz2 3186163 BLAKE2B 0f9befac53faa2b578b461a55c7113934a60478fc5d8d5ab0e06cb836ff5a2de75bb290ed797a2b085ec9f33c8494e3c3d5d0d6b643c525fff4dd0a82657118f SHA512 cf51480213fd4bac45d44f5eb5e4be4cb5c5b97ad63ecd832eb54fc7043ab8e974491005431f0897d6c41d251ae0f9fc95cfdfc4d613fc56340630a094bfc61d
|
||||
DIST gentoolkit-0.6.5.tar.bz2 3186457 BLAKE2B 7f873385b183e51b03e1c4be0edbabc89556e1b3a1dce2be71584c9ea927dd09185ba1022e570de0ed2a46cbb764c67f6eaccf97dc5892f4f355244bac7c0545 SHA512 cff9e7b1b8122941b03f7e156f25b5b416c5e4bbf1b759ecf006c271758f2548323bf59ba94a14f3268eea43081ccbba3ab63e118123af870c0257aaecbb9554
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From 5b52ee6c6efab68111d128d45f386ac21eaf84f6 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Dolbec <dolsen@gentoo.org>
|
||||
Date: Sun, 10 Jul 2022 13:41:36 -0700
|
||||
Subject: [PATCH] Revert "setup.py: migrate to setuptools"
|
||||
|
||||
This reverts commit bbbde97b5e625a49a1a66e307931548cb33f260b.
|
||||
setuptools only installs data files to the python pkg directory
|
||||
---
|
||||
setup.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 36995de..23e9b36 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -3,8 +3,8 @@
|
||||
import re
|
||||
import sys
|
||||
import subprocess
|
||||
-
|
||||
-from setuptools import setup, Command
|
||||
+from distutils import core
|
||||
+from distutils.cmd import Command
|
||||
from glob import glob
|
||||
|
||||
import os
|
||||
@@ -67,7 +67,7 @@ manpages = [
|
||||
]
|
||||
|
||||
|
||||
-class set_version(Command):
|
||||
+class set_version(core.Command):
|
||||
"""Set python __version__ and bash VERSION to our __version__."""
|
||||
|
||||
description = "hardcode scripts' version using VERSION from environment"
|
||||
@@ -130,7 +130,7 @@ test_data = {
|
||||
]
|
||||
}
|
||||
|
||||
-setup(
|
||||
+core.setup(
|
||||
name="gentoolkit",
|
||||
version=__version__,
|
||||
description="Set of tools that work with and enhance portage.",
|
||||
--
|
||||
libgit2 1.4.3
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From bf3eb16e451fd1bdee8ef03a0d22e0040e033f19 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Dolbec <dolsen@gentoo.org>
|
||||
Date: Sun, 10 Jul 2022 23:41:33 -0700
|
||||
Subject: [PATCH] eclean/pkgindex.py: Fix typo in function call
|
||||
|
||||
File "/usr/lib/python3.10/site-packages/gentoolkit/eclean/pkgindex.py", line
|
||||
60, in clean_pkgs_index
|
||||
if self.get_emaint_binhost():
|
||||
AttributeError: 'PkgIndex' object has no attribute 'get_emaint_binhost'. Did
|
||||
you mean: '_get_emaint_binhost'?
|
||||
|
||||
Also fix too many parameters in line 68 for the self.controller() call
|
||||
|
||||
Bug: https://bugs.gentoo.org/857555
|
||||
|
||||
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
|
||||
---
|
||||
pym/gentoolkit/eclean/pkgindex.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pym/gentoolkit/eclean/pkgindex.py b/pym/gentoolkit/eclean/pkgindex.py
|
||||
index d0878a1..7d6fade 100644
|
||||
--- a/pym/gentoolkit/eclean/pkgindex.py
|
||||
+++ b/pym/gentoolkit/eclean/pkgindex.py
|
||||
@@ -57,15 +57,15 @@ class PkgIndex:
|
||||
statinfo = os.stat(file_)
|
||||
size1 = statinfo.st_size
|
||||
show_progress = not quiet
|
||||
- if self.get_emaint_binhost():
|
||||
+ if self._get_emaint_binhost():
|
||||
self.taskmaster = TaskHandler(show_progress_bar=show_progress)
|
||||
tasks = [self.binhost]
|
||||
self.taskmaster.run_tasks(tasks)
|
||||
else:
|
||||
self.call_emaint()
|
||||
statinfo = os.stat(file_)
|
||||
clean_size = size1 - statinfo.st_size
|
||||
- self.controller("\n", clean_size, "Packages Index", file_, "Index")
|
||||
+ self.controller(clean_size, "Packages Index", file_, "Index")
|
||||
return clean_size
|
||||
|
||||
def call_emaint(self):
|
||||
--
|
||||
libgit2 1.4.3
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_SETUPTOOLS=no
|
||||
PYTHON_COMPAT=( python3_{9..11} pypy3 )
|
||||
PYTHON_REQ_USE="xml(+),threads(+)"
|
||||
|
||||
inherit distutils-r1 tmpfiles
|
||||
|
||||
if [[ ${PV} = 9999* ]]; then
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Collection of administration scripts for Gentoo"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
|
||||
# Need newer Portage for XML fix, bug #857537
|
||||
DEPEND="
|
||||
>=sys-apps/portage-3.0.32[${PYTHON_USEDEP}]"
|
||||
RDEPEND="${DEPEND}
|
||||
app-alternatives/awk
|
||||
sys-apps/gentoo-functions"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/gentoolkit-0.6.1-data_files.patch"
|
||||
"${FILESDIR}/gentoolkit-0.6.1-pkgindex.patch"
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
if use prefix-guest ; then
|
||||
# use correct repo name, bug #632223
|
||||
sed -i \
|
||||
-e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \
|
||||
pym/gentoolkit/profile.py || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process revdep-rebuild.conf
|
||||
|
||||
# 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/portpeek"
|
||||
elog " app-portage/smart-live-rebuild"
|
||||
fi
|
||||
}
|
||||
121
sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.6.5.ebuild
vendored
Normal file
121
sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.6.5.ebuild
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||
PYTHON_REQ_USE="xml(+),threads(+)"
|
||||
|
||||
inherit meson python-r1 tmpfiles
|
||||
|
||||
if [[ ${PV} = 9999* ]]; then
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.bz2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Collection of administration scripts for Gentoo"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Need newer Portage for eclean-pkg API, bug #900224
|
||||
DEPEND="
|
||||
>=sys-apps/portage-3.0.57[${PYTHON_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
${PYTHON_DEPS}
|
||||
app-alternatives/awk
|
||||
sys-apps/gentoo-functions
|
||||
"
|
||||
|
||||
# setuptools is still needed as a workaround for Python 3.12+ for now.
|
||||
# https://github.com/mesonbuild/meson/issues/7702
|
||||
#
|
||||
# >=meson-1.2.1-r1 for bug #912051
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=dev-build/meson-1.2.1-r1
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
' python3_12)
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if use prefix-guest ; then
|
||||
# use correct repo name, bug #632223
|
||||
sed -i \
|
||||
-e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \
|
||||
pym/gentoolkit/profile.py || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local code_only=false
|
||||
python_foreach_impl my_src_configure
|
||||
}
|
||||
|
||||
my_src_configure() {
|
||||
local emesonargs=(
|
||||
-Dcode-only=${code_only}
|
||||
-Deprefix="${EPREFIX}"
|
||||
-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
code_only=true
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
python_foreach_impl meson_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
python_foreach_impl meson_src_test --no-rebuild --verbose
|
||||
}
|
||||
|
||||
src_install() {
|
||||
python_foreach_impl my_src_install
|
||||
dotmpfiles data/tmpfiles.d/revdep-rebuild.conf
|
||||
|
||||
local scripts
|
||||
mapfile -t scripts < <(awk '/^#!.*python/ {print FILENAME} {nextfile}' "${ED}"/usr/bin/* || die)
|
||||
python_replicate_script "${scripts[@]}"
|
||||
}
|
||||
|
||||
my_src_install() {
|
||||
local pydirs=(
|
||||
"${D}$(python_get_sitedir)"
|
||||
)
|
||||
|
||||
meson_src_install
|
||||
python_fix_shebang "${pydirs[@]}"
|
||||
python_optimize "${pydirs[@]}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process revdep-rebuild.conf
|
||||
|
||||
# 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/portpeek"
|
||||
elog " app-portage/smart-live-rebuild"
|
||||
fi
|
||||
}
|
||||
@ -25,7 +25,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Need newer Portage for eclean-pkg API, bug #900224
|
||||
DEPEND="
|
||||
>=sys-apps/portage-3.0.53[${PYTHON_USEDEP}]
|
||||
>=sys-apps/portage-3.0.57[${PYTHON_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user