[gentoo-dev] Addressing split usage of USE=gles[123]
Hello gentoo-dev, First proposition on this list so hopefully not missing some kind of netiquette/policy. I noticed for some time that there seems to be two use cases for the gles[123] family of USE flags in gentoo repo: 1. enabling support of OpenGL ES, which seems interesting to have for more runtime choices, probably better usage of the drivers and better binary-compat support. 2. switching from OpenGL (so the full API) to Open GL ES (reduced API), which is an entirely different kind of action as that reduces it quite significantly but might be useful for machines where the drivers do not provide (good) OpenGL. To reflect this I think the "gles[123]" USE flags should be renamed, first kind to "gles[123]support" and second kind to "gles[123]only". Might also be the time to globalize them? I'm not sure but I think that would help in signalling which USE flags are to be used in packages. (and I'm probably not the only one which tends to only put global USE flags in make.conf, this kind of USE flags being the reason) Here is splitting use.local.desc in groups so you get a view of the more-or-less current state: ## First kind, enable support (19 packages) dev-games/ogre:gles2 - Build OpenGL ES 2.x RenderSystem dev-games/ogre:gles3 - Enable OpenGL ES 3.x Features dev-libs/efl:gles2 - Enable the OpenGL ES GL implementation kde-plasma/kinfocenter:gles2 - Show OpenGL ES information in kinfocenter media-libs/cogl:gles2 - Enable OpenGL ES 2.0 support media-libs/gst-plugins-bad:gles2 - Enable GLES2 support media-libs/gst-plugins-base:gles2 - Enable OpenGL library and plugin via GLESv2 API (requires egl) media-libs/libprojectm:gles2 - Provide support for OpenGL ES 2 and 3 media-libs/libsdl2:gles - include OpenGL ES support media-libs/mesa:gles1 - Enable GLESv1 support. media-libs/mesa:gles2 - Enable GLESv2 support. media-plugins/gst-plugins-gtk:gles2 - Enable gtkglsink OpenGL sink based on GLESv2 API media-plugins/gst-plugins-vaapi:gles2 - Enable GLESv2 and GLESv3 support media-tv/kodi:gles - Enable support for GLES net-libs/webkit-gtk:gles2 - Enable GLESv2 support sys-apps/kmscon:gles2 - Enable GLES2 for backend x11-apps/mesa-progs:gles2 - Build OpenGL ES 2 utilities x11-libs/cairo:gles2 - Build the OpenGL ES 2 backend x11-wm/mutter:gles2 - Enable OpenGL ES 2.0 support ## Second kind, switch from OpenGL to OpenGL ES (20 packages) dev-libs/weston:gles2 - Use GLESv2 cairo instead of full GL dev-python/PyQt5:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qt3d:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtdatavis3d:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtdeclarative:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtgui:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtmultimedia:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtopengl:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtprintsupport:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtwebkit:gles2 - Use GLES 2.0 or later instead of full OpenGL dev-qt/qtwidgets:gles2 - Use GLES 2.0 or later instead of full OpenGL games-emulation/mupen64plus-core:gles2 - Use GLES2 instead of OpenGL games-emulation/mupen64plus-video-glide64mk2:gles2 - Use GLES2 instead of OpenGL games-emulation/mupen64plus-video-rice:gles2 - Use GLES2 instead of OpenGL kde-apps/kdenlive:gles2 - Use GLES 2.0 or later instead of full OpenGL kde-frameworks/plasma:gles2 - Use GLES 2.0 or later instead of full OpenGL kde-plasma/kwin:gles2 - Use OpenGL ES 2 instead of full GL sci-libs/opencascade:gles2 - Use OpenGL ES 2.0 www-plugins/freshplayerplugin:gles2 - Use system GLESv2 libraries instead of ANGLE for shader translation www-plugins/lightspark:gles - Replace default OpenGL renderer with GLESv2
Re: [gentoo-dev] rfc: virtual/libcrypt for libcrypt.so implementation
On Thu, 7 Nov 2019 11:52:19 -0800 Patrick McLean wrote: I will push the attached version with zmedico's change on Friday unless there are objections (I have addressed all the feedback so far AFAIK). > Given glibc upstream's tentative plans to remove libcrypt [1], I think > we should start working out the kinks well in advance. Toolchain has > already added a package.use.force-ed "crypt" USE flag to > sys-libs/glibc-2.30-r2 [2]. The main alternative out there is libxcrypt, > which I have recently bumped and added a package.use.mask-ed "system" > USE flag to make it provide the "system" version of libcrypt.so. > > To give us time to work out dependencies in advance, I would like to > propose a virtual to provide libcrypt.so, and we can gradually update > all users of libcrypt to {R,}DEPEND on this virtual. > > Maybe once this is in place and the obvious/common packages are > updated, we could request a tinderbox run to flush out what was missed. > > > [1] > https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=50479f17c9a3a5ef074dafa3f23aca954b82bd6a;hb=HEAD#l768 > [2] https://bugs.gentoo.org/699422 libcrypt-0.ebuild Description: Binary data
Re: [gentoo-dev] packages up for grabs
On 17:47 Mon 18 Nov , Tim Harder wrote: > The following list of packages are up for grabs that I dropped myself as > as a direct maintainer from. There are probably a significantly larger > number that I've indirectly maintained hiding under the guise of older > projects that mostly act likes herds (e.g. graphics, sound, and vim to > name a few) so interested parties should feel free to directly add > themselves as maintainers for such packages. > > Note that some of the packages in this list already have maintainers, > but I'm sure most of them wouldn't mind co-maintainers. > net-misc/autossh I'd like to take this one as I'm using it daily -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55
Re: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Add distutils_enable_sphinx helper function
On Wed, 2019-11-20 at 10:23 -0800, Patrick McLean wrote: > Hi Michał, > > Thanks for doing this work, it's always better to have standardized > ways of doing things. > > On Wed, 20 Nov 2019 15:21:55 +0100 > Michał Górny wrote: > > > > > +distutils_enable_sphinx() { > > + debug-print-function ${FUNCNAME} "${@}" > > + [[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one arg: " > > + > > + _DISTUTILS_SPHINX_SUBDIR=${1} > > + shift > > + _DISTUTILS_SPHINX_PLUGINS=( "${@}" ) > > + > > + local deps autodoc=1 d > > + for d; do > > + if [[ ${d} == --no-autodoc ]]; then > > + autodoc= > > + else > > + deps+=" > > + ${d}[\${PYTHON_USEDEP}]" > > + fi > > + done > > + > > + if [[ ! ${autodoc} && -n ${deps} ]]; then > > + die "${FUNCNAME}: do not pass --no-autodoc if external plugins > > are used" > > + fi > > + if [[ ${autodoc} ]]; then > > + deps="$(python_gen_any_dep " > > + dev-python/sphinx[\${PYTHON_USEDEP}] > > + ${deps}")" > > + > > + python_check_deps() { > > + use doc || return 0 > > + local p > > + for p in "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do > > + has_version "${p}[${PYTHON_USEDEP}]" || return 1 > > + done > > + } > > I think it would be better to put this code in sphinx_check_deps > (or some such) and define a python_check_deps that just calls > sphinx_check_deps. That would allow ebuilds that need to do more than > the sphinx stuff to not have to reimplement this. They would have to reimplement stuff anyway since it needs to be exactly paired with python_gen_any_dep. > > > + else > > + deps="dev-python/sphinx" > > + fi > > + > > + python_compile_all() { > > + use doc || return > > + > > + cd "${_DISTUTILS_SPHINX_SUBDIR}" || die > > + [[ -f conf.py ]] || > > + die "conf.py not found, distutils_enable_sphinx call > > wrong" > > + > > + if [[ ${_DISTUTILS_SPHINX_PLUGINS[0]} == --no-autodoc ]]; then > > + if grep -q 'sphinx\.ext\.autodoc' "conf.py"; then > > Since this is just searching for a fixed string maybe > "grep -F -q 'sphinx.ext.autodoc'" is a bit nicer. Hmm, probably yes, indeed. > > > + die "distutils_enable_sphinx: --no-autodoc > > passed but sphinx.ext.autodoc found in conf.py" > > + fi > > + else > > + if ! grep -q 'sphinx\.ext\.autodoc' "conf.py"; then > > + die "distutils_enable_sphinx: > > sphinx.ext.autodoc not found in conf.py, pass --no-autodoc" > > + fi > > + fi > > + > > + # disable intersphinx (internet use) > > + sed -e 's:^intersphinx_mapping:disabled_&:' -i conf.py || die > > + # not all packages include the Makefile in pypi tarball > > + sphinx-build -b html -d _build/doctrees . _build/html || die > > + > > + HTML_DOCS+=( "${_DISTUTILS_SPHINX_SUBDIR}/_build/html/." ) > > + } > > Same as above, I think it would be better to define this as > sphinx_compile, and define a python_compile_all that just calls it. > That way if an ebuild defines it's own python_compile_all it can call > sphinx_compile to get this functionality. I suppose it makes sense here. > > > + > > + IUSE+=" doc" > > + if [[ ${EAPI} == [56] ]]; then > > + DEPEND+=" doc? ( ${deps} )" > > + else > > + BDEPEND+=" doc? ( ${deps} )" > > + fi > > + > > + # we need to ensure successful return in case we're called last, > > + # otherwise Portage may wrongly assume sourcing failed > > + return 0 > > +} > > + > > # @FUNCTION: distutils_enable_tests > > # @USAGE: > > # @DESCRIPTION: > > -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part
Re: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Add distutils_enable_sphinx helper function
Hi Michał, Thanks for doing this work, it's always better to have standardized ways of doing things. On Wed, 20 Nov 2019 15:21:55 +0100 Michał Górny wrote: > +distutils_enable_sphinx() { > + debug-print-function ${FUNCNAME} "${@}" > + [[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one arg: " > + > + _DISTUTILS_SPHINX_SUBDIR=${1} > + shift > + _DISTUTILS_SPHINX_PLUGINS=( "${@}" ) > + > + local deps autodoc=1 d > + for d; do > + if [[ ${d} == --no-autodoc ]]; then > + autodoc= > + else > + deps+=" > + ${d}[\${PYTHON_USEDEP}]" > + fi > + done > + > + if [[ ! ${autodoc} && -n ${deps} ]]; then > + die "${FUNCNAME}: do not pass --no-autodoc if external plugins > are used" > + fi > + if [[ ${autodoc} ]]; then > + deps="$(python_gen_any_dep " > + dev-python/sphinx[\${PYTHON_USEDEP}] > + ${deps}")" > + > + python_check_deps() { > + use doc || return 0 > + local p > + for p in "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do > + has_version "${p}[${PYTHON_USEDEP}]" || return 1 > + done > + } I think it would be better to put this code in sphinx_check_deps (or some such) and define a python_check_deps that just calls sphinx_check_deps. That would allow ebuilds that need to do more than the sphinx stuff to not have to reimplement this. > + else > + deps="dev-python/sphinx" > + fi > + > + python_compile_all() { > + use doc || return > + > + cd "${_DISTUTILS_SPHINX_SUBDIR}" || die > + [[ -f conf.py ]] || > + die "conf.py not found, distutils_enable_sphinx call > wrong" > + > + if [[ ${_DISTUTILS_SPHINX_PLUGINS[0]} == --no-autodoc ]]; then > + if grep -q 'sphinx\.ext\.autodoc' "conf.py"; then Since this is just searching for a fixed string maybe "grep -F -q 'sphinx.ext.autodoc'" is a bit nicer. > + die "distutils_enable_sphinx: --no-autodoc > passed but sphinx.ext.autodoc found in conf.py" > + fi > + else > + if ! grep -q 'sphinx\.ext\.autodoc' "conf.py"; then > + die "distutils_enable_sphinx: > sphinx.ext.autodoc not found in conf.py, pass --no-autodoc" > + fi > + fi > + > + # disable intersphinx (internet use) > + sed -e 's:^intersphinx_mapping:disabled_&:' -i conf.py || die > + # not all packages include the Makefile in pypi tarball > + sphinx-build -b html -d _build/doctrees . _build/html || die > + > + HTML_DOCS+=( "${_DISTUTILS_SPHINX_SUBDIR}/_build/html/." ) > + } Same as above, I think it would be better to define this as sphinx_compile, and define a python_compile_all that just calls it. That way if an ebuild defines it's own python_compile_all it can call sphinx_compile to get this functionality. > + > + IUSE+=" doc" > + if [[ ${EAPI} == [56] ]]; then > + DEPEND+=" doc? ( ${deps} )" > + else > + BDEPEND+=" doc? ( ${deps} )" > + fi > + > + # we need to ensure successful return in case we're called last, > + # otherwise Portage may wrongly assume sourcing failed > + return 0 > +} > + > # @FUNCTION: distutils_enable_tests > # @USAGE: > # @DESCRIPTION:
[gentoo-dev] [PATCH 4/4] dev-python/jinja: Use distutils_enable_sphinx
Signed-off-by: Michał Górny --- dev-python/jinja/jinja-2.10.3-r1.ebuild | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/dev-python/jinja/jinja-2.10.3-r1.ebuild b/dev-python/jinja/jinja-2.10.3-r1.ebuild index 39131f10d5a9..f021773e3385 100644 --- a/dev-python/jinja/jinja-2.10.3-r1.ebuild +++ b/dev-python/jinja/jinja-2.10.3-r1.ebuild @@ -17,20 +17,18 @@ SRC_URI="https://github.com/pallets/jinja/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris" -IUSE="doc examples test" +IUSE="examples test" RESTRICT="!test? ( test )" CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}] !dev-python/jinja:compat" RDEPEND="${CDEPEND} dev-python/markupsafe[${PYTHON_USEDEP}]" -BDEPEND="${CDEPEND} - doc? ( - dev-python/sphinx - dev-python/sphinx-issues - dev-python/pallets-sphinx-themes - )" +BDEPEND="${CDEPEND}" +distutils_enable_sphinx docs \ + dev-python/sphinx-issues \ + dev-python/pallets-sphinx-themes distutils_enable_tests pytest # XXX: handle Babel better? @@ -64,12 +62,7 @@ python_compile() { wrap_opts distutils-r1_python_compile } -python_compile_all() { - use doc && emake -C docs html -} - python_install_all() { - use doc && local HTML_DOCS=( docs/_build/html/. ) if use examples ; then docinto examples dodoc -r examples/. -- 2.24.0
[gentoo-dev] [PATCH 2/4] dev-python/cssselect: Use distutils_enable_sphinx
Signed-off-by: Michał Górny --- dev-python/cssselect/cssselect-1.0.3.ebuild | 26 ++--- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/dev-python/cssselect/cssselect-1.0.3.ebuild b/dev-python/cssselect/cssselect-1.0.3.ebuild index 80aef78e55b9..eb7e80a7db75 100644 --- a/dev-python/cssselect/cssselect-1.0.3.ebuild +++ b/dev-python/cssselect/cssselect-1.0.3.ebuild @@ -16,34 +16,12 @@ SRC_URI="https://github.com/scrapy/cssselect/archive/v${PV}.tar.gz -> ${P}.tar.g LICENSE="BSD" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="doc test" +IUSE="test" RESTRICT="!test? ( test )" DEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] - doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') ) test? ( dev-python/lxml[${PYTHON_USEDEP}] )" +distutils_enable_sphinx docs distutils_enable_tests unittest - -python_check_deps() { - use doc || return 0 - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" -} - -python_prepare_all() { - # prevent non essential d'load of files in doc build - sed -e 's:intersphinx_:#&:' -i docs/conf.py || die - distutils-r1_python_prepare_all -} - -python_compile_all() { - if use doc ; then - esetup.py build_sphinx - fi -} - -python_install_all() { - use doc && local HTML_DOCS=( docs/_build/html/. ) - distutils-r1_python_install_all -} -- 2.24.0
[gentoo-dev] [PATCH 3/4] dev-python/future: Use distutils_enable_sphinx
Signed-off-by: Michał Górny --- dev-python/future/future-0.18.2.ebuild | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/dev-python/future/future-0.18.2.ebuild b/dev-python/future/future-0.18.2.ebuild index d5b55ddea8d2..91b1a6a29af8 100644 --- a/dev-python/future/future-0.18.2.ebuild +++ b/dev-python/future/future-0.18.2.ebuild @@ -17,16 +17,12 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~ IUSE="doc" distutils_enable_tests pytest +distutils_enable_sphinx docs \ + dev-python/sphinx-bootstrap-theme # TODO: make numpy unconditional when it supports py3.8 -BDEPEND=" +BDEPEND+=" dev-python/setuptools[${PYTHON_USEDEP}] - doc? ( - $(python_gen_any_dep ' - dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}] - ') - ) test? ( $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ python{2_7,3_{5,6,7}}) @@ -37,12 +33,6 @@ PATCHES=( "${FILESDIR}"/${P}-tests.patch ) -python_check_deps() { - use doc || return 0 - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && - has_version "dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]" -} - python_prepare_all() { sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die # tests requiring network access @@ -52,10 +42,3 @@ python_prepare_all() { distutils-r1_python_prepare_all } - -python_compile_all() { - if use doc; then - sphinx-build docs/ docs/_build/html || die - HTML_DOCS=( docs/_build/html/. ) - fi -} -- 2.24.0
[gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Add distutils_enable_sphinx helper function
Add a helper function to easily take care of the most common dev-python/sphinx usage for HTML doc building. Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 98 ++ 1 file changed, 98 insertions(+) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 63e77bf014c1..72fb664023fc 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -232,6 +232,104 @@ fi # } # @CODE +# @FUNCTION: distutils_enable_sphinx +# @USAGE: [--no-autodoc | ...] +# @DESCRIPTION: +# Set up IUSE, BDEPEND, python_check_deps() and python_compile_all() for +# building HTML docs via dev-python/sphinx. python_compile_all() will +# append to HTML_DOCS if docs are enabled. +# +# This helper is meant for the most common case, that is a single Sphinx +# subdirectory with standard layout, building and installing HTML docs +# behind USE=doc. It assumes it's the only consumer of the three +# aforementioned functions. If you need to use a custom implemention, +# you can't use it. +# +# If your package uses additional Sphinx plugins, they should be passed +# (without PYTHON_USEDEP) as . The function will take care +# of setting appropriate any-of dep and python_check_deps(). +# +# If no plugin packages are specified, the eclass will still utilize +# any-r1 API to support autodoc (documenting source code). +# If the package uses neither autodoc nor additional plugins, you should +# pass --no-autodoc to disable this API and simplify the resulting code. +# +# This function must be called in global scope. Take care not to +# overwrite the variables set by it. +distutils_enable_sphinx() { + debug-print-function ${FUNCNAME} "${@}" + [[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one arg: " + + _DISTUTILS_SPHINX_SUBDIR=${1} + shift + _DISTUTILS_SPHINX_PLUGINS=( "${@}" ) + + local deps autodoc=1 d + for d; do + if [[ ${d} == --no-autodoc ]]; then + autodoc= + else + deps+=" + ${d}[\${PYTHON_USEDEP}]" + fi + done + + if [[ ! ${autodoc} && -n ${deps} ]]; then + die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used" + fi + if [[ ${autodoc} ]]; then + deps="$(python_gen_any_dep " + dev-python/sphinx[\${PYTHON_USEDEP}] + ${deps}")" + + python_check_deps() { + use doc || return 0 + local p + for p in "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do + has_version "${p}[${PYTHON_USEDEP}]" || return 1 + done + } + else + deps="dev-python/sphinx" + fi + + python_compile_all() { + use doc || return + + cd "${_DISTUTILS_SPHINX_SUBDIR}" || die + [[ -f conf.py ]] || + die "conf.py not found, distutils_enable_sphinx call wrong" + + if [[ ${_DISTUTILS_SPHINX_PLUGINS[0]} == --no-autodoc ]]; then + if grep -q 'sphinx\.ext\.autodoc' "conf.py"; then + die "distutils_enable_sphinx: --no-autodoc passed but sphinx.ext.autodoc found in conf.py" + fi + else + if ! grep -q 'sphinx\.ext\.autodoc' "conf.py"; then + die "distutils_enable_sphinx: sphinx.ext.autodoc not found in conf.py, pass --no-autodoc" + fi + fi + + # disable intersphinx (internet use) + sed -e 's:^intersphinx_mapping:disabled_&:' -i conf.py || die + # not all packages include the Makefile in pypi tarball + sphinx-build -b html -d _build/doctrees . _build/html || die + + HTML_DOCS+=( "${_DISTUTILS_SPHINX_SUBDIR}/_build/html/." ) + } + + IUSE+=" doc" + if [[ ${EAPI} == [56] ]]; then + DEPEND+=" doc? ( ${deps} )" + else + BDEPEND+=" doc? ( ${deps} )" + fi + + # we need to ensure successful return in case we're called last, + # otherwise Portage may wrongly assume sourcing failed + return 0 +} + # @FUNCTION: distutils_enable_tests # @USAGE: # @DESCRIPTION: -- 2.24.0
Re: [gentoo-portage-dev] [PATCH] repoman: add --include-profiles=PROFILES
On 11/18/19 11:41 PM, Sergei Trofimovich wrote: > On Mon, 18 Nov 2019 16:45:58 -0800 > Zac Medico wrote: > >> On 11/18/19 4:21 PM, Sergei Trofimovich wrote: >>> repoman slows down ~linearly with amount of profiles being scanned. >>> In case of amd64 we have 28 stable profiles. >>> >>> To speed up processing and fit into time budged of various CIs we can >>> split the work across different processes that handle different profiles. >>> >>> Example benchmark on ::haskell overlay: >>> $ ./repoman full --include-arches=amd64 >>> ~65 minutes >>> $ ./repoman full --include-profiles=default/linux/amd64/17.0 >>> ~4 minutes >>> This allows for a crude sharding of work across processes and allows for >>> cheap tree-wide scans for early failures. >>> >>> Bug: https://bugs.gentoo.org/700456 >>> Signed-off-by: Sergei Trofimovich >>> --- >>> repoman/lib/repoman/actions.py | 4 >>> repoman/lib/repoman/argparser.py| 7 +++ >>> repoman/lib/repoman/modules/scan/depend/__init__.py | 3 ++- >>> repoman/lib/repoman/modules/scan/depend/profile.py | 9 +++-- >>> repoman/lib/repoman/scanner.py | 5 + >>> repoman/man/repoman.1 | 4 >>> 6 files changed, 29 insertions(+), 3 deletions(-) >>> >>> diff --git a/repoman/lib/repoman/actions.py b/repoman/lib/repoman/actions.py >>> index 1c9989a72..92d4d4e94 100644 >>> --- a/repoman/lib/repoman/actions.py >>> +++ b/repoman/lib/repoman/actions.py >>> @@ -412,6 +412,10 @@ the whole commit message to abort. >>> report_options.append( >>> "--include-arches=\"%s\"" % >>> " ".join(sorted(self.scanner.include_arches))) >>> + if self.scanner.include_profiles is not None: >>> + report_options.append( >>> + "--include-profiles=\"%s\"" % >>> + " ".join(sorted(self.scanner.include_profiles))) >>> >>> if portage_version is None: >>> sys.stderr.write("Failed to insert portage version in >>> message!\n") >>> diff --git a/repoman/lib/repoman/argparser.py >>> b/repoman/lib/repoman/argparser.py >>> index fa0e6ff90..670a0e91d 100644 >>> --- a/repoman/lib/repoman/argparser.py >>> +++ b/repoman/lib/repoman/argparser.py >>> @@ -164,6 +164,13 @@ def parse_args(argv, repoman_default_opts): >>> 'A space separated list of arches used to ' >>> 'filter the selection of profiles for dependency >>> checks')) >>> >>> + parser.add_argument( >>> + '--include-profiles', >>> + dest='include_profiles', metavar='PROFILES', action='append', >>> + help=( >>> + 'A space separated list of profiles used to ' >>> + 'define the selection of profiles for dependency >>> checks')) >>> + >>> parser.add_argument( >>> '-d', '--include-dev', dest='include_dev', action='store_true', >>> default=False, >>> diff --git a/repoman/lib/repoman/modules/scan/depend/__init__.py >>> b/repoman/lib/repoman/modules/scan/depend/__init__.py >>> index c3cc0ddeb..9068760bb 100644 >>> --- a/repoman/lib/repoman/modules/scan/depend/__init__.py >>> +++ b/repoman/lib/repoman/modules/scan/depend/__init__.py >>> @@ -19,7 +19,8 @@ module_spec = { >>> 'func_desc': { >>> }, >>> 'mod_kwargs': ['qatracker', 'portdb', 'profiles', >>> 'options', >>> - 'repo_metadata', 'repo_settings', >>> 'include_arches', 'caches', >>> + 'repo_metadata', 'repo_settings', >>> 'include_arches', >>> + 'include_profiles', 'caches', >>> 'repoman_incrementals', 'env', 'have', >>> 'dev_keywords' >>> ], >>> 'func_kwargs': { >>> diff --git a/repoman/lib/repoman/modules/scan/depend/profile.py >>> b/repoman/lib/repoman/modules/scan/depend/profile.py >>> index d980f4eca..0b1d74483 100644 >>> --- a/repoman/lib/repoman/modules/scan/depend/profile.py >>> +++ b/repoman/lib/repoman/modules/scan/depend/profile.py >>> @@ -33,6 +33,7 @@ class ProfileDependsChecks(ScanBase): >>> @param options: cli options >>> @param repo_settings: repository settings instance >>> @param include_arches: set >>> + @param include_profiles: set >>> @param caches: dictionary of our caches >>> @param repoman_incrementals: tuple >>> @param env: the environment >>> @@ -46,6 +47,7 @@ class ProfileDependsChecks(ScanBase): >>> self.options = kwargs.get('options') >>> self.repo_settings = kwargs.get('repo_settings') >>> self.include_arches = kwargs.get('include_arches') >>> + self.include_profiles = kwargs.get('include_profiles') >>>
Re: [gentoo-portage-dev] [PATCH] repoman: add --include-profiles=PROFILES
On 11/18/19 4:21 PM, Sergei Trofimovich wrote: > diff --git a/repoman/lib/repoman/modules/scan/depend/profile.py > b/repoman/lib/repoman/modules/scan/depend/profile.py > index d980f4eca..0b1d74483 100644 > --- a/repoman/lib/repoman/modules/scan/depend/profile.py > +++ b/repoman/lib/repoman/modules/scan/depend/profile.py > @@ -33,6 +33,7 @@ class ProfileDependsChecks(ScanBase): > @param options: cli options > @param repo_settings: repository settings instance > @param include_arches: set > + @param include_profiles: set > @param caches: dictionary of our caches > @param repoman_incrementals: tuple > @param env: the environment > @@ -46,6 +47,7 @@ class ProfileDependsChecks(ScanBase): > self.options = kwargs.get('options') > self.repo_settings = kwargs.get('repo_settings') > self.include_arches = kwargs.get('include_arches') > + self.include_profiles = kwargs.get('include_profiles') > self.caches = kwargs.get('caches') > self.repoman_incrementals = kwargs.get('repoman_incrementals') > self.env = kwargs.get('env') > @@ -81,8 +83,11 @@ class ProfileDependsChecks(ScanBase): > if arch not in self.include_arches: > continue > > - relevant_profiles.extend( > - (keyword, groups, prof) for prof in > self.profiles[arch]) > + for prof in self.profiles[arch]: > + if self.include_profiles is not None: > + if prof not in self.include_profiles: Since prof is an instance of repoman.profile.ProfileDesc, you actually have to use prof.sub_path for this containment check. That means your benchmark skipped the profile that you intended to include. > + continue > + relevant_profiles.append((keyword, groups, > prof)) -- Thanks, Zac signature.asc Description: OpenPGP digital signature
Re: [gentoo-portage-dev] profile.bashrc variables
On 11/19/19 11:38 PM, Joakim Tjernlund wrote: > On Tue, 2019-11-19 at 22:40 -0800, Zac Medico wrote: >> On 11/19/19 2:17 PM, Joakim Tjernlund wrote: >>> cat profile.bashrc >>> if [ "${HOSTNAME}" == "gentoo64.infinera.com" ]; then >>># This does not work, why? >>>[ -z "$_once" ] && EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} -k n" && >>> _once=1 >>>[ -z "$_fonce" ] && FEATURES="${FEATURES} buildpkg" && _fonce=1 >>>export EMERGE_DEFAULT_OPTS >>>export FEATURES >>> fi >>> >>> If I add logging inside I see that these are set but emerge >>> does not build binpkgs, what am I missing ? >>> >>> sys-apps/portage-2.3.79 >>> >>> Jocke >>> >> >> You can use /etc/portage/package.env to modify FEATURES. The bashrc is >> evaluated only when executing ebuilds, so it's not appropriate for >> FEATURES modifications. > > I did try adding --buildpkg to EMERGE_DEFAULT_OPTS too, same result > I do need to do this in the profile and last I tried package.env it didn't > work > in profiles, has that changed? Oh, no that hasn't changed. The barrier for profile extensions is a bit higher because it's governed by PMS, but we can also use profile-formats to bypass PMS. We've got a similar bug open here: https://bugs.gentoo.org/651208 > In general I think /etc/portage is just another profile so things like > package.env should also work in a regular profile. > While at package.env, the other day I wanted do in package.env: > if not "cat/pkg" do my_extra.conf but I could not find > a NOT syntax for package.env, is there one? No, there's not. I guess we could express that as !cat/pkg. -- Thanks, Zac signature.asc Description: OpenPGP digital signature