Re: [gentoo-portage-dev] [PATCH gentoolkit 1/2] eclean: Inline _sort_keys method

2019-12-04 Thread Matt Turner
On Wed, Dec 4, 2019 at 9:17 PM Zac Medico wrote: > > On 12/4/19 6:12 PM, Matt Turner wrote: > > The boilerplate for calling this method was larger than what it actually > > contained. Additionally I think this change will allow the loop to run > > on a generator

[gentoo-portage-dev] [PATCH gentoolkit 1/2] eclean: Inline _sort_keys method

2019-12-04 Thread Matt Turner
The boilerplate for calling this method was larger than what it actually contained. Additionally I think this change will allow the loop to run on a generator rather than a full list. Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/clean.py | 21 ++--- 1 file changed, 6

[gentoo-portage-dev] [PATCH gentoolkit 2/2] eclean: Delete empty directories

2019-12-04 Thread Matt Turner
Closes: https://bugs.gentoo.org/671592 Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/clean.py | 4 1 file changed, 4 insertions(+) diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py index b790de0..89300ce 100644 --- a/pym/gentoolkit/eclean/clean.py +++ b

Re: [gentoo-portage-dev] [PATCH gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-02 Thread Matt Turner
On Sun, Mar 1, 2020 at 10:39 PM Zac Medico wrote: > > On 2/20/20 9:29 PM, Matt Turner wrote: > > @@ -564,7 +577,22 @@ def findPackages( > > > > # Exclude if binpkg exists in the porttree and not --deep > > if not destructive

Re: [gentoo-portage-dev] [PATCH gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-02 Thread Matt Turner
On Sun, Mar 1, 2020 at 10:32 PM Zac Medico wrote: > > On 2/20/20 9:29 PM, Matt Turner wrote: > > + > > def findPackages( > > options, > > exclude=None, > > @@ -564,7 +577,22 @@ def findPackages( > > > > # Exclude

Re: [gentoo-portage-dev] [PATCH gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-02 Thread Matt Turner
On Mon, Mar 2, 2020 at 12:40 PM Matt Turner wrote: > > On Sun, Mar 1, 2020 at 10:32 PM Zac Medico wrote: > > > > On 2/20/20 9:29 PM, Matt Turner wrote: > > > + > > > def findPackages( > > > options, > > > exc

[gentoo-portage-dev] Re: [PATCH gentoolkit 1/2] eclean: Rewrite findPackages()

2020-02-20 Thread Matt Turner
On Thu, Feb 20, 2020 at 9:29 PM Matt Turner wrote: > > I found the original code to be nearly incomprehensible. Instead of > populating a dict of potential binpkgs to remove and then removing from > the to-be-removed list, just selectively add to-be-removed packages. > > S

[gentoo-portage-dev] [PATCH gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-02-20 Thread Matt Turner
Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/cli.py| 7 ++- pym/gentoolkit/eclean/search.py | 30 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py index 1a99b3e..39aafd3

[gentoo-portage-dev] [PATCH gentoolkit 1/2] eclean: Rewrite findPackages()

2020-02-20 Thread Matt Turner
I found the original code to be nearly incomprehensible. Instead of populating a dict of potential binpkgs to remove and then removing from the to-be-removed list, just selectively add to-be-removed packages. Signed-off-by: Matt Turner --- I switched from tabs to spaces in the process. I can

[gentoo-portage-dev] [PATCH gentoolkit 2/2] imlate: Dynamically calculate column width in report

2020-01-02 Thread Matt Turner
Also print categories on the line with the package name for much simpler consumption by external tools. Signed-off-by: Matt Turner --- pym/gentoolkit/imlate/imlate.py | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pym/gentoolkit/imlate/imlate.py b/pym

[gentoo-portage-dev] [PATCH gentoolkit 1/2] eclean: Fix typos

2020-01-02 Thread Matt Turner
Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/cli.py| 4 ++-- pym/gentoolkit/eclean/search.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py index 1d2f52b..1a99b3e 100644 --- a/pym/gentoolkit/eclean

Re: [gentoo-portage-dev] [PATCH gentoolkit 2/2] imlate: Dynamically calculate column width in report

2020-01-02 Thread Matt Turner
On Thu, Jan 2, 2020 at 12:41 PM Zac Medico wrote: > > On 1/2/20 10:58 AM, Matt Turner wrote: > > Also print categories on the line with the package name for much simpler > > consumption by external tools. > > > > Signed-off-by: Matt Turner > > --- >

Re: [gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-11 Thread Matt Turner
On Wed, Mar 11, 2020 at 9:36 PM Matt Turner wrote: > > On Wed, Mar 11, 2020 at 9:31 PM Zac Medico wrote: > > > > On 3/6/20 10:11 PM, Matt Turner wrote: > > > Signed-off-by: Matt Turner > > > --- > > > pym/gentoolkit/eclean/cli.py| 7 ++

Re: [gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-11 Thread Matt Turner
On Wed, Mar 11, 2020 at 10:23 PM Zac Medico wrote: > The coupling with --destructive logic complicates matters. It raises the > question, why isn't --time-limit logic also coupled with --destructive > logic? I think "in order to preserve the status quo" is a reasonable > answer to this question.

Re: [gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-11 Thread Matt Turner
On Wed, Mar 11, 2020 at 9:31 PM Zac Medico wrote: > > On 3/6/20 10:11 PM, Matt Turner wrote: > > Signed-off-by: Matt Turner > > --- > > pym/gentoolkit/eclean/cli.py| 7 ++- > > pym/gentoolkit/eclean/search.py | 24 +++- > >

Re: [gentoo-portage-dev] [PATCH gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-06 Thread Matt Turner
On Mon, Mar 2, 2020 at 9:15 PM Zac Medico wrote: > > On 3/2/20 1:11 PM, Matt Turner wrote: > > On Sun, Mar 1, 2020 at 10:39 PM Zac Medico wrote: > >> > >> On 2/20/20 9:29 PM, Matt Turner wrote: > >>> @@ -564,7 +577,22 @@ def findPackages( >

[gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-06 Thread Matt Turner
Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/cli.py| 7 ++- pym/gentoolkit/eclean/search.py | 24 +++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py index 1a99b3e..39aafd3 100644

[gentoo-portage-dev] [PATCH v2 gentoolkit 1/2] eclean: Rewrite findPackages()

2020-03-06 Thread Matt Turner
I found the original code to be nearly incomprehensible. Instead of populating a dict of potential binpkgs to remove and then removing from the to-be-removed list, just selectively add to-be-removed packages. Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/search.py | 113

Re: [gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps

2020-03-11 Thread Matt Turner
On Tue, Mar 10, 2020 at 8:30 PM Zac Medico wrote: > > On 3/6/20 10:11 PM, Matt Turner wrote: > > +def _deps_equal(deps_a, deps_b, eapi, uselist=None): > > + """Compare two dependency lists given a set of USE flags""" > > + i

[gentoo-portage-dev] [PATCH] Change BINPKG_COMPRESS default from bzip2 to xz

2020-04-26 Thread Matt Turner
Bug: https://bugs.gentoo.org/715108 Signed-off-by: Matt Turner --- Strawman patch. Bikeshed away. bin/quickpkg | 2 +- lib/portage/package/ebuild/doebuild.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/quickpkg b/bin/quickpkg index

[gentoo-portage-dev] [PATCH] man/make.conf.5: Mention eclean in PKGDIR section

2020-04-26 Thread Matt Turner
And remove obsolete text from binpkg-multi-instance. I believe this was obsolete even before my gentoolkit patches that add the --changed-deps flag to eclean packages. Signed-off-by: Matt Turner --- man/make.conf.5 | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/man

Re: [gentoo-portage-dev] [PATCH] Change BINPKG_COMPRESS default from bzip2 to xz

2020-04-26 Thread Matt Turner
On Sun, Apr 26, 2020 at 12:29 PM Michał Górny wrote: > > On Sun, 2020-04-26 at 09:55 -0700, Matt Turner wrote: > > Bug: https://bugs.gentoo.org/715108 > > Signed-off-by: Matt Turner > > --- > > Strawman patch. Bikeshed away. > > > > xz is generally slow

Re: [gentoo-portage-dev] [PATCH 0/2] emerge: Add short -l option for --load-average (bug 699256)

2020-08-15 Thread Matt Turner
On Sat, Aug 15, 2020 at 12:27 PM Zac Medico wrote: > > Add a short -l option for --load-average just like make(1) has. That's awesome, thank you. That'll make some catalyst work easier for me.

[gentoo-portage-dev] Re: [RFC PATCH gentoolkit] bin: Add merge-driver-ekeyword

2020-12-23 Thread Matt Turner
On Wed, Dec 23, 2020 at 2:46 PM Junio C Hamano wrote: > > Matt Turner writes: > > > I want to handle conflicts automatically on lines like > > > >> KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv > >> ~s390 ~sparc ~x8

Re: [gentoo-portage-dev] [PATCH] Drop Python 2 comatibility in extension modules

2020-12-24 Thread Matt Turner
Typo in commit title: comatibility

[gentoo-portage-dev] [PATCH gentoolkit 5/4] Remove unused sys imports

2020-12-20 Thread Matt Turner
Reported by flake8. Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/exclude.py | 1 - pym/gentoolkit/enalyze/rebuild.py| 1 - pym/gentoolkit/helpers.py| 1 - pym/gentoolkit/revdep_rebuild/analyse.py | 1 - pym/gentoolkit/revdep_rebuild/cache.py | 1 - pym

[gentoo-portage-dev] [PATCH gentoolkit 2/3] ekeyword: Fix unit test

2020-12-20 Thread Matt Turner
arch_status changed from a Dict[str] to Dict[Tuple[str, str]], but these bits of test data were not updated. Update the examples while we're here (e.g. arm64 is stable with stable profiles now). Fixes: 459cfba47d25 (ekeyword: Use now-common load_profile_data() from eshowkw) Signed-off-by: Matt

[gentoo-portage-dev] [PATCH gentoolkit 3/3] eclean: Remove unneeded __init__ to enable pytest

2020-12-20 Thread Matt Turner
Prevented the unit test from running: pym/gentoolkit/test/eclean/distsupport.py:435: PytestCollectionWarning: cannot collect test class 'TestDisfiles' because it has a __init__ constructor (from: pym/gentoolkit/test/eclean/test_search.py) Signed-off-by: Matt Turner --- pym/gentoolkit/test

[gentoo-portage-dev] [PATCH gentoolkit 1/3] ekeyword: Rename unit test so that it runs

2020-12-20 Thread Matt Turner
unittests should be named test_*.py so that they are discoverable. Signed-off-by: Matt Turner --- pym/gentoolkit/ekeyword/pytest.ini | 2 +- .../ekeyword/{ekeyword_unittest.py => test_ekeyword.py} | 2 +- 2 files changed, 2 insertions(+), 2 deleti

[gentoo-portage-dev] [RFC PATCH gentoolkit] bin: Add merge-driver-ekeyword

2020-12-20 Thread Matt Turner
ibutesfile = ~/.gitattributes [merge "keywords"] name = KEYWORDS merge driver driver = merge-driver-ekeyword %O %A %B ~/.gitattributes: *.ebuild merge=keywords Signed-off-by: Matt Turner --- One annoying wart in the program is due to th

[gentoo-portage-dev] Re: [RFC PATCH gentoolkit] bin: Add merge-driver-ekeyword

2020-12-22 Thread Matt Turner
e driver, it automatically resolves the conflict. > > gentoo.git/.git/config: > > [core] > ... > attributesfile = ~/.gitattributes > [merge "keywords"] > name = KEYWORDS merge driver >

[gentoo-portage-dev] [PATCH gentoolkit 2/4] Remove $Header$

2020-12-20 Thread Matt Turner
Signed-off-by: Matt Turner --- bin/ekeyword | 2 -- bin/enalyze | 2 -- bin/epkginfo | 2 -- bin/equery| 2 -- bin/euse | 2 -- bin/imlate

[gentoo-portage-dev] [PATCH gentoolkit 3/4] Remove Python < 3 version checks

2020-12-20 Thread Matt Turner
Signed-off-by: Matt Turner --- pym/gentoolkit/eclean/exclude.py | 2 -- pym/gentoolkit/enalyze/rebuild.py | 2 -- pym/gentoolkit/equery/uses.py | 2 -- pym/gentoolkit/equery/which.py| 2 -- pym/gentoolkit/helpers.py | 2 -- pym

[gentoo-portage-dev] [PATCH gentoolkit 4/4] Remove inherits from object

2020-12-20 Thread Matt Turner
Signed-off-by: Matt Turner --- pym/gentoolkit/cpv.py | 2 +- pym/gentoolkit/eclean/clean.py| 2 +- pym/gentoolkit/eclean/output.py | 2 +- pym/gentoolkit/eclean/pkgindex.py | 2 +- pym/gentoolkit/eclean/search.py | 2 +- pym/gentoolkit

[gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__

2020-12-20 Thread Matt Turner
gentoolkit supports only Python 3.6+ now, so these are not used. Signed-off-by: Matt Turner --- bin/eclean | 3 --- bin/eclean-dist | 3 --- bin/eclean-pkg | 3 --- bin/ekeyword

[gentoo-portage-dev] [PATCH gentoolkit] bin: Add merge-driver-ekeyword

2020-12-28 Thread Matt Turner
gentoo.git as such: gentoo.git/.git/config: [merge "keywords"] name = KEYWORDS merge driver driver = merge-driver-ekeyword %O %A %B %P gentoo.git/.git/info/attributes: *.ebuild merge=keywords Signed-off-by: Matt Turner --- bin/merge-d

[gentoo-portage-dev] [PATCH] Add @changed-subslot package set

2021-01-15 Thread Matt Turner
to Zac Medico for showing me how to do this. Bug: https://bugs.gentoo.org/739004 Signed-off-by: Matt Turner --- cnf/sets/portage.conf | 5 + lib/portage/_sets/dbapi.py | 39 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/cnf/sets/po

[gentoo-portage-dev] [PATCH gentoolkit] gentoolkit: Remove gentoolkit.test.cmp

2021-01-04 Thread Matt Turner
Signed-off-by: Matt Turner --- Seems to only be used by duplicated unit tests? I guess this might have been useful when Python 2 was still supported? pym/gentoolkit/test/__init__.py | 23 --- pym/gentoolkit/test/test_atom.py | 15 --- pym/gentoolkit/test

[gentoo-portage-dev] [PATCH gentoolkit] eclean: Add --changed-iuse flag

2021-01-02 Thread Matt Turner
Allows binpkgs to be deleted if they are not usable due to IUSE changes. --- Just kind of spitballing. I'm not sure about what USE flags we should ignore or whether it should be configurable, etc. On one hand, deleting binpkgs that don't have a newly added PYTHON_TARGET option might make sense if

[gentoo-portage-dev] [PATCH gentoolkit] equery: Remove 'changes' subcommand

2021-01-04 Thread Matt Turner
ChangeLogs have been gone from gentoo.git since the beginning, and Council agreed in 2016 to allow Infra to decide whether to distribute them through rsync, which they have decided not to do [1]. [1] https://projects.gentoo.org/council/meeting-logs/20160410-summary.txt Signed-off-by: Matt Turner

[gentoo-portage-dev] [PATCH gentoolkit] bin: Add merge-driver-ekeyword

2020-12-31 Thread Matt Turner
gentoo.git as such: gentoo.git/.git/config: [merge "keywords"] name = KEYWORDS merge driver driver = merge-driver-ekeyword %O %A %B %P gentoo.git/.git/info/attributes: *.ebuild merge=keywords Signed-off-by: Matt Turner --- v3: Address

Re: [gentoo-portage-dev] [PATCH gentoolkit] bin: Add merge-driver-ekeyword

2020-12-31 Thread Matt Turner
On Mon, Dec 28, 2020 at 8:09 PM Zac Medico wrote: > > On 12/28/20 3:15 PM, Matt Turner wrote: > > +def apply_keyword_changes(ebuild: str, pathname: str, > > + changes: List[Tuple[Optional[str], > > +

[gentoo-portage-dev] [PATCH] Mark EAPIs "4-python" and "5-progress" as deprecated

2021-03-04 Thread Matt Turner
Signed-off-by: Matt Turner --- I've asked Arfrever multiple times if these are still used anywhere, and he seemingly has not responded intentionally. According to https://bugs.gentoo.org/174536#c27 these EAPIs were only used in Arfrever's personal overlay, and even in 2012 there were questions

[gentoo-portage-dev] [PATCH] Use asyncio.subprocess.Process directly

2021-03-04 Thread Matt Turner
With no need to support Python 2, we can remove our private implementation. Signed-off-by: Matt Turner --- I don't know how to test this. I intentionally broke the return value of create_subprocess_exec and didn't see any bad results. lib/portage/util/futures/_asyncio/__init__.py | 8 +- lib

[gentoo-portage-dev] [PATCH 1/3] Remove Python 2 workaround

2021-03-04 Thread Matt Turner
Signed-off-by: Matt Turner --- lib/portage/__init__.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 184db6ae2..1d202f557 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -484,11 +484,7 @@ def

[gentoo-portage-dev] [PATCH 2/3] Remove outdated mention of Python 2 from comment

2021-03-04 Thread Matt Turner
Fixes: 5e9fe0f2a ("Eliminate basestring/long/_unicode py3 compat") Signed-off-by: Matt Turner --- lib/portage/versions.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/portage/versions.py b/lib/portage/versions.py index 317683b17..1dc942124 100644

[gentoo-portage-dev] [PATCH 3/3] lib: Remove outdated Python 2 comments

2021-03-04 Thread Matt Turner
Fixes: 788c0e8bb ("Remove from __future__ import unicode_literals") Signed-off-by: Matt Turner --- bin/egencache | 2 -- lib/_emerge/Package.py | 9 - lib/_emerge/Scheduler.py| 2 -- l

[gentoo-portage-dev] Changing the VDB format

2022-03-13 Thread Matt Turner
The VDB uses a one-file-per-variable format. This has some inefficiencies, with many file systems. For example the 'EAPI' file that contains a single character will consume a 4K block on disk. $ cd /var/db/pkg/sys-apps/portage-3.0.30-r1/ $ ls -lh --block-size=1 | awk 'BEGIN { sum = 0; } { sum +=

[gentoo-portage-dev] [PATCH 3/4] portage.eapi: move None check to helper functions

2022-02-23 Thread Matt Turner
From: "Wolfgang E. Sanyer" Reviewed-by: Matt Turner Signed-off-by: Wolfgang E. Sanyer --- lib/portage/eapi.py | 162 +--- 1 file changed, 121 insertions(+), 41 deletions(-) diff --git a/lib/portage/eapi.py b/lib/portage/eapi.py index

[gentoo-portage-dev] [PATCH 4/4] portage.eapi: use functools @lru_cache decorator instead of custom implementation

2022-02-23 Thread Matt Turner
From: "Wolfgang E. Sanyer" Reviewed-by: Matt Turner Signed-off-by: Wolfgang E. Sanyer --- lib/portage/eapi.py | 155 1 file changed, 72 insertions(+), 83 deletions(-) diff --git a/lib/portage/eapi.py b/lib/portage/eapi.py index

[gentoo-portage-dev] [PATCH 1/4] portage.dep.Atom: Clean up __new__ parameters

2022-02-23 Thread Matt Turner
From: "Wolfgang E. Sanyer" Reviewed-by: Matt Turner Signed-off-by: Wolfgang E. Sanyer --- lib/portage/dep/__init__.py | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/portage/dep/__init__.py b/lib/portage/dep/__init__.py index 3b3577025..13c0f4

[gentoo-portage-dev] [PATCH 2/4] portage.eapi: use tuple instead of str for namedtuple definition

2022-02-23 Thread Matt Turner
From: "Wolfgang E. Sanyer" Reviewed-by: Matt Turner Signed-off-by: Wolfgang E. Sanyer --- lib/portage/eapi.py | 52 - 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/lib/portage/eapi.py b/lib/portage/eapi.py index

[gentoo-portage-dev] [PATCH 1/2] Remove support for EAPIs "4-python" and "5-progress"

2022-02-21 Thread Matt Turner
Signed-off-by: Matt Turner --- GitHub PR: https://github.com/gentoo/portage/pull/789 bin/dohtml.py | 2 - bin/eapi.sh | 116 bin/phase-functions.sh| 4 +- bin/phase-helpers.sh

[gentoo-portage-dev] [PATCH 2/2] Eliminate now-dead code from EAPIs 4-python and 5-progress

2022-02-21 Thread Matt Turner
Signed-off-by: Matt Turner --- bin/eapi.sh | 32 bin/ebuild.sh | 9 - bin/phase-helpers.sh | 166 -- bin/portageq | 5 +- bin/save-ebuild-env.sh