Re: [gentoo-dev] Why adding python3_8 to Gentoo sucks?

2019-11-16 Thread Michał Górny
On Sat, 2019-11-16 at 14:55 +0100, Ulrich Mueller wrote:
> > > > > > On Fri, 15 Nov 2019, Michael Orlitzky wrote:
> > Two things on that page are outright wrong:
> >   1. If the package has stable keywords, they should be moved to the
> >  new revision without dropping. To commit the ebuild, repoman
> >  commit --straight-to-stable option should be used.
> > That violates our other stabilization policies and common sense.
> 
> This is in the context of revision bumps, not version bumps. Also, the
> item immediately preceding it clarifies that any non-trivial changes
> require dropping to ~arch.
> 

More precisely, this is in context of dependency corrections.  There is
no need to go through stabilization to restrict too broad dependency
specifications, while stable users hit the issue for the next two
months.

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-dev] Last rites: app-misc/rioutil

2019-11-16 Thread Aaron Bauman
# Aaron Bauman  (2019-11-16)   
# EAPI=4. If anyone has this hardware then speak up.
# Removal in 15 days
app-misc/rioutil

-- 
Cheers,
Aaron


signature.asc
Description: PGP signature


Re: [gentoo-dev] Package up for grabs: sys-firmware/iwl1000-ucode

2019-11-16 Thread Matt Turner
On Sat, Nov 16, 2019 at 9:08 AM Michael 'veremitz' Everitt
 wrote:
>
> On 16/11/19 16:59, Matt Turner wrote:
> > On Sat, Nov 16, 2019 at 1:06 AM Jaco Kroon  wrote:
> >> Hi,
> >>
> >> On 2019/11/15 21:35, Matt Turner wrote:
> >>> On Fri, Nov 15, 2019 at 2:20 AM Ulrich Mueller  wrote:
>  The package is somewhat redundant, because sys-kernel/linux-firmware
>  installs the same files. (Same for all other sys-firmware/iwl*-ucode
>  packages.)
> >>> Should last-rite all of them, IMO.
> >>>
> >> I both agree and disagree with this.  It's the simpler solution and
> >> therefore I agree.
> >>
> >> I disagree because in some cases I really only want specific firmware
> >> for specific sets of hardware (especially where space constraints are an
> >> issue, read: embedded type systems).
> >>
> >> The current linux-firmware package is getting quite big in terms of 
> >> install.
> > USE=savedconfig allows you to choose exactly which files to install :)
> >
> I've never found a good way (yet...) to figure out how to write a fresh new
> 'savedconfig' if you haven't ever previously emerged the package in
> question. Does anyone have a good method for this, that doesn't require
> unpacking the whole nine yards (Megs, Gigs...) first?

You could look at the upstream git repo and make a list based on that.

Or, since you have to download the tarball anyway, ebuild ... unpack
it and inspect.

Or, use the live ebuild to avoid downloading the same data multiple
times per tarball.

Or, if you want maximal bandwidth savings don't bother with any of
this and install the files you want manually since the files aren't
going to change.



[gentoo-dev] Last rites: app-misc/toilet

2019-11-16 Thread Aaron Bauman
# Aaron Bauman  (2019-11-16)
# EAPI=4. --filter=gay Really?!
# Removal in 15 days
app-misc/toilet

-- 
Cheers,
Aaron


signature.asc
Description: PGP signature


[gentoo-dev] Last rites: dev-util/ccglue

2019-11-16 Thread Aaron Bauman
# Aaron Bauman  (2019-11-16)
# EAPI=4 and fails to build
dev-util/ccglue

-- 
Cheers,
Aaron


signature.asc
Description: PGP signature


Re: [gentoo-dev] Last rites: app-misc/toilet

2019-11-16 Thread Aaron Bauman
On Sat, Nov 16, 2019 at 08:29:58PM -0500, Aaron Bauman wrote:
> # Aaron Bauman  (2019-11-16)
> # EAPI=4. --filter=gay Really?!
> # Removal in 15 days
> app-misc/toilet
> 
> -- 
> Cheers,
> Aaron

Add the following as it is an rdep

net-irc/rbot

-- 
Cheers,
Aaron


signature.asc
Description: PGP signature


Re: [gentoo-dev] Last rites: app-misc/toilet

2019-11-16 Thread Michael 'veremitz' Everitt
On 17/11/19 02:07, Aaron Bauman wrote:
> On Sat, Nov 16, 2019 at 08:29:58PM -0500, Aaron Bauman wrote:
>> # Aaron Bauman  (2019-11-16)
>> # EAPI=4. --filter=gay Really?!
>> # Removal in 15 days
>> app-misc/toilet
>>
>> -- 
>> Cheers,
>> Aaron
> Add the following as it is an rdep
>
> net-irc/rbot
>
OOps, there goes willikins ...



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Package up for grabs: sys-firmware/iwl1000-ucode

2019-11-16 Thread Jaco Kroon
Hi,

On 2019/11/15 21:35, Matt Turner wrote:
> On Fri, Nov 15, 2019 at 2:20 AM Ulrich Mueller  wrote:
>> The package is somewhat redundant, because sys-kernel/linux-firmware
>> installs the same files. (Same for all other sys-firmware/iwl*-ucode
>> packages.)
> Should last-rite all of them, IMO.
>
I both agree and disagree with this.  It's the simpler solution and
therefore I agree.

I disagree because in some cases I really only want specific firmware
for specific sets of hardware (especially where space constraints are an
issue, read: embedded type systems).

The current linux-firmware package is getting quite big in terms of install.

Kind Regards,
Jaco




Re: [gentoo-dev] Package up for grabs: sys-firmware/iwl1000-ucode

2019-11-16 Thread Haelwenn (lanodan) Monnier
[2019-11-16 11:05:54+0200] Jaco Kroon:
> On 2019/11/15 21:35, Matt Turner wrote:
> > On Fri, Nov 15, 2019 at 2:20 AM Ulrich Mueller  wrote:
> >> The package is somewhat redundant, because sys-kernel/linux-firmware
> >> installs the same files. (Same for all other sys-firmware/iwl*-ucode
> >> packages.)
> > Should last-rite all of them, IMO.
> >
> I both agree and disagree with this.  It's the simpler solution and
> therefore I agree.
> 
> I disagree because in some cases I really only want specific firmware
> for specific sets of hardware (especially where space constraints are an
> issue, read: embedded type systems).
> 
> The current linux-firmware package is getting quite big in terms of install.

Well there is savedconfig on linux-firmware for a reason.



Re: [gentoo-dev] Why adding python3_8 to Gentoo sucks?

2019-11-16 Thread Michał Górny
On Fri, 2019-11-15 at 09:05 +0100, Michał Górny wrote:
> On Wed, 2019-11-13 at 22:16 +0100, Michał Górny wrote:
> > I'd like to share my frustration at the state of Python in general,
> > and Python packages in Gentoo.  So I'd like to 'bootstrap' python3_8 --
> > that is, add it to the most common dependency, dev-python/setuptools. 
> > Simple thing, right?
> > 
> 
> Well, it turned out that things are worse than I anticipated.
> I expected *some* minor test breakage.  What we have instead is packages
> being so broken that they break a lot of other packages.
> 
> So I went with plan B instead: I'll do as much testing locally
> as possible, and add py3.8 when I manage to get the tests on the package
> in question working, independently of the testing of all deep test deps.
> This will mean that some packages will have tests disabled temporarily
> for end users.
> 

Good news, everyone.  We have 3.8-enabled setuptools, pytest and nose
which should be sufficient to start testing other packages.

Of other common packages, dev-python/sphinx isn't 3.8-enabled yet. 
However, this gives a good exercise of improving sphinx deps.  That is:

1. If package uses sphinx only to build docs from .rst files, has no
extra deps and doesn't use code introspection, you can just drop
PYTHON_USEDEP.

2. Likewise but if it has extra deps, you can use the very hard any-r1
API in python-r1 (distutils-r1).  This has the advantage that it uses
any-of deps, and doesn't require matching PYTHON_TARGETS.  Example:

BDEPEND="
  doc? ( $(python_gen_any_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-some-random-theme[${PYTHON_USEDEP}]
  ')"

python_check_deps() {
  use doc || return 0
  has_version "dev-python/sphinx[${PYTHON_USEDEP}]" &&
has_version "dev-python/sphinx-some-random-theme[${PYTHON_USEDEP}]"
}

python_compile_all {
  use doc && usual_stuff
}


-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] [PATCH 2/3] distutils-r1.eclass: distutils_enable_tests, handle no deps better

2019-11-16 Thread Michał Górny
On Fri, 2019-11-15 at 17:35 +0100, Michał Górny wrote:
> Do not set IUSE or other variables if the test runner does not have
> any deps, and RDEPEND is empty.
> 
> Signed-off-by: Michał Górny 
> ---
>  eclass/distutils-r1.eclass | 23 ---
>  1 file changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
> index 99da6f5111cd..f316f85c3fc8 100644
> --- a/eclass/distutils-r1.eclass
> +++ b/eclass/distutils-r1.eclass
> @@ -255,21 +255,16 @@ distutils_enable_tests() {
>   debug-print-function ${FUNCNAME} "${@}"
>   [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: 
> test-runner"
>  
> - [[ ${EAPI} == [56] ]] && local BDEPEND
> -
> - IUSE+=" test"
> - RESTRICT+=" !test? ( test )"
> - BDEPEND+=" test? ("
> -
> + local test_deps
>   case ${1} in
>   nose)
> - BDEPEND+=" dev-python/nose[${PYTHON_USEDEP}]"
> + test_deps="dev-python/nose[${PYTHON_USEDEP}]"
>   python_test() {
>   nosetests -v || die "Tests fail with ${EPYTHON}"
>   }
>   ;;
>   pytest)
> - BDEPEND+=" dev-python/pytest[${PYTHON_USEDEP}]"
> + test_deps="dev-python/pytest[${PYTHON_USEDEP}]"
>   python_test() {
>   pytest -vv || die "Tests fail with ${EPYTHON}"
>   }
> @@ -289,9 +284,15 @@ distutils_enable_tests() {
>   die "${FUNCNAME}: unsupported argument: ${1}"
>   esac
>  
> - BDEPEND+=" ${RDEPEND} )"
> -
> - [[ ${EAPI} == [56] ]] && DEPEND+=" ${BDEPEND}"
> + if [[ -n ${test_deps} || -n ${RDEPEND} ]]; then
> + IUSE+=" test"
> + RESTRICT+=" !test? ( test )"
> + if [[ ${EAPI} == [56] ]]; then
> + DEPEND+=" test? ( ${test_deps} ${RDEPEND} )"
> + else
> + BDEPEND+=" test? ( ${test_deps} ${RDEPEND} )"
> + fi
> + fi
>  
>   # we need to ensure successful return in case we're called last,
>   # otherwise Portage may wrongly assume sourcing failed

I've pushed this one already since it fixes invalid dependency syntax. 
I'll resend the other two with a small change.

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-dev] [PATCH v2 2/2] distutils-r1.eclass: Add tests for distutils_enable_tests

2019-11-16 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/tests/distutils-r1.sh | 67 +++-
 1 file changed, 66 insertions(+), 1 deletion(-)

diff --git a/eclass/tests/distutils-r1.sh b/eclass/tests/distutils-r1.sh
index d557f6cad534..d5f3e2812ca4 100755
--- a/eclass/tests/distutils-r1.sh
+++ b/eclass/tests/distutils-r1.sh
@@ -17,6 +17,36 @@ test-phase_name_free() {
fi
 }
 
+test-distutils_enable_tests() {
+   local runner=${1}
+   local exp_IUSE=${2}
+   local exp_RESTRICT=${3}
+   local exp_DEPEND=${4}
+
+   local IUSE=${IUSE}
+   local RESTRICT=${RESTRICT}
+   local DEPEND=${DEPEND}
+
+   tbegin "${runner}"
+
+   distutils_enable_tests "${runner}"
+
+   local ret var
+   for var in IUSE RESTRICT DEPEND; do
+   local exp_var=exp_${var}
+   if [[ ${!var} != "${!exp_var}" ]]; then
+   eindent
+   eerror "${var} expected: ${!exp_var}"
+   eerror "${var}   actual: ${!var}"
+   eoutdent
+   ret=1
+   tret=1
+   fi
+   done
+
+   tend ${ret}
+}
+
 inherit distutils-r1
 
 tbegin "sane function names"
@@ -27,6 +57,41 @@ test-phase_name_free python_compile
 test-phase_name_free python_test
 test-phase_name_free python_install
 
-tend ${failed}
+tend
+
+einfo distutils_enable_tests
+eindent
+BASE_IUSE="python_targets_python2_7"
+BASE_DEPS="python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) 
>=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]"
+TEST_RESTRICT=" !test? ( test )"
+
+einfo "empty RDEPEND"
+eindent
+RDEPEND=""
+test-distutils_enable_tests pytest \
+   "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( 
dev-python/pytest[${PYTHON_USEDEP}]  )"
+test-distutils_enable_tests nose \
+   "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( 
dev-python/nose[${PYTHON_USEDEP}]  )"
+test-distutils_enable_tests unittest \
+   "${BASE_IUSE}" "" "${BASE_DEPS}"
+test-distutils_enable_tests setup.py \
+   "${BASE_IUSE}" "" "${BASE_DEPS}"
+eoutdent
+
+einfo "non-empty RDEPEND"
+eindent
+BASE_RDEPEND="dev-python/foo[${PYTHON_USEDEP}]"
+RDEPEND=${BASE_RDEPEND}
+test-distutils_enable_tests pytest \
+   "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( 
dev-python/pytest[${PYTHON_USEDEP}] ${BASE_RDEPEND} )"
+test-distutils_enable_tests nose \
+   "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( 
dev-python/nose[${PYTHON_USEDEP}] ${BASE_RDEPEND} )"
+test-distutils_enable_tests unittest \
+   "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? (  
${BASE_RDEPEND} )"
+test-distutils_enable_tests setup.py \
+   "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? (  
${BASE_RDEPEND} )"
+eoutdent
+
+eoutdent
 
 texit
-- 
2.24.0




[gentoo-dev] [PATCH v2 1/2] distutils-r1.eclass: distutils_enable_tests, add 'setup.py' option

2019-11-16 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/distutils-r1.eclass | 6 ++
 1 file changed, 6 insertions(+)

Changed in v2: added '--verbose' to setup.py call

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e2cd076d4148..63e77bf014c1 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -241,6 +241,7 @@ fi
 #
 # - nose: nosetests (dev-python/nose)
 # - pytest: dev-python/pytest
+# - setup.py: setup.py test (no deps included)
 # - unittest: for built-in Python unittest module
 #
 # This function is meant as a helper for common use cases, and it only
@@ -268,6 +269,11 @@ distutils_enable_tests() {
pytest -vv || die "Tests fail with ${EPYTHON}"
}
;;
+   setup.py)
+   python_test() {
+   esetup.py test --verbose
+   }
+   ;;
unittest)
python_test() {
"${EPYTHON}" -m unittest discover -v ||
-- 
2.24.0




Re: [gentoo-dev] Package up for grabs: sys-firmware/iwl1000-ucode

2019-11-16 Thread Matt Turner
On Sat, Nov 16, 2019 at 1:06 AM Jaco Kroon  wrote:
>
> Hi,
>
> On 2019/11/15 21:35, Matt Turner wrote:
> > On Fri, Nov 15, 2019 at 2:20 AM Ulrich Mueller  wrote:
> >> The package is somewhat redundant, because sys-kernel/linux-firmware
> >> installs the same files. (Same for all other sys-firmware/iwl*-ucode
> >> packages.)
> > Should last-rite all of them, IMO.
> >
> I both agree and disagree with this.  It's the simpler solution and
> therefore I agree.
>
> I disagree because in some cases I really only want specific firmware
> for specific sets of hardware (especially where space constraints are an
> issue, read: embedded type systems).
>
> The current linux-firmware package is getting quite big in terms of install.

USE=savedconfig allows you to choose exactly which files to install :)



Re: [gentoo-dev] Package up for grabs: sys-firmware/iwl1000-ucode

2019-11-16 Thread Michael 'veremitz' Everitt
On 16/11/19 16:59, Matt Turner wrote:
> On Sat, Nov 16, 2019 at 1:06 AM Jaco Kroon  wrote:
>> Hi,
>>
>> On 2019/11/15 21:35, Matt Turner wrote:
>>> On Fri, Nov 15, 2019 at 2:20 AM Ulrich Mueller  wrote:
 The package is somewhat redundant, because sys-kernel/linux-firmware
 installs the same files. (Same for all other sys-firmware/iwl*-ucode
 packages.)
>>> Should last-rite all of them, IMO.
>>>
>> I both agree and disagree with this.  It's the simpler solution and
>> therefore I agree.
>>
>> I disagree because in some cases I really only want specific firmware
>> for specific sets of hardware (especially where space constraints are an
>> issue, read: embedded type systems).
>>
>> The current linux-firmware package is getting quite big in terms of install.
> USE=savedconfig allows you to choose exactly which files to install :)
>
I've never found a good way (yet...) to figure out how to write a fresh new
'savedconfig' if you haven't ever previously emerged the package in
question. Does anyone have a good method for this, that doesn't require
unpacking the whole nine yards (Megs, Gigs...) first?



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Why adding python3_8 to Gentoo sucks?

2019-11-16 Thread Ulrich Mueller
> On Fri, 15 Nov 2019, Michael Orlitzky wrote:

> Two things on that page are outright wrong:

>   1. If the package has stable keywords, they should be moved to the
>  new revision without dropping. To commit the ebuild, repoman
>  commit --straight-to-stable option should be used.

> That violates our other stabilization policies and common sense.

This is in the context of revision bumps, not version bumps. Also, the
item immediately preceding it clarifies that any non-trivial changes
require dropping to ~arch.

Ulrich


signature.asc
Description: PGP signature


Re: [gentoo-dev] Package up for grabs: sys-firmware/iwl1000-ucode

2019-11-16 Thread Jaco Kroon
Hi,

On 2019/11/16 19:08, Michael 'veremitz' Everitt wrote:
> On 16/11/19 16:59, Matt Turner wrote:
>> On Sat, Nov 16, 2019 at 1:06 AM Jaco Kroon  wrote:
>>> Hi,
>>>
>>> On 2019/11/15 21:35, Matt Turner wrote:
 On Fri, Nov 15, 2019 at 2:20 AM Ulrich Mueller  wrote:
> The package is somewhat redundant, because sys-kernel/linux-firmware
> installs the same files. (Same for all other sys-firmware/iwl*-ucode
> packages.)
 Should last-rite all of them, IMO.

>>> I both agree and disagree with this.  It's the simpler solution and
>>> therefore I agree.
>>>
>>> I disagree because in some cases I really only want specific firmware
>>> for specific sets of hardware (especially where space constraints are an
>>> issue, read: embedded type systems).
>>>
>>> The current linux-firmware package is getting quite big in terms of install.
>> USE=savedconfig allows you to choose exactly which files to install :)
>>
> I've never found a good way (yet...) to figure out how to write a fresh new
> 'savedconfig' if you haven't ever previously emerged the package in
> question. Does anyone have a good method for this, that doesn't require
> unpacking the whole nine yards (Megs, Gigs...) first?
>
I Agree.

And for that matter, knowing which files to actually install, and what
to filter out.  With the split packages I know I want firmware for
something specific.  With the big package it really is much harder. 
That said:  generally I just merge the big package by default, unless I
have a specific reason to not do so (which is seldom).

Bandwidth is much less of an issue now than it was a decade ago, but
still, if you only need a few MB of firmware, why download the whole lot
first?

Kind Regards,
Jaco