Re: [gentoo-portage-dev] usage of /bin/bash in shebangs

2022-07-25 Thread Zac Medico
On 7/24/22 23:17, Fabian Groffen wrote: On 24-07-2022 13:58:31 -0700, Zac Medico wrote: On 7/24/22 12:29, Fabian Groffen wrote: Hi, Quick question, I noticed that portage uses /bin/bash hardcoded in shebang of scripts, while it uses /usr/bin/env python for python executable files

Re: [gentoo-portage-dev] usage of /bin/bash in shebangs

2022-07-24 Thread Zac Medico
On 7/24/22 12:29, Fabian Groffen wrote: Hi, Quick question, I noticed that portage uses /bin/bash hardcoded in shebang of scripts, while it uses /usr/bin/env python for python executable files. Is there anything against using /usr/bin/env bash for shell scripts? Changing this would help for

Re: [gentoo-portage-dev] Normaliser function for distfiles

2022-05-16 Thread Zac Medico
On 5/16/22 10:37, Markus Walter wrote: Hello all, is it possible to do the following: after fetching a distfile portage runs an external normaliser program specified in an ebuild before checking the hash? My use case is the following: I would like to improve the gs-elpa program and provide a

[gentoo-portage-dev] [PATCH] MergeProcess: propagate mtimedb["ldpath"] to parent process (bug 836375)

2022-04-17 Thread Zac Medico
Use an instance of multiprocessing.Pipe to propagate mtimedb["ldpath"] from the MergeProcess child process to the parent process. This fixes env_update calls to avoid unnecessary regeneration of ld.so.cache in cases where mtimedb["ldpath"] has not changed since the last call to env_update. Bug:

Re: [gentoo-portage-dev] The build system (and install layout) of Portage

2022-03-18 Thread Zac Medico
On 3/17/22 10:22, Michał Górny wrote: Hi, everyone. You've probably had the opportunity to hear that a lot has changed in Python packaging since Portage's setup.py was written in 2014. There were some minor changes to keep it working since but it's time to reconsider. Long story short,

[gentoo-portage-dev] [PATCH] Revert "dep_zapdeps: avoid new slots when appropriate (bug 828136)"

2022-03-05 Thread Zac Medico
Revert the change from bug 828136, since it prevents solving of some blockers unless --update and --deep are specified as reported in bug 833014. Bug: https://bugs.gentoo.org/833014 Reverts: a7289ac0eaaa0d435bf6d9bfb2724a6b39adcbee Signed-off-by: Zac Medico --- lib/portage/dep/dep_check.py

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

2022-02-26 Thread Zac Medico
On 2/26/22 10:04, Zac Medico wrote: On 2/23/22 20:14, Matt Turner wrote: 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

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

2022-02-26 Thread Zac Medico
On 2/23/22 20:14, Matt Turner wrote: 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

Re: [gentoo-portage-dev] [PATCH] repoman: Remove http compatibility code for metadata DTD

2022-01-29 Thread Zac Medico
On 1/25/22 08:44, Ulrich Müller wrote: Commit 3950d76df says: "The http:// compat can be removed once the Gentoo repository is updated to use https:// everywhere." Bug: https://bugs.gentoo.org/552720 Signed-off-by: Ulrich Müller --- repoman/lib/repoman/modules/scan/metadata/pkgmetadata.py |

[gentoo-portage-dev] [PATCH] file_copy: handle zero bytes copied by copy_file_range (bug 828844)

2021-12-11 Thread Zac Medico
When copy_file_range copied zero bytes, fall back to sendfile, so that we don't call copy_file_range in an infinite loop. Bug: https://bugs.gentoo.org/828844 Tested-by: John Helmert III Signed-off-by: Zac Medico --- src/portage_util_file_copy_reflink_linux.c | 7 --- 1 file changed, 4

[gentoo-portage-dev] [PATCH] dep_zapdeps: avoid new slots when appropriate (bug 828136)

2021-12-05 Thread Zac Medico
Place choices that do not pull in new slots into a preferred choice bin, so that they will not be mixed with choices that contain unnecessary upgrades. This fixes the included test case so that an unnecessary new python slot is not pulled in. Bug: https://bugs.gentoo.org/828136 Signed-off-by: Zac

[gentoo-portage-dev] [PATCH] emerge: Default enable soname dependencies (bug 687956)

2021-11-28 Thread Zac Medico
. Bug: https://bugs.gentoo.org/687956 Signed-off-by: Zac Medico --- lib/_emerge/create_depgraph_params.py | 2 +- man/emerge.1 | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/_emerge/create_depgraph_params.py b/lib/_emerge

Re: [gentoo-portage-dev] [PATCH] Install example repo.postsync.d script into sharedir

2021-11-08 Thread Zac Medico
On 11/4/21 02:50, Daniel Cordero wrote: The sysconfdir is for host specific configuration files, and this example script makes no host specific change (it is not enabled by default). Install the script under portage's sharedir, from where administrators can copy it into sysconfdir, if needed.

[gentoo-portage-dev] Re: [PATCH] EbuildIpc.communicate: lockfile PermissionDenied retry

2021-11-06 Thread Zac Medico
On 11/3/21 20:09, Zac Medico wrote: The lockfile function is expected to raise PermissionDenied if the (root) parent process holds the lock, so retry in this case. Bug: https://bugs.gentoo.org/468990 Signed-off-by: Zac Medico --- bin/ebuild-ipc.py | 11 ++- 1 file changed, 10

[gentoo-portage-dev] [PATCH] EbuildIpcDaemon: fix lock permission race

2021-11-06 Thread Zac Medico
/468990 Signed-off-by: Zac Medico --- bin/ebuild-ipc.py| 6 +++--- bin/phase-functions.sh | 4 ++-- lib/_emerge/AbstractEbuildProcess.py | 4 ++-- lib/_emerge/EbuildIpcDaemon.py | 2 +- lib/portage/package/ebuild

[gentoo-portage-dev] [PATCH] fetch: enable resume for digestgen case

2021-11-04 Thread Zac Medico
, can't update Manifest Bug: https://bugs.gentoo.org/821571 Signed-off-by: Zac Medico --- lib/portage/package/ebuild/fetch.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py index 8c64362c2

[gentoo-portage-dev] [PATCH] EbuildIpc.communicate: lockfile PermissionDenied retry

2021-11-03 Thread Zac Medico
The lockfile function is expected to raise PermissionDenied if the (root) parent process holds the lock, so retry in this case. Bug: https://bugs.gentoo.org/468990 Signed-off-by: Zac Medico --- bin/ebuild-ipc.py | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin

Re: [gentoo-portage-dev] [PATCH] bin/estrip: avoid copying directories in FEATURES=installsources

2021-07-17 Thread Zac Medico
On 7/17/21 12:59 PM, Sergei Trofimovich wrote: > Initially problem is noticed on gcc-11 as a full ${WORKDIR} syncing > into /usr/src/debug. It happens because `debug.sources` sometimes > contains directory. For example on bash-5 it has: > > $ grep -zv '/<[^/>]*>$' debug.sources | LANG=C sort

Re: [gentoo-portage-dev] [PATCH] man/make.conf.5: remove mention of zlib USE flag

2021-07-04 Thread Zac Medico
On 6/28/21 2:56 PM, Thymo van Beers wrote: > Both sys-devel/binutils and sys-devel/gdb are built with system zlib by > default for some time now. This commit removes the mention of USE=zlib to > avoid > confusion. > > Signed-off-by: Thymo van Beers > --- > man/make.conf.5 | 3 +-- > 1 file

[gentoo-portage-dev] Re: [PATCH v2] Add @unsatisfied-deps package set (bug 248026)

2021-06-19 Thread Zac Medico
On 6/18/21 8:29 PM, Zac Medico wrote: > On 6/18/21 8:13 PM, Zac Medico wrote: >> On 6/18/21 6:01 PM, Zac Medico wrote: >>> If emerge --depclean fails to resolve any dependencies, then it will >>> now suggest emerge @unsatisfied-deps as the simplest possible >>

[gentoo-portage-dev] Re: [PATCH v2] Add @unsatisfied-deps package set (bug 248026)

2021-06-18 Thread Zac Medico
On 6/18/21 8:13 PM, Zac Medico wrote: > On 6/18/21 6:01 PM, Zac Medico wrote: >> If emerge --depclean fails to resolve any dependencies, then it will >> now suggest emerge @unsatisfied-deps as the simplest possible >> solution, and will also suggest to unmerge @unavailable

[gentoo-portage-dev] Re: [PATCH v2] Add @unsatisfied-deps package set (bug 248026)

2021-06-18 Thread Zac Medico
On 6/18/21 6:01 PM, Zac Medico wrote: > If emerge --depclean fails to resolve any dependencies, then it will > now suggest emerge @unsatisfied-deps as the simplest possible > solution, and will also suggest to unmerge @unavailable where > appropriate at the end: > > $

[gentoo-portage-dev] [PATCH v2] Add @unsatisfied-deps package set (bug 248026)

2021-06-18 Thread Zac Medico
to examine * the resulting package list carefully: * * emerge --ask --unmerge @unavailable * Bug: https://bugs.gentoo.org/248026 Signed-off-by: Zac Medico --- [PATCH v2] Update --depclean message to suggest @unsatisfied-deps and unmerge @unavailable where appropriate. cnf/sets

Re: [gentoo-portage-dev] Installed pkg list in dependency order ?

2021-06-14 Thread Zac Medico
On 6/14/21 8:16 AM, Joakim Tjernlund wrote: > Hi > > I need to generate a pkg list from an uptodate gentoo system too feed this > list into qmerge > so qmerge can install these pkgs in correct order. > > Tried emerge -e but that list is not in dep order, seems to be just a list > with pkgs to

Re: [gentoo-portage-dev] [PATCH v2 2/2] ebuild.5: Add eapply documentation

2021-04-24 Thread Zac Medico
On 4/10/21 6:23 PM, Nekun wrote: > Signed-off-by: Nekun > --- > man/ebuild.5 | 20 > 1 file changed, 20 insertions(+) Thank you! I've merged these and noted it on the bug here: https://bugs.gentoo.org/698244#c1 Thanks, Zac signature.asc Description: OpenPGP digital

[gentoo-portage-dev] [PATCH] emerge: use parse_intermixed_args when available (bug 784566)

2021-04-20 Thread Zac Medico
The included unit test case previously failed with this error: emerge: error: unrecognized arguments: dev-libs/A Bug: https://bugs.gentoo.org/784566 Signed-off-by: Zac Medico --- lib/_emerge/main.py | 2 +- lib/portage/tests/emerge/test_simple.py | 10 +- 2 files

Re: [gentoo-portage-dev] profile-formats not respected ?

2021-04-20 Thread Zac Medico
On 4/20/21 5:03 AM, Joakim Tjernlund wrote: > On Mon, 2021-04-19 at 14:10 -0700, Zac Medico wrote: >> On 4/19/21 6:36 AM, Joakim Tjernlund wrote: >>> I got an embedded ppc32 system which I build in a QEMU user chroot and I >>> cannot >>> make the profile

Re: [gentoo-portage-dev] profile-formats not respected ?

2021-04-19 Thread Zac Medico
On 4/19/21 6:36 AM, Joakim Tjernlund wrote: > I got an embedded ppc32 system which I build in a QEMU user chroot and I > cannot > make the profile-formats = portage-2 profile-bashrcs profile-set in my own > profiles layout.conf > work for me. > Seems like portage just ignores this setting and I

[gentoo-portage-dev] [PATCH] make.conf.5: Sugest PORTAGE_LOG_FILTER_FILE_CMD supervisor for cat fallback (bug 781854)

2021-04-09 Thread Zac Medico
If PORTAGE_LOG_FILTER_FILE_CMD fails after exec, then output will be lost. Therefore, suggest to use bash as a supervisor, with fallback to cat. Bug: https://bugs.gentoo.org/781854 Signed-off-by: Zac Medico --- man/make.conf.5 | 15 +-- 1 file changed, 13 insertions(+), 2 deletions

Re: [gentoo-portage-dev] Implement new userpatch feature in existing eclass?

2021-04-04 Thread Zac Medico
On 4/4/21 10:54 AM, Nekun wrote: > Hi all. > > Recently, I start working on optional atom specifiers feature in > userpatch facility: if package directory name starts with percent sign, > following word threated as a regular Portage atom, e.g >

Re: [gentoo-portage-dev] Implement new userpatch feature in existing eclass?

2021-04-04 Thread Zac Medico
On 4/4/21 10:54 AM, Nekun wrote: > Hi all. > > Recently, I start working on optional atom specifiers feature in > userpatch facility: if package directory name starts with percent sign, > following word threated as a regular Portage atom, e.g >

Re: [gentoo-portage-dev] [PATCH] Use atomic_ofstream as Context Manager i.e., with-statement contexts

2021-03-16 Thread Zac Medico
On 3/8/21 11:25 PM, Florian Schmaus wrote: > With [1: e93e6d65fa1c] atomic_ofstream became a Context Manager. This > commit transforms three further call sites of atomic_ofstream() to use > with-statement contexts for easier readability and increased > robustness against resource leaks. > > 1:

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

2021-03-06 Thread Zac Medico
On 3/4/21 11:35 AM, Matt Turner wrote: > 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

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

2021-03-06 Thread Zac Medico
On 3/4/21 11:24 AM, Matt Turner wrote: > 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. > >

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

2021-03-06 Thread Zac Medico
On 3/4/21 11:23 AM, Matt Turner wrote: > 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

[gentoo-portage-dev] [PATCH] emerge: make --binpkg-respect-use=y imply --autounmask-use=n

2021-03-01 Thread Zac Medico
If --binpkg-respect-use=y is given explicitly, then it implies --autounmask-use=n, because these options naturally oppose eachother. Bug: https://bugs.gentoo.org/773469 Signed-off-by: Zac Medico --- lib/_emerge/create_depgraph_params.py | 22 ++--- lib/portage/tests

[gentoo-portage-dev] Planning to publish portage releases on pypi

2021-02-28 Thread Zac Medico
I'd like to begin publishing portage releases on pypi here: https://pypi.org/project/portage It won't allow me to create the the project, so I've opened this ticket to claim it: https://github.com/pypa/pypi-support/issues/934 -- Thanks, Zac signature.asc Description: OpenPGP digital

[gentoo-portage-dev] [PATCH v3] emirrordist: add --content-db option required for content-hash layout (bug 756778)

2021-02-26 Thread Zac Medico
dictionary of digests which is suitable for construction of a DistfileName instance. Bug: https://bugs.gentoo.org/756778 Signed-off-by: Zac Medico --- [PATCH v3] changed the value associated with a digest key is a set of file name, and fixed ContentDB.remove to preserved independent references to

[gentoo-portage-dev] [PATCH] make.globals: make FEATURES=-binpkg-multi-instance sticky for existing installs

2021-02-26 Thread Zac Medico
Signed-off-by: Zac Medico --- .../_compat_upgrade/binpkg_multi_instance.py | 33 +++ 1 file changed, 33 insertions(+) create mode 100644 lib/portage/_compat_upgrade/binpkg_multi_instance.py diff --git a/lib/portage/_compat_upgrade/binpkg_multi_instance.py b/lib/portage

[gentoo-portage-dev] [PATCH v2] emirrordist: add --content-db option required for content-hash layout (bug 756778)

2021-02-26 Thread Zac Medico
dictionary of digests which is suitable for construction of a DistfileName instance. Bug: https://bugs.gentoo.org/756778 Signed-off-by: Zac Medico --- [PATCH v2] Split out ContentDB class and associate distfile key with a set of content revisions, where each content revision is expressed as a dictionary

[gentoo-portage-dev] [PATCH] emirrordist: add --content-db option required for content-hash layout (bug 756778)

2021-02-24 Thread Zac Medico
, the prefix is the hash algorithm name. For filename keys, the prefix is "filename". The values for digest keys are plain filenames, and the values for distfile keys are dictionaries of digests suitable for construction of DistfileName instances. Bug: https://bugs.gentoo.org/756778 Signed-off-by:

[gentoo-portage-dev] Re: [PATCH] repoman: revert preserve_old_lib deprecation (bug 480244)

2021-02-24 Thread Zac Medico
On 2/23/21 3:41 PM, Zac Medico wrote: > Repoman should not report that preserve_old_lib is deprecated, > since preserve-libs is not covered by PMS. > This reverts commit 49cbc17bf7b99be586e158c1bd588cfe91dfe58c. > > Bug: https://bugs.gentoo.org/480244 > Bug: https://bugs

[gentoo-portage-dev] [PATCH] repoman: revert preserve_old_lib deprecation (bug 480244)

2021-02-23 Thread Zac Medico
Repoman should not report that preserve_old_lib is deprecated, since preserve-libs is not covered by PMS. This reverts commit 49cbc17bf7b99be586e158c1bd588cfe91dfe58c. Bug: https://bugs.gentoo.org/480244 Bug: https://bugs.gentoo.org/692486 Signed-off-by: Zac Medico --- repoman/cnf/linechecks

[gentoo-portage-dev] [PATCH] Add content-hash distfiles layout (bug 756778)

2021-02-21 Thread Zac Medico
the mirror. 3) File integrity data is integrated into the layout itself, making it very simple to verify the integrity of any file that it contains. The only tool required is an implementation of the chosen hash algorithm. Bug: https://bugs.gentoo.org/756778 Signed-off-by: Zac Medico --- lib/portage

[gentoo-portage-dev] [PATCH] make.defaults: prevent USE="${USE} ..." misbehavior

2021-02-18 Thread Zac Medico
Bug: https://bugs.gentoo.org/771549 Signed-off-by: Zac Medico --- lib/portage/package/ebuild/config.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py index e5ec681af..638c72959 100644 --- a/l

[gentoo-portage-dev] [PATCH] portage.getpid: call os.getpid() lazily

2021-01-30 Thread Zac Medico
Call os.getpid() lazily, which eliminates getpid calls when possible after os.fork() in the portage.process module. Bug: https://bugs.gentoo.org/767913 Signed-off-by: Zac Medico --- lib/portage/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/portage

[gentoo-portage-dev] [PATCH] emerge: disable --autounmask-license by default

2021-01-30 Thread Zac Medico
autounmask, then --autounmask-license=y has no effect. Bug: https://bugs.gentoo.org/766773 Signed-off-by: Zac Medico --- lib/_emerge/create_depgraph_params.py | 8 +++--- lib/portage/tests/resolver/test_autounmask.py | 25 +-- man/emerge.1

[gentoo-portage-dev] [PATCH] emaint --fix merges: add -y, --yes option

2021-01-23 Thread Zac Medico
Since the emaint --fix merges uses emerge --ask, add a -y, --yes option to use --ask=n instead. Bug: https://bugs.gentoo.org/766767 Signed-off-by: Zac Medico --- lib/portage/emaint/modules/merges/__init__.py | 14 -- lib/portage/emaint/modules/merges/merges.py | 11

[gentoo-portage-dev] [PATCH] binarytree.move_ent: copy on write for package move

2021-01-19 Thread Zac Medico
simply assume that the package will be deleted by eclean-pkg when its time comes. Bug: https://bugs.gentoo.org/766012 Signed-off-by: Zac Medico --- lib/portage/dbapi/bintree.py | 40 --- lib/portage/emaint/modules/move/move.py | 13 ++-- lib/portage/tests/update

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

2021-01-18 Thread Zac Medico
On 1/18/21 8:42 PM, Alec Warner wrote: > On Mon, Jan 18, 2021 at 8:09 PM Zac Medico wrote: >> >> On 1/18/21 6:07 PM, Alec Warner wrote: >>> On Fri, Jan 15, 2021 at 6:47 PM Matt Turner wrote: >>>> >>>> This set is the upgradable packages for which

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

2021-01-18 Thread Zac Medico
complete-graph --rebuild-if-new-ver gcc") and spend too much time >> updating seed stages for no gain beyond updating only packages for whom >> the subslot has changed. >> >> With this set, catalyst will likely use >> >> emerge @changed-subslot --ign

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

2021-01-09 Thread Zac Medico
On 1/4/21 10:44 AM, Matt Turner wrote: > 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]

[gentoo-portage-dev] Re: [PATCH] global_event_loop: return running loop for current thread

2021-01-04 Thread Zac Medico
On 1/4/21 1:06 AM, Zac Medico wrote: > Like asyncio.get_event_loop(), return the running loop for the > current thread if there is one, and otherwise construct a new > one if needed. This allows the _safe_loop function to become > synonymous with the global_event_loop function. >

[gentoo-portage-dev] [PATCH] global_event_loop: return running loop for current thread

2021-01-04 Thread Zac Medico
Like asyncio.get_event_loop(), return the running loop for the current thread if there is one, and otherwise construct a new one if needed. This allows the _safe_loop function to become synonymous with the global_event_loop function. Bug: https://bugs.gentoo.org/763339 Signed-off-by: Zac Medico

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

2021-01-03 Thread Zac Medico
On 1/2/21 4:08 PM, Matt Turner wrote: > 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

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

2020-12-31 Thread Zac Medico
On 12/31/20 11:47 AM, Matt Turner wrote: > Since the KEYWORDS=... assignment is a single line, git struggles to > handle conflicts. When rebasing a series of commits that modify the > KEYWORDS=... it's usually easier to throw them away and reapply on the > new tree than it is to manually handle

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

2020-12-28 Thread Zac Medico
On 12/28/20 5: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], >> + Optional[str]]]) ->

[gentoo-portage-dev] [PATCH v2] ekeyword: remove .ebuild file suffix requirement (bug 762331)

2020-12-28 Thread Zac Medico
and os.path.isfile(arg) returns True, then simply assume that the argument is an ebuild. Bug: https://bugs.gentoo.org/762331 Signed-off-by: Zac Medico --- [PATCH v2] fix to respect the ignorable_arg function pym/gentoolkit/ekeyword/ekeyword.py | 9 ++--- 1 file changed, 6 insertions(+), 3

[gentoo-portage-dev] [PATCH] ekeyword: remove .ebuild file suffix requirement (bug 762331)

2020-12-28 Thread Zac Medico
-by: Zac Medico --- pym/gentoolkit/ekeyword/ekeyword.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/ekeyword/ekeyword.py b/pym/gentoolkit/ekeyword/ekeyword.py index 4e57c09..665eee5 100755 --- a/pym/gentoolkit/ekeyword/ekeyword.py +++ b/pym/gentoolkit

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

2020-12-28 Thread Zac Medico
On 12/28/20 3:15 PM, Matt Turner wrote: > +def apply_keyword_changes(ebuild: str, pathname: str, > + changes: List[Tuple[Optional[str], > + Optional[str]]]) -> int: > +result: int = 0 > + > +# ekeyword will only modify

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

2020-12-24 Thread Zac Medico
On 12/24/20 10:14 AM, Mike Gilbert wrote: > Signed-off-by: Mike Gilbert > --- > src/portage_util_file_copy_reflink_linux.c | 10 +- > src/portage_util_libc.c| 10 +- > 2 files changed, 2 insertions(+), 18 deletions(-) Looks good. Please merge. -- Thanks, Zac

Re: [gentoo-portage-dev] [PATCH] Adjust mangling of "arch" value from scanelf output

2020-12-23 Thread Zac Medico
On 12/23/20 7:34 PM, Mike Gilbert wrote: > scanelf may generate output that looks like this: > > ``` > UNKNOWN_TYPE;lib/firmware/ath10k/WCN3990/hw1.0/wlanmdsp.mbn;; - ; > EM_ARM;lib/firmware/mediatek/mt8183/scp.img;; - ; > ... > ``` > > Previously, we removed the first 3 characters of the

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

2020-12-20 Thread Zac Medico
On 12/20/20 2:10 PM, Matt Turner wrote: > gentoolkit supports only Python 3.6+ now, so these are not used. > > Signed-off-by: Matt Turner The whole series LGTM (including "Remove unused sys imports" patch 5/4). -- Thanks, Zac signature.asc Description: OpenPGP digital signature

[gentoo-portage-dev] [PATCH v4] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
(asyncio.new_event_loop()) In order to avoid a ResourceWarning, the caller should also close the corresponding loop before the current thread terminates. Bug: https://bugs.gentoo.org/758755 Signed-off-by: Zac Medico --- [PATCH v4] treat external API consumers the same as interal callers if they call from

[gentoo-portage-dev] Re: [PATCH v3] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
Accidentally encrypted the last email. Here's an unencrypted version. On 12/6/20 2:14 PM, Zac Medico wrote: > Make the _safe_loop function return an AsyncioEventLoop instance, > so that the default asyncio event loop implementation will be used > in API consumer threads. This is possibl

[gentoo-portage-dev] Re: [PATCH v3] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
On 12/6/20 2:14 PM, Zac Medico wrote: > Make the _safe_loop function return an AsyncioEventLoop instance, > so that the default asyncio event loop implementation will be used > in API consumer threads. This is possible because the underlying > asyncio.get_event_loop() function returns

[gentoo-portage-dev] [PATCH v3] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
_run_until_complete method will now appropriately handle a ValueError from signal.set_wakeup_fd(-1) if it is not called in the main thread. Bug: https://bugs.gentoo.org/758755 Signed-off-by: Zac Medico --- [PATCH v3] fixed AsyncioEventLoop _run_until_complete method to handle ValueError from

[gentoo-portage-dev] [PATCH v2] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
://bugs.gentoo.org/758755 Signed-off-by: Zac Medico --- [PATCH v2] fixed _safe_loop function to return a new AsyncioEventLoop per thread lib/portage/util/futures/_asyncio/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/portage/util/futures/_asyncio/__init__.py b/lib

[gentoo-portage-dev] Re: [PATCH] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
On 12/6/20 1:46 AM, Zac Medico wrote: > Make the _safe_loop function an alias for the global_event_loop > function, so that the default asyncio event loop implementation > will be used in API consumer threads. This is possible because > global_event_loop has been fixed (bug 758740) t

[gentoo-portage-dev] [PATCH] Use default asyncio event loop implementation in API consumer threads

2020-12-06 Thread Zac Medico
asyncio.get_event_loop() which returns a new event loop for each thread. Bug: https://bugs.gentoo.org/758755 Signed-off-by: Zac Medico --- lib/portage/util/futures/_asyncio/__init__.py | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/portage/util/futures/_asyncio

[gentoo-portage-dev] [PATCH] Use default asyncio event loop implementation in child processes

2020-12-06 Thread Zac Medico
://bugs.gentoo.org/758740 Signed-off-by: Zac Medico --- lib/portage/__init__.py | 4 lib/portage/util/_eventloop/global_event_loop.py | 7 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 4d4b590a8

[gentoo-portage-dev] [PATCH] _get_lock_fn: support multiprocessing spawn start method (bug 758230)

2020-12-04 Thread Zac Medico
an inherited file descriptor for the fork start method. Bug: https://bugs.gentoo.org/758230 Signed-off-by: Zac Medico --- lib/portage/locks.py | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/portage/locks.py b/lib/portage/locks.py index

[gentoo-portage-dev] [PATCH] find_smallest_cycle: don't merge satisfied PDEPEND too early

2020-12-02 Thread Zac Medico
5095c2023595a75e2848f1ad3dbe25b5fb451a44 because it gave PDEPEND higher priority than satisfied buildtime dependencies. Fixes: 5095c2023595 ("find_smallest_cycle: enhance search prioritization") Reported-by: josef64 in #gentoo-portage Bug: https://bugs.gentoo.org/754903 Signed-off-by: Zac Medico

[gentoo-portage-dev] Re: [PATCH] Updates for portage-3.0.11 release

2020-12-02 Thread Zac Medico
On 12/2/20 12:18 AM, Zac Medico wrote: > Signed-off-by: Zac Medico > --- > RELEASE-NOTES | 6 ++ > setup.py | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) Please ignore. -- Thanks, Zac signature.asc Description: OpenPGP digital signature

[gentoo-portage-dev] [PATCH] Updates for portage-3.0.11 release

2020-12-02 Thread Zac Medico
Signed-off-by: Zac Medico --- RELEASE-NOTES | 6 ++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61c3c3d16..7fff83017 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,6 +1,12 @@ Release Notes; upgrade information

[gentoo-portage-dev] [PATCH] Allow a package to replace its own buildtime dependency

2020-11-28 Thread Zac Medico
/756961 Signed-off-by: Zac Medico --- lib/_emerge/depgraph.py | 68 ++ lib/portage/dep/dep_check.py | 24 --- .../resolver/test_circular_choices_rust.py| 69 +++ 3 files changed, 139 insertions(+), 22 deletions

[gentoo-portage-dev] [PATCH] backtracking: fix virtual choices for circular deps (bug 757306)

2020-11-27 Thread Zac Medico
Fix virtual choices to be consistent with circular dependency backtracking choices. Fixes: f78a91e44e3e ("backtracking: adjust || preference to break dependency cycles") Bug: https://bugs.gentoo.org/757306 Signed-off-by: Zac Medico --- lib/portage/dep/dep_check.py | 7 +-- 1 fi

[gentoo-portage-dev] [PATCH v2] find_smallest_cycle: enhance search prioritization

2020-11-21 Thread Zac Medico
in a somewhat random location, even though that cycle may be composed of smaller independent cycles which would be safer to break individually. Bug: https://bugs.gentoo.org/754903 Signed-off-by: Zac Medico --- [PATCH v2] * Add a unit test case which demonstrates a significant flaw in the master branch

[gentoo-portage-dev] [PATCH] find_smallest_cycle: enhance search prioritization

2020-11-19 Thread Zac Medico
to build against latest versions of buildtime dependencies whenever possible. This should solve some cases of bug 199856 which have been triggered by unsafe reliance on installed packages to break cycles. Bug: https://bugs.gentoo.org/754903 Signed-off-by: Zac Medico --- lib/_emerge

[gentoo-portage-dev] [PATCH] emerge: Disable profile deprecation warning inheritance (bug 753497)

2020-11-08 Thread Zac Medico
the current profile node belongs to the same repo as the previous profile node. Bug: https://bugs.gentoo.org/753497 Signed-off-by: Zac Medico --- .../ebuild/_config/LocationsManager.py| 30 ++- .../ebuild/deprecated_profile_check.py| 9 +++--- 2 files changed, 27

[gentoo-portage-dev] [PATCH] make.conf: expand special *ROOT variables (bug 752147)

2020-11-01 Thread Zac Medico
Bug: https://bugs.gentoo.org/752147 Signed-off-by: Zac Medico --- lib/portage/package/ebuild/config.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py index a09fdbced..3be8f9f6d 100644

[gentoo-portage-dev] [PATCH] emerge: add --quickpkg-direct-root option

2020-11-01 Thread Zac Medico
Specify the root to use as the --quickpkg-direct package source. This root is assumed to be immutable during the entire emerge operation. The default is set to "/". Bug: https://bugs.gentoo.org/752066 Signed-off-by: Zac Medico --- lib/_emerge/actions.py

[gentoo-portage-dev] [PATCH] pid-sandbox: Forward SIGTSTP and SIGCONT (bug 704498)

2020-10-28 Thread Zac Medico
For correct operation of Ctrl+Z, forward SIGTSTP and SIGCONT to all sandboxed pids. Fixes: 37e4dc5ae842 ("pid-sandbox: pid-ns-init setsid support (bug 675870)") Bug: https://bugs.gentoo.org/704498 Signed-off-by: Zac Medico --- bin/pid-ns-init | 24 +++- 1 file c

[gentoo-portage-dev] [PATCH v2] emerge: enable parallel-fetch during pkg_pretend (bug 710432)

2020-09-20 Thread Zac Medico
pkg_pretend phases now run inside of the --keep-going retry loop, --keep-going is now able to recover from pkg_pretend failures, which fixes bug 404157. Bug: https://bugs.gentoo.org/404157 Bug: https://bugs.gentoo.org/710432 Signed-off-by: Zac Medico --- [PATCH v2] records failed packages for correct

[gentoo-portage-dev] [PATCH] emerge: enable parallel-fetch during pkg_pretend (bug 710432)

2020-09-19 Thread Zac Medico
://bugs.gentoo.org/710432 Signed-off-by: Zac Medico --- lib/_emerge/Scheduler.py | 94 +--- 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py index a69421288..20884986f 100644 --- a/lib/_emerge

[gentoo-portage-dev] [PATCH] _slot_confict_backtrack: group similar missed updates (bug 743115)

2020-09-19 Thread Zac Medico
, where the difference of 3 corresponds to the number of other similar setuptools updates available. Bug: https://bugs.gentoo.org/743115 Signed-off-by: Zac Medico --- lib/_emerge/depgraph.py | 25 --- lib/_emerge/resolver/backtracking.py | 7

[gentoo-portage-dev] Re: [PATCH] _slot_confict_backtrack: minimize conflict atoms (bug 743631)

2020-09-19 Thread Zac Medico
On 9/19/20 2:40 PM, Zac Medico wrote: > diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py > index 3f864aefc..40e7d1325 100644 > --- a/lib/_emerge/depgraph.py > +++ b/lib/_emerge/depgraph.py > @@ -1797,6 +1797,12 @@ class depgraph: >

[gentoo-portage-dev] [PATCH] _slot_confict_backtrack: minimize conflict atoms (bug 743631)

2020-09-19 Thread Zac Medico
Prefer choices that minimize conflict atoms, so that choices which satisfy all parents are preferred. This reduces the minimum necessary backtrack tries from 21 to 7 for the unit test related to bug 743115. Bug: https://bugs.gentoo.org/743115 Bug: https://bugs.gentoo.org/743631 Signed-off-by: Zac

[gentoo-portage-dev] [PATCH] egencache: add --external-cache-only option (bug 741474)

2020-09-12 Thread Zac Medico
cache or index files are already capable of consuming files from the external cache directory (/var/cache/edb/dep). Bug: https://bugs.gentoo.org/737470 Signed-off-by: Zac Medico --- bin/egencache | 44 ++--- cnf/repo.postsync.d/example | 19

[gentoo-portage-dev] [PATCH] get_mirror_url: urlquote only for ftp, http, and https (bug 741474)

2020-09-12 Thread Zac Medico
literally, so urlquote must not be used. Fixes: c238d5f7ed264179c263f5a2da983c4ee50b4f00 Bug: https://bugs.gentoo.org/719810 Bug: https://bugs.gentoo.org/741474 Signed-off-by: Zac Medico --- lib/portage/package/ebuild/fetch.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[gentoo-portage-dev] [PATCH] selinux: encode os path arguments as UTF-8 (bug 741194)

2020-09-08 Thread Zac Medico
Encode path arguments as UTF-8, like portage.os wrapper. Fixes: 6137290b2bb8 ("selinux: python3 unicode paths, bug #430488") Bug: https://bugs.gentoo.org/741194 Signed-off-by: Zac Medico --- lib/portage/_selinux.py | 16 1 file changed, 8 insertions(+), 8 deletion

Re: [gentoo-portage-dev] [PATCH v5] env-update: create systemd user-session environment definition

2020-09-07 Thread Zac Medico
env-update so that a systemd user session > environment configuration file named > > /etc/environment.d/10-gentoo-env.conf > > is created. > > Thanks to Michael 'veremitz' Everitt, Arfrever Frehtes Taifersar > Arahesis, Ulrich Müller, Joakim Tjernlund, and Zac Medico for t

[gentoo-portage-dev] Re: [PATCH 0/2] Add binrepos.conf to support fetchcommand customization (bug 661332)

2020-09-07 Thread Zac Medico
On 9/6/20 11:31 PM, Zac Medico wrote: > Support /etc/portage/binrepos.conf as a replacement for the > PORTAGE_BINHOST variable. Behavior is similar to repos.conf, > initially supporting just the sync-uri attribute. Both binrepos.conf > and PORTAGE_BINHOST can be used simultaneously,

[gentoo-portage-dev] [PATCH 1/2] Add binrepos.conf to replace PORTAGE_BINHOST (bug 668334)

2020-09-07 Thread Zac Medico
be used simultaneously. The emerge --info output for binrepos.conf looks like this: Binary Repositories: example-binhost sync-uri: https://example.com/packages Bug: https://bugs.gentoo.org/668334 Signed-off-by: Zac Medico --- lib/_emerge/actions.py | 13 ++- lib/portage

[gentoo-portage-dev] [PATCH 2/2] binrepos.conf: support fetchcommand customization (bug 661332)

2020-09-07 Thread Zac Medico
Support customization of fetchcommand and resumecommand in binrepos.conf, allowing customized authentication mechanisms for each repository. Bug: https://bugs.gentoo.org/661332 Signed-off-by: Zac Medico --- lib/_emerge/BinpkgFetcher.py | 29 +++-- lib/portage/binrepo

[gentoo-portage-dev] [PATCH 0/2] Add binrepos.conf to support fetchcommand customization (bug 661332)

2020-09-07 Thread Zac Medico
repository. Zac Medico (2): Add binrepos.conf to replace PORTAGE_BINHOST (bug 668334) binrepos.conf: support fetchcommand customization (bug 661332) lib/_emerge/BinpkgFetcher.py| 29 -- lib/_emerge/actions.py | 13 ++- lib/portage/binrepo/__init__.py

[gentoo-portage-dev] [PATCH] make.conf: Treat __* variables as local and do not propagate them.

2020-09-05 Thread Zac Medico
From: Arfrever Frehtes Taifersar Arahesis Bug: https://bugs.gentoo.org/740588 Signed-off-by: Arfrever Frehtes Taifersar Arahesis Signed-off-by: Zac Medico --- lib/portage/package/ebuild/config.py | 6 ++ man/make.conf.5 | 4 +++- 2 files changed, 9 insertions(+), 1

Re: [gentoo-portage-dev] Re: [PATCH v4] env-update: create systemd env configuration if required

2020-09-04 Thread Zac Medico
On 9/4/20 8:39 AM, Florian Schmaus wrote: > On 9/3/20 7:57 PM, Florian Schmaus wrote: >> +systemd_profile_env_path = os.path.join(systemd_environment_dir, >> + "10-gentoo-profile-env.conf") >> +with open(systemd_profile_env_path, "w") as

Re: [gentoo-portage-dev] [PATCH v2] emerge --search: auto-detect regular expressions (bug 737480)

2020-09-02 Thread Zac Medico
On 9/1/20 11:08 PM, Michał Górny wrote: > On Tue, 2020-09-01 at 19:59 -0700, Zac Medico wrote: >> Automatically detect regular expressions when the search string >> contains any of these regular expression characters or character >> sequences: >> >> ^ $ * [ ]

Re: [gentoo-portage-dev] [PATCH v2] emerge --search: auto-detect regular expressions (bug 737480)

2020-09-02 Thread Zac Medico
On 9/1/20 11:08 PM, Michał Górny wrote: > On Tue, 2020-09-01 at 19:59 -0700, Zac Medico wrote: >> Automatically detect regular expressions when the search string >> contains any of these regular expression characters or character >> sequences: >> >> ^ $ * [ ]

  1   2   3   4   5   6   7   8   9   10   >