Re: [gentoo-portage-dev] [PATCH] SyncManager: redirect command stderr to stdout (bug 566132)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 23/11/15 17:46, Zac Medico wrote: > Since the sync modules can call a variety of different commands, > it's hard to predict which ones will unnecessarily write to stderr. > So, the assumption here is that the process exit status is a more > reliable indicator for errors. For example, the python code in > GitSync will write an error message to stderr if the git process > exits with non-zero status. OK, then ACK, I suppose. - -- Alexander berna...@gentoo.org https://secure.plaimi.net/~alexander -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQIcBAEBCgAGBQJWVEsyAAoJENQqWdRUGk8BbTAP/1t3hz5qFMdYeMe4qAobHupW isScNSD2xj7edX50HwgSw8tnwRkSpGcQKCM29kkG8NCrtbEel4PuVYbCvlgBLRPP 3DH4VN5xqDGxG5HS8XB9r5DFUTDDdieeDztG0Cw8ItRahOpYXZMMWR31A6fZrd6y jkWP/FskmjQ2cWs8TC0rQan3U4sa0BY3WwREWFArIcenrH4MIYlpX+PNRhGqm8DA oePCZDhRGc9u2gNiaevWsRX/JjNYxchLczINEFHpZ0wrgBEI7rOosptBIvPWyo++ 5Q4VFWbZMPNoAMA1VFmplB+xBHiDWya9br3IZ91Ak5Se46K4fwgcJFs/2lHyRoKN +UZBYpRdt8JtGPchGMMgstHdJFGoWbrkWwOn7OIVURIg9QSjjnr8aVBM/sP2dKa5 pX7A5lEwD9xDB4hnTCQuVK4ugsaTXmvUYAqoUVeaD9zIZDnHmjmvWY+K8NrOmYoV wwOUdhCofmh66+6TwaUYqFzLN5YoUPFl0XxHd58GSObv01sYpVPssGiOKQlYrZWj MDQbw6Lh8rPMfqFr6+X6qc4SLoA50mhmvQblApzajQcBJqip1z2o13voGgEz7s7O IAX50HjHYyYaEZG8yrm6oXxF6eC/+JK3P2rWMkx0KiWKof/ZGcnwqmfuumOWMgW0 NoIHiVwymfsoZ2fqNhDe =cvLG -END PGP SIGNATURE-
Re: [gentoo-portage-dev] [PATCH] SyncManager: redirect command stderr to stdout (bug 566132)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Sorry for not being up to date what this does, but the bug complains specifically about GitHub mirrors, while the patch itself seems far more invasive. Is it the case that they should *never* go to STDERR? - -- Alexander berna...@gentoo.org https://secure.plaimi.net/~alexander -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQIcBAEBCgAGBQJWUuzpAAoJENQqWdRUGk8BMdQQAKACO5bGwnXxbyNRuh/KzIiH e38mzzvxDibJTTz32XSsOn1w9StZkSWAcDwT8Ef4QGeQJxmLTXUW+5eUsAVoaNxy VY81iQbDmcSf+erljYEuUBBOFDMORYGwhSROdvvLE/0d3LFP6AurWx9a4kb229j7 DB8HmpjXkkpT65YgJvp2vD51x+K5HsDOKTObBcDreiea21u2X6DNcGbVOK35IXs3 fbTovSrL39qTk8zPSvuwePHlfWelsTCmj/+2EmLVJMTem/cTo0uxCfGCOmwALusk FI4YcV1zf1cMrL1tqU9B7bYSH8oci4Rfs80IanieDwpd59V32xQ8ckyOP8ME5gG/ xbqipfwbWJyyUFErL7BZE9/H90tib9uofR9mxP9BylXjsDMbu/sC7OA2ElBNVilp TJGvmRb3jdIWsSddNsOgdN2XofR20G5Ow/NKEvpueM42Pk4s6lqYwZODmsU5kOsS wSw6ErQO6RCKfu0iQhQo3VS4EjP95sVl21nXtJk6v8AkNwNkU1TNZ8f1Ds5CaALR 79XpFL3JQy/zwd0uMY7kOjgezJJeu4nhfSz2k1ZDNLHokTcqhqR4WdXqzkWA2iZq Y6p6CLWY57TIiih0ASt+NSfrkRl1628irZyVcyoVKDpaWCVcWq+G1sAl4pmAXpXV nVhyL0zqartr+TNlFz2N =g6l5 -END PGP SIGNATURE-
Re: [gentoo-portage-dev] [PATCH] SyncManager: redirect command stderr to stdout (bug 566132)
On 11/23/2015 02:39 AM, Alexander Berntsen wrote: > Sorry for not being up to date what this does, but the bug complains > specifically about GitHub mirrors, while the patch itself seems far > more invasive. Is it the case that they should *never* go to STDERR? Since the sync modules can call a variety of different commands, it's hard to predict which ones will unnecessarily write to stderr. So, the assumption here is that the process exit status is a more reliable indicator for errors. For example, the python code in GitSync will write an error message to stderr if the git process exits with non-zero status. -- Thanks, Zac
[gentoo-portage-dev] [PATCH] SyncManager: redirect command stderr to stdout (bug 566132)
X-Gentoo-Bug: 566132 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=566132 --- pym/portage/sync/controller.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py index 4595293..e71ba67 100644 --- a/pym/portage/sync/controller.py +++ b/pym/portage/sync/controller.py @@ -218,6 +218,13 @@ class SyncManager(object): self.usersync_uid = None spawn_kwargs = {} + # Redirect command stderr to stdout, in order to prevent + # spurious cron job emails (bug 566132). + spawn_kwargs["fd_pipes"] = { + 0: sys.__stdin__.fileno(), + 1: sys.__stdout__.fileno(), + 2: sys.__stdout__.fileno() + } spawn_kwargs["env"] = self.settings.environ() if repo.sync_user is not None: def get_sync_user_data(sync_user): -- 2.4.9