Re: [gentoo-portage-dev] [PATCH 1/3] Add cached portage.getpid() function
On Fri, 2020-08-07 at 21:08 -0700, Zac Medico wrote: > Since getpid is a syscall, cache results, and update them > via an after fork hook. > > Signed-off-by: Zac Medico > --- > lib/portage/__init__.py | 14 +++ > .../tests/process/test_AsyncFunction.py | 24 +++ > 2 files changed, 38 insertions(+) > > diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py > index 916c93510..52902ba7d 100644 > --- a/lib/portage/__init__.py > +++ b/lib/portage/__init__.py > @@ -14,6 +14,7 @@ try: > if not hasattr(errno, 'ESTALE'): > # ESTALE may not be defined on some systems, such as interix. > errno.ESTALE = -1 > + import multiprocessing.util > import re > import types > import platform > @@ -368,6 +369,19 @@ _internal_caller = False > > _sync_mode = False > > +def _fork_watcher(_fork_watcher): > + _fork_watcher.current_pid = _os.getpid() I don't really like the idea of putting variables on functions. Would there be any problem with using a proper class here? > + > +_fork_watcher(_fork_watcher) > + > +multiprocessing.util.register_after_fork(_fork_watcher, _fork_watcher) > + > +def getpid(): > + """ > + Cached version of os.getpid(). ForkProcess updates the cache. > + """ > + return _fork_watcher.current_pid > + > def _get_stdin(): > """ > Buggy code in python's multiprocessing/process.py closes sys.stdin > diff --git a/lib/portage/tests/process/test_AsyncFunction.py > b/lib/portage/tests/process/test_AsyncFunction.py > index 55857026d..3b360e02f 100644 > --- a/lib/portage/tests/process/test_AsyncFunction.py > +++ b/lib/portage/tests/process/test_AsyncFunction.py > @@ -3,6 +3,7 @@ > > import sys > > +import portage > from portage import os > from portage.tests import TestCase > from portage.util._async.AsyncFunction import AsyncFunction > @@ -36,3 +37,26 @@ class AsyncFunctionTestCase(TestCase): > def testAsyncFunctionStdin(self): > loop = asyncio._wrap_loop() > loop.run_until_complete(self._testAsyncFunctionStdin(loop)) > + > + def _test_getpid_fork(self): > + """ > + Verify that portage.getpid() cache is updated in a forked child > process. > + """ > + loop = asyncio._wrap_loop() > + proc = AsyncFunction(scheduler=loop, target=portage.getpid) > + proc.start() > + proc.wait() > + self.assertEqual(proc.pid, proc.result) > + > + def test_getpid_fork(self): > + self._test_getpid_fork() > + > + def test_getpid_double_fork(self): > + """ > + Verify that portage.getpid() cache is updated correctly after > + two forks. > + """ > + loop = asyncio._wrap_loop() > + proc = AsyncFunction(scheduler=loop, > target=self._test_getpid_fork) > + proc.start() > + self.assertEqual(proc.wait(), 0) -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part
[gentoo-portage-dev] [PATCH 0/3] sqlite: fork safety (bug 736334)
Use a separate connection instance for each pid, since it is not safe to use a connection created in a parent process. See: https://www.sqlite.org/howtocorrupt.html Bug: https://bugs.gentoo.org/736334 Zac Medico (3): Add cached portage.getpid() function sqlite: add lazy connection init sqlite: fork safety (bug 736334) lib/portage/__init__.py | 14 + lib/portage/cache/sqlite.py | 30 +++ lib/portage/tests/dbapi/test_auxdb.py | 13 ++-- .../tests/process/test_AsyncFunction.py | 24 +++ 4 files changed, 74 insertions(+), 7 deletions(-) -- 2.25.3
[gentoo-portage-dev] [PATCH 3/3] sqlite: fork safety (bug 736334)
Use a separate connection instance for each pid, since it is not safe to use a connection created in a parent process. See: https://www.sqlite.org/howtocorrupt.html Bug: https://bugs.gentoo.org/736334 Signed-off-by: Zac Medico --- lib/portage/cache/sqlite.py | 9 + lib/portage/tests/dbapi/test_auxdb.py | 13 +++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/portage/cache/sqlite.py b/lib/portage/cache/sqlite.py index 0395dd516..36a4f049e 100644 --- a/lib/portage/cache/sqlite.py +++ b/lib/portage/cache/sqlite.py @@ -4,6 +4,7 @@ import collections import re +import portage from portage.cache import fs_template from portage.cache import cache_errors from portage import os @@ -25,7 +26,7 @@ class database(fs_template.FsBased): cache_bytes = 1024 * 1024 * 10 _connection_info_entry = collections.namedtuple('_connection_info_entry', - ('connection', 'cursor')) + ('connection', 'cursor', 'pid')) def __init__(self, *args, **config): super(database, self).__init__(*args, **config) @@ -71,13 +72,13 @@ class database(fs_template.FsBased): @property def _db_cursor(self): - if self._db_connection_info is None: + if self._db_connection_info is None or self._db_connection_info.pid != portage.getpid(): self._db_init_connection() return self._db_connection_info.cursor @property def _db_connection(self): - if self._db_connection_info is None: + if self._db_connection_info is None or self._db_connection_info.pid != portage.getpid(): self._db_init_connection() return self._db_connection_info.connection @@ -94,7 +95,7 @@ class database(fs_template.FsBased): connection = self._db_module.connect( database=_unicode_decode(self._dbpath), **connection_kwargs) cursor = connection.cursor() - self._db_connection_info = self._connection_info_entry(connection, cursor) + self._db_connection_info = self._connection_info_entry(connection, cursor, portage.getpid()) self._db_cursor.execute("PRAGMA encoding = %s" % self._db_escape_string("UTF-8")) if not self.readonly and not self._ensure_access(self._dbpath): raise cache_errors.InitializationError(self.__class__, "can't ensure perms on %s" % self._dbpath) diff --git a/lib/portage/tests/dbapi/test_auxdb.py b/lib/portage/tests/dbapi/test_auxdb.py index 5c79357d7..7865c3564 100644 --- a/lib/portage/tests/dbapi/test_auxdb.py +++ b/lib/portage/tests/dbapi/test_auxdb.py @@ -4,7 +4,8 @@ from portage.tests import TestCase from portage.tests.resolver.ResolverPlayground import ResolverPlayground from portage.util.futures import asyncio -from portage.util.futures.compat_coroutine import coroutine +from portage.util.futures.compat_coroutine import coroutine, coroutine_return +from portage.util.futures.executor.fork import ForkExecutor class AuxdbTestCase(TestCase): @@ -61,8 +62,14 @@ class AuxdbTestCase(TestCase): portdb = playground.trees[playground.eroot]["porttree"].dbapi + def test_func(): + return asyncio._wrap_loop().run_until_complete(self._test_mod_async( + ebuilds, ebuild_inherited, eclass_defined_phases, eclass_depend, portdb)) + + self.assertTrue(test_func()) + loop = asyncio._wrap_loop() - loop.run_until_complete(self._test_mod_async(ebuilds, ebuild_inherited, eclass_defined_phases, eclass_depend, portdb)) + self.assertTrue(loop.run_until_complete(loop.run_in_executor(ForkExecutor(), test_func))) @coroutine def _test_mod_async(self, ebuilds, ebuild_inherited, eclass_defined_phases, eclass_depend, portdb): @@ -73,3 +80,5 @@ class AuxdbTestCase(TestCase): self.assertEqual(depend, eclass_depend) self.assertEqual(eapi, metadata['EAPI']) self.assertEqual(frozenset(inherited.split()), ebuild_inherited) + + coroutine_return(True) -- 2.25.3
[gentoo-portage-dev] [PATCH 1/3] Add cached portage.getpid() function
Since getpid is a syscall, cache results, and update them via an after fork hook. Signed-off-by: Zac Medico --- lib/portage/__init__.py | 14 +++ .../tests/process/test_AsyncFunction.py | 24 +++ 2 files changed, 38 insertions(+) diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 916c93510..52902ba7d 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -14,6 +14,7 @@ try: if not hasattr(errno, 'ESTALE'): # ESTALE may not be defined on some systems, such as interix. errno.ESTALE = -1 + import multiprocessing.util import re import types import platform @@ -368,6 +369,19 @@ _internal_caller = False _sync_mode = False +def _fork_watcher(_fork_watcher): + _fork_watcher.current_pid = _os.getpid() + +_fork_watcher(_fork_watcher) + +multiprocessing.util.register_after_fork(_fork_watcher, _fork_watcher) + +def getpid(): + """ + Cached version of os.getpid(). ForkProcess updates the cache. + """ + return _fork_watcher.current_pid + def _get_stdin(): """ Buggy code in python's multiprocessing/process.py closes sys.stdin diff --git a/lib/portage/tests/process/test_AsyncFunction.py b/lib/portage/tests/process/test_AsyncFunction.py index 55857026d..3b360e02f 100644 --- a/lib/portage/tests/process/test_AsyncFunction.py +++ b/lib/portage/tests/process/test_AsyncFunction.py @@ -3,6 +3,7 @@ import sys +import portage from portage import os from portage.tests import TestCase from portage.util._async.AsyncFunction import AsyncFunction @@ -36,3 +37,26 @@ class AsyncFunctionTestCase(TestCase): def testAsyncFunctionStdin(self): loop = asyncio._wrap_loop() loop.run_until_complete(self._testAsyncFunctionStdin(loop)) + + def _test_getpid_fork(self): + """ + Verify that portage.getpid() cache is updated in a forked child process. + """ + loop = asyncio._wrap_loop() + proc = AsyncFunction(scheduler=loop, target=portage.getpid) + proc.start() + proc.wait() + self.assertEqual(proc.pid, proc.result) + + def test_getpid_fork(self): + self._test_getpid_fork() + + def test_getpid_double_fork(self): + """ + Verify that portage.getpid() cache is updated correctly after + two forks. + """ + loop = asyncio._wrap_loop() + proc = AsyncFunction(scheduler=loop, target=self._test_getpid_fork) + proc.start() + self.assertEqual(proc.wait(), 0) -- 2.25.3
[gentoo-portage-dev] [PATCH 2/3] sqlite: add lazy connection init
Signed-off-by: Zac Medico --- lib/portage/cache/sqlite.py | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/lib/portage/cache/sqlite.py b/lib/portage/cache/sqlite.py index 55ae8f0e5..0395dd516 100644 --- a/lib/portage/cache/sqlite.py +++ b/lib/portage/cache/sqlite.py @@ -1,6 +1,7 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +import collections import re from portage.cache import fs_template @@ -23,6 +24,9 @@ class database(fs_template.FsBased): # equation: cache_bytes = page_bytes * page_count cache_bytes = 1024 * 1024 * 10 + _connection_info_entry = collections.namedtuple('_connection_info_entry', + ('connection', 'cursor')) + def __init__(self, *args, **config): super(database, self).__init__(*args, **config) self._import_sqlite() @@ -44,8 +48,8 @@ class database(fs_template.FsBased): # Set longer timeout for throwing a "database is locked" exception. # Default timeout in sqlite3 module is 5.0 seconds. config.setdefault("timeout", 15) - self._db_init_connection(config) - self._db_init_structures() + self._config = config + self._db_connection_info = None def _import_sqlite(self): # sqlite3 is optional with >=python-2.5 @@ -65,7 +69,20 @@ class database(fs_template.FsBased): s = str(s) return "'%s'" % s.replace("'", "''") - def _db_init_connection(self, config): + @property + def _db_cursor(self): + if self._db_connection_info is None: + self._db_init_connection() + return self._db_connection_info.cursor + + @property + def _db_connection(self): + if self._db_connection_info is None: + self._db_init_connection() + return self._db_connection_info.connection + + def _db_init_connection(self): + config = self._config self._dbpath = self.location + ".sqlite" #if os.path.exists(self._dbpath): # os.unlink(self._dbpath) @@ -74,14 +91,16 @@ class database(fs_template.FsBased): try: if not self.readonly: self._ensure_dirs() - self._db_connection = self._db_module.connect( + connection = self._db_module.connect( database=_unicode_decode(self._dbpath), **connection_kwargs) - self._db_cursor = self._db_connection.cursor() + cursor = connection.cursor() + self._db_connection_info = self._connection_info_entry(connection, cursor) self._db_cursor.execute("PRAGMA encoding = %s" % self._db_escape_string("UTF-8")) if not self.readonly and not self._ensure_access(self._dbpath): raise cache_errors.InitializationError(self.__class__, "can't ensure perms on %s" % self._dbpath) self._db_init_cache_size(config["cache_bytes"]) self._db_init_synchronous(config["synchronous"]) + self._db_init_structures() except self._db_error as e: raise cache_errors.InitializationError(self.__class__, e) -- 2.25.3
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On Fri, 07 Aug 2020 21:45:48 +0200 Michał Górny wrote: > But I suppose being sarcastic is the new norm and should be documented as > such. I am not sarcastic if it was your implication. -- Sergei
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On Fri, Aug 7, 2020 at 11:25 AM Michael Orlitzky wrote: > I have too many other things to do to waste time reverse-engineering > these fuck-ups. Get it together. You're fucking welcome for all the X11 maintenance.
Re: [gentoo-portage-dev] [PATCH] lib/*: Fix useless-return
On 8/7/20 12:06 PM, Aaron Bauman wrote: > * Python implies such things. Let's drop 'em and be consistent. > > Signed-off-by: Aaron Bauman > --- > lib/_emerge/EbuildPhase.py | 6 +++--- > lib/_emerge/resolver/output.py | 5 + > lib/portage/elog/mod_custom.py | 1 + > lib/portage/elog/mod_echo.py | 4 ++-- > lib/portage/elog/mod_mail.py | 2 ++ > lib/portage/glsa.py| 3 +++ > lib/portage/mail.py| 1 + > lib/portage/sync/controller.py | 3 ++- > lib/portage/util/whirlpool.py | 2 ++ > pylintrc | 1 - > 10 files changed, 21 insertions(+), 7 deletions(-) Thanks, merged: https://gitweb.gentoo.org/proj/portage.git/commit/?id=28ed2fe2ba42c7e58cb79e7ce991025e6a96 -- Thanks, Zac signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
Am Freitag, 7. August 2020, 20:43:22 CEST schrieb Toralf Förster: > On 8/7/20 8:25 PM, Michael Orlitzky wrote: > > I have too many other things to do to waste time reverse-engineering > > these fuck-ups. Get it together. > > I'm just curious if you refer to commit d8c442ba8 - b/c that was made by > someone at Wed Oct 16 19:41:02 2019 + and I do wonder why nobody else > run into that issue since that time? My suspicion is that barely anybody actually uses that package. No desktop user needs it, nothing depends on it, and AFAIR it pulls in lots of packages that aren't necessary, and those that are get pulled in as dependencies elsewhere. I stopped installing the xorg-x11 meta-package sometime in 2009, I think following the X.org modularization, which was shortly before that IIRC. -- Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On Fri, 2020-08-07 at 20:03 +0100, Sergei Trofimovich wrote: > On Fri, 7 Aug 2020 14:25:04 -0400 > Michael Orlitzky wrote: > > > When you ignore the devmanual and the pkgcheck warning and the 10+ > > threads I've started about the issue, and make changes like... > > > > --- a/x11-base/xorg-x11/xorg-x11-7.4-r3.ebuild > > +++ b/x11-base/xorg-x11/xorg-x11-7.4-r3.ebuild > > @@ -1,4 +1,4 @@ > > -# Copyright 1999-2018 Gentoo Foundation > > +# Copyright 1999-2019 Gentoo Authors > ># Distributed under the terms of the GNU General Public License v2 > > > >EAPI=6 > > @@ -21,8 +21,7 @@ RDEPEND="${RDEPEND} > > x11-apps/bitmap > > x11-apps/iceauth > > x11-apps/luit > > - x11-apps/mkfontdir > > - x11-apps/mkfontscale > > + >=x11-apps/mkfontscale-1.2.0 > > x11-apps/sessreg > > > > > > This is what portage does: > > > > $ sudo emerge -uDN @world > > Password: > > Calculating dependencies... done! > > > > emerge: there are no ebuilds to satisfy "x11-apps/mkfontdir". > > (dependency required by "x11-base/xorg-x11-7.4-r3::gentoo" > > [installed]) > > (dependency required by "@selected" [set]) > > (dependency required by "@world" [argument]) > > After PAM virtual removal and a bunch of similar large-scale > changes done by QA members I assume it's a new norm and > should be documented as such. > You could also try to understand the difference between the two, and the purpose in not causing unnecessary rebuilds just to make it possible to depclean a zero-byte package. But I suppose being sarcastic is the new norm and should be documented as such. -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part
[gentoo-portage-dev] [PATCH] lib/*: Fix useless-return
* Python implies such things. Let's drop 'em and be consistent. Signed-off-by: Aaron Bauman --- lib/_emerge/EbuildPhase.py | 6 +++--- lib/_emerge/resolver/output.py | 5 + lib/portage/elog/mod_custom.py | 1 + lib/portage/elog/mod_echo.py | 4 ++-- lib/portage/elog/mod_mail.py | 2 ++ lib/portage/glsa.py| 3 +++ lib/portage/mail.py| 1 + lib/portage/sync/controller.py | 3 ++- lib/portage/util/whirlpool.py | 2 ++ pylintrc | 1 - 10 files changed, 21 insertions(+), 7 deletions(-) diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py index ceffeccee..e6256d0aa 100644 --- a/lib/_emerge/EbuildPhase.py +++ b/lib/_emerge/EbuildPhase.py @@ -9,12 +9,11 @@ import tempfile from _emerge.AsynchronousLock import AsynchronousLock from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor -from _emerge.CompositeTask import CompositeTask -from _emerge.EbuildProcess import EbuildProcess from _emerge.MiscFunctionsProcess import MiscFunctionsProcess +from _emerge.EbuildProcess import EbuildProcess +from _emerge.CompositeTask import CompositeTask from _emerge.PackagePhase import PackagePhase from _emerge.TaskSequence import TaskSequence - from portage.package.ebuild._ipc.QueryCommand import QueryCommand from portage.util._dyn_libs.soname_deps_qa import ( _get_all_provides, @@ -397,6 +396,7 @@ class EbuildPhase(CompositeTask): fd_pipes=self.fd_pipes, phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(clean_phase, self._fail_clean_exit) + return def _fail_clean_exit(self, clean_phase): self._final_exit(clean_phase) diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py index b6c77ecad..1dcb47020 100644 --- a/lib/_emerge/resolver/output.py +++ b/lib/_emerge/resolver/output.py @@ -243,6 +243,7 @@ class Display: cur_use_map[key], old_iuse_map[key], old_use_map[key], is_new, feature_flags, reinst_flags_map.get(key)) + return @staticmethod @@ -538,6 +539,7 @@ class Display: if show_repos and repoadd: myprint += " " + teal("[%s]" % repoadd) writemsg_stdout("%s\n" % (myprint,), noiselevel=-1) + return def print_blockers(self): @@ -546,6 +548,7 @@ class Display: """ for pkg in self.blockers: writemsg_stdout("%s\n" % (pkg,), noiselevel=-1) + return def print_verbose(self, show_repos): @@ -559,6 +562,7 @@ class Display: # that RepoDisplay.__unicode__() is called in python2. writemsg_stdout("%s" % (self.conf.repo_display,), noiselevel=-1) + return def print_changelog(self): @@ -683,6 +687,7 @@ class Display: if ebuild_path_cl is not None: self.changelogs.extend(_calc_changelog( ebuild_path_cl, pkg_info.previous_pkg, pkg.cpv)) + return def check_system_world(self, pkg): diff --git a/lib/portage/elog/mod_custom.py b/lib/portage/elog/mod_custom.py index aaf1d3b1b..7cfafeccc 100644 --- a/lib/portage/elog/mod_custom.py +++ b/lib/portage/elog/mod_custom.py @@ -18,3 +18,4 @@ def process(mysettings, key, logentries, fulltext): retval = portage.process.spawn_bash(mylogcmd) if retval != 0: raise portage.exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval) + return diff --git a/lib/portage/elog/mod_echo.py b/lib/portage/elog/mod_echo.py index a026847b7..80f2b11ac 100644 --- a/lib/portage/elog/mod_echo.py +++ b/lib/portage/elog/mod_echo.py @@ -3,10 +3,9 @@ # Distributed under the terms of the GNU General Public License v2 import sys - +from portage.output import EOutput, colorize from portage.const import EBUILD_PHASES from portage.localization import _ -from portage.output import EOutput, colorize _items = [] @@ -62,3 +61,4 @@ def _finalize(): for line in msgcontent: fmap[msgtype](line.strip("\n")) _items = [] + return diff --git a/lib/portage/elog/mod_mail.py b/lib/portage/elog/mod_mail.py index f737a80ce..38eaa277f 100644 --- a/lib/portage/elog/mod_mail.py +++ b/lib/portage/elog/mod_mail.py @@ -41,3 +41,5 @@ def process(mysettings, key, logentries, fulltext): portage.mail.send_mail(mysettings, mymessage) except PortageException as e: writemsg("%s\n" % str(e), noiselevel=-1) + + return diff --git a/lib/portage/glsa.py
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On Fri, 7 Aug 2020 14:25:04 -0400 Michael Orlitzky wrote: > When you ignore the devmanual and the pkgcheck warning and the 10+ > threads I've started about the issue, and make changes like... > > --- a/x11-base/xorg-x11/xorg-x11-7.4-r3.ebuild > +++ b/x11-base/xorg-x11/xorg-x11-7.4-r3.ebuild > @@ -1,4 +1,4 @@ > -# Copyright 1999-2018 Gentoo Foundation > +# Copyright 1999-2019 Gentoo Authors ># Distributed under the terms of the GNU General Public License v2 > >EAPI=6 > @@ -21,8 +21,7 @@ RDEPEND="${RDEPEND} > x11-apps/bitmap > x11-apps/iceauth > x11-apps/luit > - x11-apps/mkfontdir > - x11-apps/mkfontscale > + >=x11-apps/mkfontscale-1.2.0 > x11-apps/sessreg > > > This is what portage does: > > $ sudo emerge -uDN @world > Password: > Calculating dependencies... done! > > emerge: there are no ebuilds to satisfy "x11-apps/mkfontdir". > (dependency required by "x11-base/xorg-x11-7.4-r3::gentoo" > [installed]) > (dependency required by "@selected" [set]) > (dependency required by "@world" [argument]) After PAM virtual removal and a bunch of similar large-scale changes done by QA members I assume it's a new norm and should be documented as such. I ended up enabling --changed-deps by default on my systems to make them upgradeable. -- Sergei
Re: [gentoo-portage-dev] [PATCH] lib/*: Fix useless-return
On Fri, Aug 07, 2020 at 12:28:04PM -0400, Aaron Bauman wrote: > * Python implies such things. Let's drop 'em and be consistent. > > Signed-off-by: Aaron Bauman > --- > "\\" | 20 > lib/_emerge/EbuildPhase.py | 6 +++--- > lib/_emerge/resolver/output.py | 5 - > lib/portage/elog/mod_custom.py | 1 - > lib/portage/elog/mod_echo.py | 4 ++-- > lib/portage/elog/mod_mail.py | 2 -- > lib/portage/glsa.py| 3 --- > lib/portage/mail.py| 1 - > lib/portage/sync/controller.py | 3 +-- > lib/portage/util/whirlpool.py | 2 -- > pylintrc | 1 + > 11 files changed, 27 insertions(+), 21 deletions(-) > create mode 100644 "\\" > > diff --git "a/\\" "b/\\" > new file mode 100644 > index 0..aaf1d3b1b > --- /dev/null > +++ "b/\\" > @@ -0,0 +1,20 @@ > +# elog/mod_custom.py - elog dispatch module > +# Copyright 2006-2020 Gentoo Authors > +# Distributed under the terms of the GNU General Public License v2 > + > +import portage.elog.mod_save > +import portage.exception > +import portage.process > + > +def process(mysettings, key, logentries, fulltext): > + elogfilename = portage.elog.mod_save.process(mysettings, key, > logentries, fulltext) > + > if not isinstance(source, bytes): > @@ -777,7 +776,6 @@ def processBuffer(ctx): [snip] Please disregard. Sending new patch. -- Cheers, Aaron signature.asc Description: PGP signature
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On 2020-08-07 14:43, Toralf Förster wrote: > On 8/7/20 8:25 PM, Michael Orlitzky wrote: >> >> I have too many other things to do to waste time reverse-engineering >> these fuck-ups. Get it together. > > I'm just curious if you refer to commit d8c442ba8 - b/c that was made by > someone at Wed Oct 16 19:41:02 2019 + and I do wonder why nobody else run > into that issue since that time? > Beats me. I run a stable system, so probably it just needed the right combination of packages to stabilize. Or maybe it was the change in xorg-2.eclass that triggered it. Or maybe no one else has noticed that there's a useless package on his system (that will be stranded until all of the affected packages get upgrades/revisions) and tried to remove it. Or maybe everyone has set USE="-gentoo-dev" for portage to avoid this perpetual clown show. Or... what difference does it make? It already took me 100x longer to figure out what went wrong than it would have taken to make the revisions in the first place. I don't want to waste any more. I'm still tracking down more packages that need to be rebuilt by hand because RDEPEND was changed in an eclass too.
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On Fri, Aug 7, 2020 at 2:43 PM Toralf Förster wrote: > > On 8/7/20 8:25 PM, Michael Orlitzky wrote: > > > > I have too many other things to do to waste time reverse-engineering > > these fuck-ups. Get it together. > > I'm just curious if you refer to commit d8c442ba8 - b/c that was made by > someone at Wed Oct 16 19:41:02 2019 + and I do wonder why nobody else run > into that issue since that time? The problem doesn't surface until x11-apps/mkfontdir was removed in April 2020. I assume Michael hasn't rebuilt xorg-x11 since before then. Also, if you run emege --changed-deps, that works around the issue.
Re: [gentoo-dev] xorg-x11 RDEPEND changes without revisions
On 8/7/20 8:25 PM, Michael Orlitzky wrote: > > I have too many other things to do to waste time reverse-engineering > these fuck-ups. Get it together. I'm just curious if you refer to commit d8c442ba8 - b/c that was made by someone at Wed Oct 16 19:41:02 2019 + and I do wonder why nobody else run into that issue since that time? -- Toralf PGP 23217DA7 9B888F45 signature.asc Description: OpenPGP digital signature
[gentoo-dev] xorg-x11 RDEPEND changes without revisions
When you ignore the devmanual and the pkgcheck warning and the 10+ threads I've started about the issue, and make changes like... --- a/x11-base/xorg-x11/xorg-x11-7.4-r3.ebuild +++ b/x11-base/xorg-x11/xorg-x11-7.4-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -21,8 +21,7 @@ RDEPEND="${RDEPEND} x11-apps/bitmap x11-apps/iceauth x11-apps/luit - x11-apps/mkfontdir - x11-apps/mkfontscale + >=x11-apps/mkfontscale-1.2.0 x11-apps/sessreg This is what portage does: $ sudo emerge -uDN @world Password: Calculating dependencies... done! emerge: there are no ebuilds to satisfy "x11-apps/mkfontdir". (dependency required by "x11-base/xorg-x11-7.4-r3::gentoo" [installed]) (dependency required by "@selected" [set]) (dependency required by "@world" [argument]) I have too many other things to do to waste time reverse-engineering these fuck-ups. Get it together.
Re: [gentoo-portage-dev] [PATCH] lib/*: Fix useless-return
On Fri, 2020-08-07 at 12:28 -0400, Aaron Bauman wrote: > * Python implies such things. Let's drop 'em and be consistent. > > Signed-off-by: Aaron Bauman > --- > "\\" | 20 > lib/_emerge/EbuildPhase.py | 6 +++--- > lib/_emerge/resolver/output.py | 5 - > lib/portage/elog/mod_custom.py | 1 - > lib/portage/elog/mod_echo.py | 4 ++-- > lib/portage/elog/mod_mail.py | 2 -- > lib/portage/glsa.py| 3 --- > lib/portage/mail.py| 1 - > lib/portage/sync/controller.py | 3 +-- > lib/portage/util/whirlpool.py | 2 -- > pylintrc | 1 + > 11 files changed, 27 insertions(+), 21 deletions(-) > create mode 100644 "\\" > > diff --git "a/\\" "b/\\" > new file mode 100644 > index 0..aaf1d3b1b > --- /dev/null > +++ "b/\\" That's an interesting file to add. > @@ -0,0 +1,20 @@ > +# elog/mod_custom.py - elog dispatch module > +# Copyright 2006-2020 Gentoo Authors > +# Distributed under the terms of the GNU General Public License v2 > + > +import portage.elog.mod_save > +import portage.exception > +import portage.process > + > +def process(mysettings, key, logentries, fulltext): > + elogfilename = portage.elog.mod_save.process(mysettings, key, > logentries, fulltext) > + > + if not mysettings.get("PORTAGE_ELOG_COMMAND"): > + raise portage.exception.MissingParameter("!!! Custom logging > requested but PORTAGE_ELOG_COMMAND is not defined") > + else: > + mylogcmd = mysettings["PORTAGE_ELOG_COMMAND"] > + mylogcmd = mylogcmd.replace("${LOGFILE}", elogfilename) > + mylogcmd = mylogcmd.replace("${PACKAGE}", key) > + retval = portage.process.spawn_bash(mylogcmd) > + if retval != 0: > + raise portage.exception.PortageException("!!! > PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval) > diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py > index e6256d0aa..ceffeccee 100644 > --- a/lib/_emerge/EbuildPhase.py > +++ b/lib/_emerge/EbuildPhase.py > @@ -9,11 +9,12 @@ import tempfile > > from _emerge.AsynchronousLock import AsynchronousLock > from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor > -from _emerge.MiscFunctionsProcess import MiscFunctionsProcess > -from _emerge.EbuildProcess import EbuildProcess > from _emerge.CompositeTask import CompositeTask > +from _emerge.EbuildProcess import EbuildProcess > +from _emerge.MiscFunctionsProcess import MiscFunctionsProcess > from _emerge.PackagePhase import PackagePhase > from _emerge.TaskSequence import TaskSequence > + > from portage.package.ebuild._ipc.QueryCommand import QueryCommand > from portage.util._dyn_libs.soname_deps_qa import ( > _get_all_provides, > @@ -396,7 +397,6 @@ class EbuildPhase(CompositeTask): > fd_pipes=self.fd_pipes, phase=phase, > scheduler=self.scheduler, > settings=self.settings) > self._start_task(clean_phase, self._fail_clean_exit) > - return > > def _fail_clean_exit(self, clean_phase): > self._final_exit(clean_phase) > diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py > index 1dcb47020..b6c77ecad 100644 > --- a/lib/_emerge/resolver/output.py > +++ b/lib/_emerge/resolver/output.py > @@ -243,7 +243,6 @@ class Display: > cur_use_map[key], old_iuse_map[key], > old_use_map[key], is_new, feature_flags, > reinst_flags_map.get(key)) > - return > > > @staticmethod > @@ -539,7 +538,6 @@ class Display: > if show_repos and repoadd: > myprint += " " + teal("[%s]" % repoadd) > writemsg_stdout("%s\n" % (myprint,), noiselevel=-1) > - return > > > def print_blockers(self): > @@ -548,7 +546,6 @@ class Display: > """ > for pkg in self.blockers: > writemsg_stdout("%s\n" % (pkg,), noiselevel=-1) > - return > > > def print_verbose(self, show_repos): > @@ -562,7 +559,6 @@ class Display: > # that RepoDisplay.__unicode__() is called in python2. > writemsg_stdout("%s" % (self.conf.repo_display,), > noiselevel=-1) > - return > > > def print_changelog(self): > @@ -687,7 +683,6 @@ class Display: > if ebuild_path_cl is not None: > self.changelogs.extend(_calc_changelog( > ebuild_path_cl, pkg_info.previous_pkg, > pkg.cpv)) > - return > > > def check_system_world(self, pkg): > diff --git a/lib/portage/elog/mod_custom.py b/lib/portage/elog/mod_custom.py > index 7cfafeccc..aaf1d3b1b 100644 > --- a/lib/portage/elog/mod_custom.py
[gentoo-portage-dev] [PATCH] lib/*: Fix useless-return
* Python implies such things. Let's drop 'em and be consistent. Signed-off-by: Aaron Bauman --- "\\" | 20 lib/_emerge/EbuildPhase.py | 6 +++--- lib/_emerge/resolver/output.py | 5 - lib/portage/elog/mod_custom.py | 1 - lib/portage/elog/mod_echo.py | 4 ++-- lib/portage/elog/mod_mail.py | 2 -- lib/portage/glsa.py| 3 --- lib/portage/mail.py| 1 - lib/portage/sync/controller.py | 3 +-- lib/portage/util/whirlpool.py | 2 -- pylintrc | 1 + 11 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 "\\" diff --git "a/\\" "b/\\" new file mode 100644 index 0..aaf1d3b1b --- /dev/null +++ "b/\\" @@ -0,0 +1,20 @@ +# elog/mod_custom.py - elog dispatch module +# Copyright 2006-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +import portage.elog.mod_save +import portage.exception +import portage.process + +def process(mysettings, key, logentries, fulltext): + elogfilename = portage.elog.mod_save.process(mysettings, key, logentries, fulltext) + + if not mysettings.get("PORTAGE_ELOG_COMMAND"): + raise portage.exception.MissingParameter("!!! Custom logging requested but PORTAGE_ELOG_COMMAND is not defined") + else: + mylogcmd = mysettings["PORTAGE_ELOG_COMMAND"] + mylogcmd = mylogcmd.replace("${LOGFILE}", elogfilename) + mylogcmd = mylogcmd.replace("${PACKAGE}", key) + retval = portage.process.spawn_bash(mylogcmd) + if retval != 0: + raise portage.exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval) diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py index e6256d0aa..ceffeccee 100644 --- a/lib/_emerge/EbuildPhase.py +++ b/lib/_emerge/EbuildPhase.py @@ -9,11 +9,12 @@ import tempfile from _emerge.AsynchronousLock import AsynchronousLock from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor -from _emerge.MiscFunctionsProcess import MiscFunctionsProcess -from _emerge.EbuildProcess import EbuildProcess from _emerge.CompositeTask import CompositeTask +from _emerge.EbuildProcess import EbuildProcess +from _emerge.MiscFunctionsProcess import MiscFunctionsProcess from _emerge.PackagePhase import PackagePhase from _emerge.TaskSequence import TaskSequence + from portage.package.ebuild._ipc.QueryCommand import QueryCommand from portage.util._dyn_libs.soname_deps_qa import ( _get_all_provides, @@ -396,7 +397,6 @@ class EbuildPhase(CompositeTask): fd_pipes=self.fd_pipes, phase=phase, scheduler=self.scheduler, settings=self.settings) self._start_task(clean_phase, self._fail_clean_exit) - return def _fail_clean_exit(self, clean_phase): self._final_exit(clean_phase) diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py index 1dcb47020..b6c77ecad 100644 --- a/lib/_emerge/resolver/output.py +++ b/lib/_emerge/resolver/output.py @@ -243,7 +243,6 @@ class Display: cur_use_map[key], old_iuse_map[key], old_use_map[key], is_new, feature_flags, reinst_flags_map.get(key)) - return @staticmethod @@ -539,7 +538,6 @@ class Display: if show_repos and repoadd: myprint += " " + teal("[%s]" % repoadd) writemsg_stdout("%s\n" % (myprint,), noiselevel=-1) - return def print_blockers(self): @@ -548,7 +546,6 @@ class Display: """ for pkg in self.blockers: writemsg_stdout("%s\n" % (pkg,), noiselevel=-1) - return def print_verbose(self, show_repos): @@ -562,7 +559,6 @@ class Display: # that RepoDisplay.__unicode__() is called in python2. writemsg_stdout("%s" % (self.conf.repo_display,), noiselevel=-1) - return def print_changelog(self): @@ -687,7 +683,6 @@ class Display: if ebuild_path_cl is not None: self.changelogs.extend(_calc_changelog( ebuild_path_cl, pkg_info.previous_pkg, pkg.cpv)) - return def check_system_world(self, pkg): diff --git a/lib/portage/elog/mod_custom.py b/lib/portage/elog/mod_custom.py index 7cfafeccc..aaf1d3b1b 100644 --- a/lib/portage/elog/mod_custom.py +++ b/lib/portage/elog/mod_custom.py @@ -18,4 +18,3 @@ def process(mysettings, key, logentries, fulltext): retval = portage.process.spawn_bash(mylogcmd) if retval != 0: raise
Re: [gentoo-dev] News item v2: Multiple root kernel command-line arguments
This really should have a Display-If.
[gentoo-dev] Last rites: app-i18n/sunpinyin & revdeps
# Michał Górny (2020-08-07) # Last upstream (pre-)release in 2016. Python 3 porting effort is not # progressing since February, and PRs are stuck. Homepage is gone. # Removal in 30 days. Bug #695010. app-i18n/fcitx-sunpinyin app-i18n/ibus-sunpinyin app-i18n/scim-sunpinyin app-i18n/sunpinyin app-i18n/sunpinyin-data app-i18n/xsunpinyin -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part