Re: [gentoo-dev] Re: [PATCH] Fix tc-cpp-is-true to work with clang

2019-11-06 Thread Sergei Trofimovich
On Mon, 4 Nov 2019 20:18:11 +
Sergei Trofimovich  wrote:

> On Mon,  4 Nov 2019 10:11:20 +
> Mattias Nissler  wrote:
> 
> > Clang's preprocessor likes to output a leading newline, which makes
> > the comparison always fail. GCC generates additional output with certain
> > flags (e.g. -ggdb3) as well. Hence, switch the test to trigger a
> > preprocessor error when the condition is not true and examine the exit
> > code.
> > 
> > Bug: https://bugs.gentoo.org/698912
> > 
> > Signed-off-by: Mattias Nissler 
> > ---
> >  eclass/toolchain-funcs.eclass | 15 +++
> >  1 file changed, 7 insertions(+), 8 deletions(-)  
> 
> Looks good! I'll pull it in to ::gentoo in a few days.

Pushed to ::gentoo as:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ef6b9da7bb04afd77e1bc5db011b02d658a
Also while at it added basic regression test:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f02136721af40dd89a09101504750fb28f8142e

-- 

  Sergei



Re: [gentoo-dev] Last rites: media-gfx/aoi, media-gfx/exiftags, media-gfx/jpeg2ps

2019-11-06 Thread Ulrich Mueller
> On Wed, 06 Nov 2019, Michał Górny wrote:

> # Old EAPI 0 graphics-related packages.
> #
> # media-gfx/aoi was last bumped in Nov 2009.  It is still actively
> # developed upstream, and it's waiting for a bump since Dec 2009.
> # It suffers from bundled dependencies (#177026).
> #
> # media-gfx/exiftags was last bumped in 2007.  It did not have any new
> # releases since, and does not seem to have any unique features.
> # media-gfx/exiv2 seems to be a more commonly installed replacement.
> #
> # media-gfx/jpeg2ps was last bumped in 2004.  The upstream homepage
> # is gone.  The package is non-free.
> #
> # Removal in 30 days.  Bug #697288.
> media-gfx/aoi
> media-gfx/exiftags
> media-gfx/jpeg2ps

jpeg2ps is a small tool which is feature-complete and works just fine
here (and compiles without any warnings).

I can take maintainership.


signature.asc
Description: PGP signature


[gentoo-dev] Last rites: app-text/info2html

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# EAPI 0.  Last upstream release in 2006.
# Removal in 30 days.  Bug #697372.
app-text/info2html

-- 
Best regards,
Michał Górny



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


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

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# EAPI 0.  Last bumped in 2004.  Upstream is active, so this really
# needs a major version bump.  Multiple bugs reported.
# Removal in 30 days.  Bug #697392.
app-misc/matew

-- 
Best regards,
Michał Górny



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


[gentoo-dev] Last rites: www-apps/mod_survey

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# EAPI 0.  Last bumped in 2008.  Homepage gone.
# Removal in 30 days.  Bug #697156.
www-apps/mod_survey

-- 
Best regards,
Michał Górny



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


[gentoo-dev] Last rites: www-apps/drraw

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# EAPI 0.  Last bumped in 2005.  Homepage gone.
# Removal in 30 days.  Bug #697154.
www-apps/drraw

-- 
Best regards,
Michał Górny



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


[gentoo-dev] Last rites: net-misc/hsc

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# EAPI 0.  Last bumped in 2008.  Homepage gone.  No revdeps.
# Removal in 30 days.  Bug #697238.
net-misc/hsc

-- 
Best regards,
Michał Górny



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


Re: [gentoo-dev] Last rites: media-gfx/aoi, media-gfx/exiftags, media-gfx/jpeg2ps

2019-11-06 Thread waebbl
The media-gfx/aoi package looks like it might be worth preserving. I'm
currently low on ressources, but I'm going to copy the package over to my
overlay, and when I get some time, will bump the package and probably ask
for re-adding it.

Regards,
Bernd


Am Mi., 6. Nov. 2019 um 19:53 Uhr schrieb Michał Górny :

> # Michał Górny  (2019-11-06)
> # Old EAPI 0 graphics-related packages.
> #
> # media-gfx/aoi was last bumped in Nov 2009.  It is still actively
> # developed upstream, and it's waiting for a bump since Dec 2009.
> # It suffers from bundled dependencies (#177026).
> #
> # media-gfx/exiftags was last bumped in 2007.  It did not have any new
> # releases since, and does not seem to have any unique features.
> # media-gfx/exiv2 seems to be a more commonly installed replacement.
> #
> # media-gfx/jpeg2ps was last bumped in 2004.  The upstream homepage
> # is gone.  The package is non-free.
> #
> # Removal in 30 days.  Bug #697288.
> media-gfx/aoi
> media-gfx/exiftags
> media-gfx/jpeg2ps
>
> --
> Best regards,
> Michał Górny
>
>
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEKbqdX3+q71mbfP1xLiRqTnFapoMFAlu7OCEACgkQLiRqTnFa
poNFsw//biiEGzWLCUZLsdk1hm2zWrvPlCH877La1bLV/xuqFGs/y4X3Nv4CLX4g
5NWzgWdC1cLDD9hRbY+MM5U1GQjDX1E4rC5c12sA23n4cn0STM97LL4ofYZasBGV
2vIAhkJe+KwFuGhpprjGBqZAbizB2q5ymfNfNUycJxcyadt2Uq52iEheOBNpAIXB
apout3xQlZG+7QRsiqbpOY+UoTPPZJPUNs24YCbBXHUg+8qNnNhvjrleFleWOtOl
U814TOZQSebgUt6IOdVZm3M1tjZSVIgSHvGsWf70zDqLHQW6h5rgp3C6Ie59J9L8
5hPptR01Fu3SiYOQSW1gj1NRZkFZljjWLMGdI21ZA8cQbyqKKo51YLnPETevV17r
OzAE03na0wMxUdXyZMbh5ZykyH9HaSBKSG4Cpbx1ukq2421w8DHgbuW0yN7xyRDY
3KGtBhYPF3P78vhOQONVsCLGq3JWNIHoDWJYaZ9h2Cj1i5RZBN3VoDmMwZq5omdL
Dpbe7y2L2kZRI3qKeg9jQggyjtokyt/usNTAICLDRqWd+Zrqj9HHcgGvKJumGj9m
5JIJeKGl0JwrtvpUHPBh/W27Aium60NylXKxL0biWLHkOLEXVklxEYsdE5s7IZgy
E6ZHEpA55qC64JLkRWh3P+jN4qaLED+QUF856L3+wmhNePMrmSo=
=+sCv
-END PGP SIGNATURE-


[gentoo-dev] Last rites: media-gfx/opcion

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# EAPI 0.  Last bumped in 2004, and no new releases since.
# Removal in 30 days.  Bug #697286.
media-gfx/opcion

-- 
Best regards,
Michał Górny



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


[gentoo-dev] Last rites: media-gfx/aoi, media-gfx/exiftags, media-gfx/jpeg2ps

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# Old EAPI 0 graphics-related packages.
#
# media-gfx/aoi was last bumped in Nov 2009.  It is still actively
# developed upstream, and it's waiting for a bump since Dec 2009.
# It suffers from bundled dependencies (#177026).
#
# media-gfx/exiftags was last bumped in 2007.  It did not have any new
# releases since, and does not seem to have any unique features.
# media-gfx/exiv2 seems to be a more commonly installed replacement.
#
# media-gfx/jpeg2ps was last bumped in 2004.  The upstream homepage
# is gone.  The package is non-free.
#
# Removal in 30 days.  Bug #697288.
media-gfx/aoi
media-gfx/exiftags
media-gfx/jpeg2ps

-- 
Best regards,
Michał Górny



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


Re: [gentoo-dev] Last rites: net-mail/pflogsumm

2019-11-06 Thread Tomas Mozes
On Wed, Nov 6, 2019 at 11:22 AM Michał Górny  wrote:

> # Michał Górny  (2019-11-06)
> # Unmaintained.  EAPI 0.  Last revdep gone.
> # Removal in 30 days.  Bug #699438.
> net-mail/pflogsumm
>
> --
> Best regards,
> Michał Górny
>
>
I'll take it: https://github.com/gentoo/gentoo/pull/13567


[gentoo-dev] Multiple potentially empty projects need help: Keys, Layman

2019-11-06 Thread Michał Górny
Hi,

Due to dolsen's prolonged absence, a few projects may be in dire need
of help.  Notably:

- Keys project is left without a lead, and I think it's effectively
dead,

- Layman project is left with no developers.

Other teams (Catalyst, Portage Tools) may also need some help.

-- 
Best regards,
Michał Górny



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


[gentoo-dev] Last rites: net-mail/pflogsumm

2019-11-06 Thread Michał Górny
# Michał Górny  (2019-11-06)
# Unmaintained.  EAPI 0.  Last revdep gone.
# Removal in 30 days.  Bug #699438.
net-mail/pflogsumm

-- 
Best regards,
Michał Górny



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


[gentoo-portage-dev] [PATCH 2/2] emaint: log FileCopier exceptions

2019-11-06 Thread Zac Medico
Since FileCopier now captures exceptions instead of showing
a traceback, it's necessary to explicitly log them.

Bug: https://bugs.gentoo.org/699400
Signed-off-by: Zac Medico 
---
 lib/portage/_emirrordist/DeletionTask.py | 2 +-
 lib/portage/_emirrordist/FetchTask.py| 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/portage/_emirrordist/DeletionTask.py 
b/lib/portage/_emirrordist/DeletionTask.py
index 2fdafd59e..5eb01d840 100644
--- a/lib/portage/_emirrordist/DeletionTask.py
+++ b/lib/portage/_emirrordist/DeletionTask.py
@@ -85,7 +85,7 @@ class DeletionTask(CompositeTask):
 
else:
logging.error(("%s copy from distfiles "
-   "to recycle failed") % (self.distfile,))
+   "to recycle failed: %s") % (self.distfile, 
copier.future.exception()))
success = False
 
if success:
diff --git a/lib/portage/_emirrordist/FetchTask.py 
b/lib/portage/_emirrordist/FetchTask.py
index 6f547d397..61812ab59 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -372,8 +372,8 @@ class FetchTask(CompositeTask):
 
current_mirror = self._current_mirror
if copier.returncode != os.EX_OK:
-   msg = "%s %s copy failed unexpectedly" % \
-   (self.distfile, current_mirror.name)
+   msg = "%s %s copy failed unexpectedly: %s" % \
+   (self.distfile, current_mirror.name, 
copier.future.exception())
self.scheduler.output(msg + '\n', background=True,
log_path=self._log_path)
logging.error(msg)
@@ -549,8 +549,8 @@ class FetchTask(CompositeTask):
self._make_layout_links()
else:
# out of space?
-   msg = "%s %s copy failed unexpectedly" % \
-   (self.distfile, self._fetch_tmp_dir_info)
+   msg = "%s %s copy failed unexpectedly: %s" % \
+   (self.distfile, self._fetch_tmp_dir_info, 
copier.future.exception())
self.scheduler.output(msg + '\n', background=True,
log_path=self._log_path)
logging.error(msg)
-- 
2.21.0




[gentoo-portage-dev] [PATCH 0/2] emaint: clean up FileCopier exception logging

2019-11-06 Thread Zac Medico
Use ForkExecutor to capture exceptions instead of showing
a full traceback. FileCopier callers will now be responsible
for displaying relevant exception messages.

Bug: https://bugs.gentoo.org/699400

Zac Medico (2):
  FileCopier: capture exceptions
  emaint: log FileCopier exceptions

 lib/portage/_emirrordist/DeletionTask.py   |  2 +-
 lib/portage/_emirrordist/FetchTask.py  |  8 ++--
 lib/portage/tests/util/test_file_copier.py | 44 ++
 lib/portage/util/_async/FileCopier.py  | 16 
 4 files changed, 58 insertions(+), 12 deletions(-)
 create mode 100644 lib/portage/tests/util/test_file_copier.py

-- 
2.21.0




[gentoo-portage-dev] [PATCH 1/2] FileCopier: capture exceptions

2019-11-06 Thread Zac Medico
Use ForkExecutor to capture exceptions instead of showing
a full traceback. FileCopier callers will now be responsible
for displaying relevant exception messages.

Bug: https://bugs.gentoo.org/699400
Signed-off-by: Zac Medico 
---
 lib/portage/tests/util/test_file_copier.py | 44 ++
 lib/portage/util/_async/FileCopier.py  | 16 
 2 files changed, 53 insertions(+), 7 deletions(-)
 create mode 100644 lib/portage/tests/util/test_file_copier.py

diff --git a/lib/portage/tests/util/test_file_copier.py 
b/lib/portage/tests/util/test_file_copier.py
new file mode 100644
index 0..01dfba494
--- /dev/null
+++ b/lib/portage/tests/util/test_file_copier.py
@@ -0,0 +1,44 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+import errno
+import os
+import shutil
+import tempfile
+
+from portage.tests import TestCase
+from portage.util._async.FileCopier import FileCopier
+from portage.util._eventloop.global_event_loop import global_event_loop
+
+
+class FileCopierTestCase(TestCase):
+
+   def testFileCopier(self):
+   loop = global_event_loop()
+   tempdir = tempfile.mkdtemp()
+   try:
+
+   # regular successful copy
+   src_path = os.path.join(tempdir, 'src')
+   dest_path = os.path.join(tempdir, 'dest')
+   content = b'foo'
+   with open(src_path, 'wb') as f:
+   f.write(content)
+   copier = FileCopier(src_path=src_path, 
dest_path=dest_path, scheduler=loop)
+   copier.start()
+   loop.run_until_complete(copier.async_wait())
+   self.assertEqual(copier.returncode, 0)
+   copier.future.result()
+   with open(dest_path, 'rb') as f:
+   self.assertEqual(f.read(), content)
+
+   # failure due to nonexistent src_path
+   src_path = os.path.join(tempdir, 'does-not-exist')
+   copier = FileCopier(src_path=src_path, 
dest_path=dest_path, scheduler=loop)
+   copier.start()
+   loop.run_until_complete(copier.async_wait())
+   self.assertEqual(copier.returncode, 1)
+   self.assertEqual(copier.future.exception().errno, 
errno.ENOENT)
+   self.assertEqual(copier.future.exception().filename, 
src_path.encode('utf8'))
+   finally:
+   shutil.rmtree(tempdir)
diff --git a/lib/portage/util/_async/FileCopier.py 
b/lib/portage/util/_async/FileCopier.py
index 27e5ab4c0..3a0be4b63 100644
--- a/lib/portage/util/_async/FileCopier.py
+++ b/lib/portage/util/_async/FileCopier.py
@@ -1,17 +1,19 @@
-# Copyright 2013 Gentoo Foundation
+# Copyright 2013-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-from portage import os
 from portage import shutil
-from portage.util._async.ForkProcess import ForkProcess
+from portage.util.futures import asyncio
+from portage.util.futures.executor.fork import ForkExecutor
+from portage.util._async.AsyncTaskFuture import AsyncTaskFuture
 
-class FileCopier(ForkProcess):
+class FileCopier(AsyncTaskFuture):
"""
Asynchronously copy a file.
"""
 
__slots__ = ('src_path', 'dest_path')
 
-   def _run(self):
-   shutil.copy(self.src_path, self.dest_path)
-   return os.EX_OK
+   def _start(self):
+   self.future = 
asyncio.ensure_future(self.scheduler.run_in_executor(ForkExecutor(loop=self.scheduler),
+   shutil.copy, self.src_path, self.dest_path))
+   super(FileCopier, self)._start()
-- 
2.21.0