Re: [gentoo-dev] Unused profiles

2017-01-19 Thread Daniel Campbell
On 01/19/2017 05:25 PM, Anthony G. Basile wrote:
> [snip]
> 
> Also, we should just drop a deprecated file into these profiles for now
> and wait a year before removing them from the tree.
> 

Agreed. Some sort of deprecation notice would make sense and give people
time to figure out a way forward with their machines.
-- 
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Unused profiles

2017-01-19 Thread Anthony G. Basile
Michal,

I'll look at all of the following ones over the weekend and get back to
you but here's my 2 cents:

> default/linux/mips/13.0/desktop
> default/linux/mips/13.0/developer
> default/linux/mips/13.0/mipsel/desktop
> default/linux/mips/13.0/mipsel/developer
> default/linux/mips/13.0/mipsel/multilib
> default/linux/mips/13.0/mipsel/n32/desktop
> default/linux/mips/13.0/mipsel/n32/developer
> default/linux/mips/13.0/mipsel/n64/desktop
> default/linux/mips/13.0/mipsel/n64/developer
> default/linux/mips/13.0/mipsel/o32/desktop
> default/linux/mips/13.0/mipsel/o32/developer
> default/linux/mips/13.0/multilib
> default/linux/mips/13.0/n32/desktop
> default/linux/mips/13.0/n32/developer
> default/linux/mips/13.0/n64/desktop
> default/linux/mips/13.0/n64/developer
> default/linux/mips/13.0/o32/desktop
> default/linux/mips/13.0/o32/developer

I think all of these can go except the multilib ones which can go into
profiles.desc.

> default/linux/powerpc/ppc64/13.0/desktop/gnome/systemd
> default/linux/powerpc/ppc64/13.0/desktop/kde/systemd
> default/linux/powerpc/ppc64/13.0/developer

I think these can go.


> hardened/linux/arm/armv4
> hardened/linux/arm/armv4t
> hardened/linux/arm/armv5te
> hardened/linux/arm/armv7a/selinux
> hardened/linux/mips/mipsel/multilib/n32
> hardened/linux/mips/mipsel/multilib/n64
> hardened/linux/mips/mipsel/n32
> hardened/linux/mips/mipsel/n64
> hardened/linux/mips/multilib/n32
> hardened/linux/mips/multilib/n64
> hardened/linux/mips/n32
> hardened/linux/mips/n64
> hardened/linux/uclibc/arm/armv6j

I think the arm can go but not the mips.  I'll verify and add those to
profiles.desc.


> uclibc/amd64
> uclibc/arm/2.4
> uclibc/mips/hardened
> uclibc/ppc/2.4
> uclibc/ppc/hardened/2.4
> uclibc/sh/2.4
> uclibc/x86/2.4
> uclibc/x86/2005.1/2.4
> uclibc/x86/hardened/2.4
> 

These can go except maybe uclibc/amd64.  FYI, I do not use
profiles/uclibc for my stuff but profiles/default/linux/uclibc.  However
there may be some people still using these older profiles, else I'd say
kill all of profiles/uclibc.

Also, we should just drop a deprecated file into these profiles for now
and wait a year before removing them from the tree.

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail: bluen...@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA



Re: [gentoo-portage-dev] Re: [PATCH V2] emaint: add more meaningful error messages to the logs module

2017-01-19 Thread Brian Dolbec
On Thu, 19 Jan 2017 23:02:28 +0200
Alexandru Elisei  wrote:

> The logs module can fail for a variety of reasons: the PORT_LOGDIR
> variable isn't set in make.conf or it doesn't point to a directory;
> the PORT_LOGDIR_CLEAN command uses a binary which isn't present in the
> system or the binary itself failed during execution. There is only one
> generic error message for all these cases. The patch adds error
> messages that better describe the reason for the failure.
> ---
> #
> # I've removed the check for rval being None because the only code
> path that # made that possible has been changed to return error code
> 78. #
>  pym/portage/emaint/modules/logs/logs.py | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/pym/portage/emaint/modules/logs/logs.py
> b/pym/portage/emaint/modules/logs/logs.py
> index 028084a..1b39d42 100644
> --- a/pym/portage/emaint/modules/logs/logs.py
> +++ b/pym/portage/emaint/modules/logs/logs.py
> @@ -8,6 +8,11 @@ from portage.util import shlex_split, varexpand
>  ## default clean command from make.globals
>  ## PORT_LOGDIR_CLEAN = 'find "${PORT_LOGDIR}" -type f ! -name
> "summary.log*" -mtime +7 -delete'
> 
> +ERROR_MESSAGES = {
> + 78  : "PORT_LOGDIR variable not set or PORT_LOGDIR not
> a directory.",
> + 127 : "PORT_LOGDIR_CLEAN command not found."
> +}
> +
>  class CleanLogs(object):
> 
>   short_desc = "Clean PORT_LOGDIR logs"
> @@ -81,7 +86,7 @@ class CleanLogs(object):
>   def _clean_logs(clean_cmd, settings):
>   logdir = settings.get("PORT_LOGDIR")
>   if logdir is None or not os.path.isdir(logdir):
> - return
> + return 78
> 
>   variables = {"PORT_LOGDIR" : logdir}
>   cmd = [varexpand(x, mydict=variables) for x in
> clean_cmd] @@ -97,8 +102,10 @@ class CleanLogs(object):
>   def _convert_errors(rval):
>   msg = []
>   if rval != os.EX_OK:
> - msg.append("PORT_LOGDIR_CLEAN command
> returned %s"
> - % ("%d" % rval if rval else "None"))
> + if rval in ERROR_MESSAGES:
> + msg.append(ERROR_MESSAGES[rval])
> + else:
> + msg.append("PORT_LOGDIR_CLEAN
> command returned %s" % rval) msg.append("See the make.conf(5) man
> page for " "PORT_LOGDIR_CLEAN usage instructions.")
>   return msg


Thanks, applied by hand.  Seems it was not rebased onto your previous
patches.  My editor also did a bit on whitespace cleanup.  So you will
likely have to force your branch to the new master since your commit
will likely not like mine.

-- 
Brian Dolbec 




[gentoo-portage-dev] Re: [PATCH V2] emaint: add more meaningful error messages to the logs module

2017-01-19 Thread Alexandru Elisei
The logs module can fail for a variety of reasons: the PORT_LOGDIR
variable isn't set in make.conf or it doesn't point to a directory; the
PORT_LOGDIR_CLEAN command uses a binary which isn't present in the
system or the binary itself failed during execution. There is only one
generic error message for all these cases. The patch adds error messages
that better describe the reason for the failure.
---
#
# I've removed the check for rval being None because the only code path that
# made that possible has been changed to return error code 78.
#
 pym/portage/emaint/modules/logs/logs.py | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/pym/portage/emaint/modules/logs/logs.py
b/pym/portage/emaint/modules/logs/logs.py
index 028084a..1b39d42 100644
--- a/pym/portage/emaint/modules/logs/logs.py
+++ b/pym/portage/emaint/modules/logs/logs.py
@@ -8,6 +8,11 @@ from portage.util import shlex_split, varexpand
 ## default clean command from make.globals
 ## PORT_LOGDIR_CLEAN = 'find "${PORT_LOGDIR}" -type f ! -name
"summary.log*" -mtime +7 -delete'

+ERROR_MESSAGES = {
+   78  : "PORT_LOGDIR variable not set or PORT_LOGDIR not a 
directory.",
+   127 : "PORT_LOGDIR_CLEAN command not found."
+}
+
 class CleanLogs(object):

short_desc = "Clean PORT_LOGDIR logs"
@@ -81,7 +86,7 @@ class CleanLogs(object):
def _clean_logs(clean_cmd, settings):
logdir = settings.get("PORT_LOGDIR")
if logdir is None or not os.path.isdir(logdir):
-   return
+   return 78

variables = {"PORT_LOGDIR" : logdir}
cmd = [varexpand(x, mydict=variables) for x in clean_cmd]
@@ -97,8 +102,10 @@ class CleanLogs(object):
def _convert_errors(rval):
msg = []
if rval != os.EX_OK:
-   msg.append("PORT_LOGDIR_CLEAN command returned %s"
-   % ("%d" % rval if rval else "None"))
+   if rval in ERROR_MESSAGES:
+   msg.append(ERROR_MESSAGES[rval])
+   else:
+   msg.append("PORT_LOGDIR_CLEAN command returned 
%s" % rval)
msg.append("See the make.conf(5) man page for "
"PORT_LOGDIR_CLEAN usage instructions.")
return msg
-- 
2.10.2



Re: [gentoo-portage-dev] Re: [PATCH V3] emaint: exit with non-zero status code when module fails (bug 567478)

2017-01-19 Thread Brian Dolbec
On Wed, 18 Jan 2017 19:15:54 +0200
Alexandru Elisei  wrote:

> Module functions currently return a message to emaint after
> invocation. Emaint prints this message then exits normally (with a
> success return code) even if the module encountered an error. This
> patch aims to change this by having each module public function
> return a tuple of (returncode, message), where returncode is boolean
> True if the function was successful or False otherwise. Emaint will
> inspect the return codes and exit unsuccessfully if necessary.
> 
> The variable PORT_LOGDIR was added to the test environment to prevent
> CleanLogs.clean() from failing when the variable isn't set or not a
> directory.
> ---
>  pym/portage/emaint/main.py| 12 +---
>  pym/portage/emaint/modules/binhost/binhost.py |  6 --
>  pym/portage/emaint/modules/config/config.py   |  6 --
>  pym/portage/emaint/modules/logs/logs.py   |  9 +
>  pym/portage/emaint/modules/merges/merges.py   | 18 +++---
>  pym/portage/emaint/modules/move/move.py   |  9 +++--
>  pym/portage/emaint/modules/resume/resume.py   |  3 ++-
>  pym/portage/emaint/modules/sync/sync.py   | 20
> +--- pym/portage/emaint/modules/world/world.py |
> 8 ++-- pym/portage/tests/emerge/test_simple.py   |  1 +
>  10 files changed, 62 insertions(+), 30 deletions(-)
> 
> diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
> index 65e3545..f448d6b 100644
> --- a/pym/portage/emaint/main.py
> +++ b/pym/portage/emaint/main.py
> @@ -115,6 +115,7 @@ class TaskHandler(object):
>   """Runs the module tasks"""
>   if tasks is None or func is None:
>   return
> + returncodes = []
>   for task in tasks:
>   inst = task()
>   show_progress = self.show_progress_bar and
> self.isatty @@ -135,14 +136,17 @@ class TaskHandler(object):
>   # them for other tasks if there is
> more to do. 'options': options.copy()
>   }
> - result = getattr(inst, func)(**kwargs)
> + returncode, msgs = getattr(inst,
> func)(**kwargs)
> + returncodes.append(returncode)
>   if show_progress:
>   # make sure the final progress is
> displayed self.progress_bar.display()
>   print()
>   self.progress_bar.stop()
>   if self.callback:
> - self.callback(result)
> + self.callback(msgs)
> +
> + return returncodes
> 
> 
>  def print_results(results):
> @@ -237,4 +241,6 @@ def emaint_main(myargv):
>   task_opts = options.__dict__
>   task_opts['return-messages'] = True
>   taskmaster = TaskHandler(callback=print_results,
> module_output=sys.stdout)
> - taskmaster.run_tasks(tasks, func, status, options=task_opts)
> + returncodes = taskmaster.run_tasks(tasks, func, status,
> options=task_opts) +
> + sys.exit(False in returncodes)
> diff --git a/pym/portage/emaint/modules/binhost/binhost.py
> b/pym/portage/emaint/modules/binhost/binhost.py
> index cf1213e..527b02f 100644
> --- a/pym/portage/emaint/modules/binhost/binhost.py
> +++ b/pym/portage/emaint/modules/binhost/binhost.py
> @@ -86,7 +86,9 @@ class BinhostHandler(object):
>   stale = set(metadata).difference(cpv_all)
>   for cpv in stale:
>   errors.append("'%s' is not in the
> repository" % cpv)
> - return errors
> + if errors:
> + return (False, errors)
> + return (True, None)
> 
>   def fix(self,  **kwargs):
>   onProgress = kwargs.get('onProgress', None)
> @@ -177,4 +179,4 @@ class BinhostHandler(object):
>   if maxval == 0:
>   maxval = 1
>   onProgress(maxval, maxval)
> - return None
> + return (True, None)
> diff --git a/pym/portage/emaint/modules/config/config.py
> b/pym/portage/emaint/modules/config/config.py
> index dad024b..a05a3c2 100644
> --- a/pym/portage/emaint/modules/config/config.py
> +++ b/pym/portage/emaint/modules/config/config.py
> @@ -36,7 +36,8 @@ class CleanConfig(object):
>   if onProgress:
>   onProgress(maxval, i+1)
>   i += 1
> - return self._format_output(messages)
> + msgs = self._format_output(messages)
> + return (True, msgs)
> 
>   def fix(self, **kwargs):
>   onProgress = kwargs.get('onProgress', None)
> @@ -65,7 +66,8 @@ class CleanConfig(object):
>   i += 1
>   if modified:
>   writedict(configs, 

Re: [gentoo-dev] Unused profiles

2017-01-19 Thread Johannes Huber
Hi Michal,

> default/linux/arm/13.0/armv4/desktop/plasma
> default/linux/arm/13.0/armv4t/desktop/plasma
> default/linux/arm/13.0/armv5te/desktop/plasma
> default/linux/arm/13.0/armv6j/desktop/plasma
> default/linux/arm/13.0/armv7a/desktop/plasma
> default/linux/arm/13.0/desktop/plasma/systemd

bug 588476 waiting for answer by arm.

> default/linux/powerpc/ppc64/13.0/desktop/kde/systemd

will be removed in 30 days after Plasma 4 removal.

Best regards,
Johannes



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


Re: [gentoo-portage-dev] [PATCH] emaint: add more meaningful error messages to the logs module

2017-01-19 Thread Brian Dolbec
On Thu, 19 Jan 2017 20:53:02 +0200
Alexandru Elisei  wrote:

> The logs module can fail for a variety of reasons: the PORT_LOGDIR
> variable isn't set in make.conf or it doesn't point to a directory;
> the PORT_LOGDIR_CLEAN command uses a binary which isn't present in the
> system or the binary itself failed during execution. There is only one
> generic error message for all these cases. The patch adds error
> messages that better describe the reason for the failure.
> ---
>  pym/portage/emaint/modules/logs/logs.py | 14 +++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/pym/portage/emaint/modules/logs/logs.py
> b/pym/portage/emaint/modules/logs/logs.py
> index fe65cf5..7633741 100644
> --- a/pym/portage/emaint/modules/logs/logs.py
> +++ b/pym/portage/emaint/modules/logs/logs.py
> @@ -8,6 +8,11 @@ from portage.util import shlex_split, varexpand
>  ## default clean command from make.globals
>  ## PORT_LOGDIR_CLEAN = 'find "${PORT_LOGDIR}" -type f ! -name
> "summary.log*" -mtime +7 -delete'
> 
> +ERROR_MESSAGES = {
> + 78  : "PORT_LOGDIR variable not set or PORT_LOGDIR not
> a directory.",
> + 127 : "PORT_LOGDIR_CLEAN command not found."
> +}
> +
>  class CleanLogs(object):
> 
>   short_desc = "Clean PORT_LOGDIR logs"
> @@ -80,7 +85,7 @@ class CleanLogs(object):
>   def _clean_logs(clean_cmd, settings):
>   logdir = settings.get("PORT_LOGDIR")
>   if logdir is None or not os.path.isdir(logdir):
> - return
> + return 78
> 
>   variables = {"PORT_LOGDIR" : logdir}
>   cmd = [varexpand(x, mydict=variables) for x in
> clean_cmd] @@ -96,8 +101,11 @@ class CleanLogs(object):
>   def _convert_errors(rval):
>   msg = []
>   if rval != os.EX_OK:
> - msg.append("PORT_LOGDIR_CLEAN command
> returned %s"
> - % ("%d" % rval if rval else "None"))
> + if rval in ERROR_MESSAGES:
> + msg.append(ERROR_MESSAGES[rval])
> + else:
> + msg.append("PORT_LOGDIR_CLEAN
> command returned %s"
> + % ("%d" % rval if rval else
> "None")) msg.append("See the make.conf(5) man page for "
>   "PORT_LOGDIR_CLEAN usage
> instructions.") return msg

Thank you, looks good

-- 
Brian Dolbec 




[gentoo-dev] Last-rites: Plasma 4 & related

2017-01-19 Thread Johannes Huber
# Johannes Huber  (19 Jan 2017)
# Plasma 4 removal in 30 days.
# Please read news item. All packages export to kde-sunset overlay.
# Gentoo bugs #473678, #528612, #537062, #586814.S
kde-plasma/bluedevil:4
kde-plasma/freespacenotifier
kde-plasma/kcheckpass
kde-plasma/kcminit
kde-plasma/kdebase-cursors
kde-plasma/kdebase-pam
kde-plasma/kdebase-startkde
kde-plasma/kde-gtk-config:4
kde-plasma/kdeplasma-addons:4
kde-plasma/kdm
kde-plasma/kephal
kde-plasma/khotkeys:4
kde-plasma/kinfocenter:4
kde-plasma/klipper
kde-plasma/kmenuedit:4
kde-plasma/krunner
kde-plasma/ksmserver
kde-plasma/kscreen:4
kde-plasma/kscreensaver
kde-plasma/ksplash
kde-plasma/ksshaskpass:4
kde-plasma/kstartupconfig
kde-plasma/kstyles
kde-plasma/ksysguard:4
kde-plasma/ksystraycmd
kde-plasma/kwin:4
kde-plasma/kwrited:4
kde-plasma/libkgreeter
kde-plasma/libkscreen:4
kde-plasma/liboxygenstyle
kde-plasma/libplasmaclock
kde-plasma/libplasmagenericshell
kde-plasma/libtaskmanager
kde-plasma/milou:4
kde-plasma/plasma-nm:4
kde-plasma/plasma-workspace:4
kde-plasma/powerdevil:4
kde-plasma/solid-actions-kcm
kde-plasma/systemsettings:4
kde-misc/about-distro
kde-misc/adjustableclock
kde-misc/baloo-kcmadv
kde-misc/bkodama
kde-misc/chromi
kde-misc/commandwatch
kde-misc/cpuload
kde-misc/customizable-weather
kde-misc/drop2ftp
kde-misc/emerging-plasmoid
kde-misc/eventlist
kde-misc/eyesaver
kde-misc/fancytasks
kde-misc/geekclock
kde-misc/gx-mail-notify
kde-misc/hdaps_monitor
kde-misc/homerun
kde-misc/kbstateapplet
kde-misc/kcm-grub2
kde-misc/kcm-touchpad
kde-misc/kcm-ufw
kde-misc/kcometen4
kde-misc/kdmthemegenerator
kde-misc/kepas
kde-misc/kgrubeditor
kde-misc/kprayertime
kde-misc/kraidmonitor
kde-misc/krunner-googletranslate
kde-misc/krunner-kopete-contacts
kde-misc/ksplasher
kde-misc/ktrafficanalyzer
kde-misc/kvkbd
kde-misc/miniplayer
kde-misc/nightmode
kde-misc/nvdevmon
kde-misc/plasma-applet-daisy
kde-misc/plasma-emergelog
kde-misc/plasma-lionmail
kde-misc/plasma-mpd-nowplaying
kde-misc/plasma-network-status
kde-misc/plasma-photooftheday
kde-misc/plasma-widget-menubar
kde-misc/plasma-widget-message-indicator
kde-misc/plasma-wifi
kde-misc/plasmatvgr
kde-misc/plasma-wifi
kde-misc/plasmoid-workflow
kde-misc/pyrad
kde-misc/quickaccess
kde-misc/redshift-plasmoid
kde-misc/serverstatuswidget
kde-misc/smooth-tasks
kde-misc/stdin-plasmoid
kde-misc/steamcompanion
kde-misc/stock-quote
kde-misc/synaptiks
kde-misc/wicd-client-kde
kde-misc/yawp
net-libs/libbluedevil
net-libs/libmm-qt
net-libs/libnm-qt
x11-themes/dekorator
x11-themes/nitrogen
x11-themes/skulpture
x11-themes/smaragd


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


Re: [gentoo-dev] News item: KDE Workspaces 4.11 and KDE profile removal

2017-01-19 Thread Andreas Sturmlechner
Thanks to everyone providing feedback. News item submitted.

Best Regards,
Andreas




Re: [gentoo-dev] Unused profiles

2017-01-19 Thread William L. Thomson Jr.
This may also be another use of a graveyard overlay; packages, profiles, 
eclasses, anything else removed from tree.

-- 
William L. Thomson Jr.


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


Re: [gentoo-dev] Unused profiles

2017-01-19 Thread Michał Górny
Ok, a little update. Here's a list with deprecated profiles excluded:

arch/arm64/big-endian
arch/x86/xbox
default/linux/amd64/dev/32bit-userland
default/linux/arm/13.0/armv4/desktop/plasma
default/linux/arm/13.0/armv4t/desktop/plasma
default/linux/arm/13.0/armv5te/desktop/plasma
default/linux/arm/13.0/armv6j/desktop/plasma
default/linux/arm/13.0/armv7a/desktop/plasma
default/linux/arm/13.0/desktop/plasma/systemd
default/linux/mips/13.0/desktop
default/linux/mips/13.0/developer
default/linux/mips/13.0/mipsel/desktop
default/linux/mips/13.0/mipsel/developer
default/linux/mips/13.0/mipsel/multilib
default/linux/mips/13.0/mipsel/n32/desktop
default/linux/mips/13.0/mipsel/n32/developer
default/linux/mips/13.0/mipsel/n64/desktop
default/linux/mips/13.0/mipsel/n64/developer
default/linux/mips/13.0/mipsel/o32/desktop
default/linux/mips/13.0/mipsel/o32/developer
default/linux/mips/13.0/multilib
default/linux/mips/13.0/n32/desktop
default/linux/mips/13.0/n32/developer
default/linux/mips/13.0/n64/desktop
default/linux/mips/13.0/n64/developer
default/linux/mips/13.0/o32/desktop
default/linux/mips/13.0/o32/developer
default/linux/powerpc/ppc64/13.0/desktop/gnome/systemd
default/linux/powerpc/ppc64/13.0/desktop/kde/systemd
default/linux/powerpc/ppc64/13.0/developer
default/linux/riscv/13.0/desktop
default/linux/riscv/13.0/developer
default/linux/sparc/experimental/multilib/desktop
default/linux/sparc/experimental/multilib/developer
embedded
features/32bit-native
hardened/linux/arm/armv4
hardened/linux/arm/armv4t
hardened/linux/arm/armv5te
hardened/linux/arm/armv7a/selinux
hardened/linux/mips/mipsel/multilib/n32
hardened/linux/mips/mipsel/multilib/n64
hardened/linux/mips/mipsel/n32
hardened/linux/mips/mipsel/n64
hardened/linux/mips/multilib/n32
hardened/linux/mips/multilib/n64
hardened/linux/mips/n32
hardened/linux/mips/n64
hardened/linux/uclibc/arm/armv6j
prefix/aix/7.1.0.0/ppc
prefix/bsd/freebsd/arch
prefix/darwin/macos/10.4/ppc64
prefix/darwin/macos/10.5/ppc64
prefix/darwin/macos/arch
prefix/hpux/B.11.11/hppa2.0
prefix/linux-standalone/arm
prefix/sunos/solaris/5.9/sparc64
prefix/sunos/solaris/arch
uclibc/amd64
uclibc/arm/2.4
uclibc/mips/hardened
uclibc/ppc/2.4
uclibc/ppc/hardened/2.4
uclibc/sh/2.4
uclibc/x86/2.4
uclibc/x86/2005.1/2.4
uclibc/x86/hardened/2.4

-- 
Best regards,
Michał Górny



pgpwifObQ0H70.pgp
Description: OpenPGP digital signature


[gentoo-portage-dev] [PATCH] emaint: add more meaningful error messages to the logs module

2017-01-19 Thread Alexandru Elisei
The logs module can fail for a variety of reasons: the PORT_LOGDIR
variable isn't set in make.conf or it doesn't point to a directory; the
PORT_LOGDIR_CLEAN command uses a binary which isn't present in the
system or the binary itself failed during execution. There is only one
generic error message for all these cases. The patch adds error messages
that better describe the reason for the failure.
---
 pym/portage/emaint/modules/logs/logs.py | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/pym/portage/emaint/modules/logs/logs.py
b/pym/portage/emaint/modules/logs/logs.py
index fe65cf5..7633741 100644
--- a/pym/portage/emaint/modules/logs/logs.py
+++ b/pym/portage/emaint/modules/logs/logs.py
@@ -8,6 +8,11 @@ from portage.util import shlex_split, varexpand
 ## default clean command from make.globals
 ## PORT_LOGDIR_CLEAN = 'find "${PORT_LOGDIR}" -type f ! -name
"summary.log*" -mtime +7 -delete'

+ERROR_MESSAGES = {
+   78  : "PORT_LOGDIR variable not set or PORT_LOGDIR not a 
directory.",
+   127 : "PORT_LOGDIR_CLEAN command not found."
+}
+
 class CleanLogs(object):

short_desc = "Clean PORT_LOGDIR logs"
@@ -80,7 +85,7 @@ class CleanLogs(object):
def _clean_logs(clean_cmd, settings):
logdir = settings.get("PORT_LOGDIR")
if logdir is None or not os.path.isdir(logdir):
-   return
+   return 78

variables = {"PORT_LOGDIR" : logdir}
cmd = [varexpand(x, mydict=variables) for x in clean_cmd]
@@ -96,8 +101,11 @@ class CleanLogs(object):
def _convert_errors(rval):
msg = []
if rval != os.EX_OK:
-   msg.append("PORT_LOGDIR_CLEAN command returned %s"
-   % ("%d" % rval if rval else "None"))
+   if rval in ERROR_MESSAGES:
+   msg.append(ERROR_MESSAGES[rval])
+   else:
+   msg.append("PORT_LOGDIR_CLEAN command returned 
%s"
+   % ("%d" % rval if rval else "None"))
msg.append("See the make.conf(5) man page for "
"PORT_LOGDIR_CLEAN usage instructions.")
return msg
-- 
2.10.2



Re: [gentoo-dev] Unused profiles

2017-01-19 Thread Alexis Ballier
On Thu, 19 Jan 2017 18:30:10 +0100
Alexis Ballier  wrote:

> On Thu, 19 Jan 2017 18:08:26 +0100
> Michał Górny  wrote:
> 
> > (CC-ing a lot of potentially interested teams)
> > 
> > Hi, everyone.
> > 
> > I've did a quick sweep of profiles/ directory for unused profiles.
> > Unused means: not used as parent of any other profile, and not
> > listed in profiles.desc.  
> 
> For deleting a profile, unused means "no user is currently using it".
> I think "remove after 1 year out of profiles.desc" is a much saner
> rule for deletion.

And obviously, assuming people add the 'deprecated' file there when
removing from profiles.desc so that users get notified.



Re: [gentoo-dev] Unused profiles

2017-01-19 Thread Alexis Ballier
On Thu, 19 Jan 2017 18:08:26 +0100
Michał Górny  wrote:

> (CC-ing a lot of potentially interested teams)
> 
> Hi, everyone.
> 
> I've did a quick sweep of profiles/ directory for unused profiles.
> Unused means: not used as parent of any other profile, and not listed
> in profiles.desc.

For deleting a profile, unused means "no user is currently using it".
I think "remove after 1 year out of profiles.desc" is a much saner rule
for deletion.



[gentoo-dev] Unused profiles

2017-01-19 Thread Michał Górny
(CC-ing a lot of potentially interested teams)

Hi, everyone.

I've did a quick sweep of profiles/ directory for unused profiles.
Unused means: not used as parent of any other profile, and not listed
in profiles.desc.

Note that the list does not include parents of the listed profiles
since they are still used by them ;-).

Please let me know which of the profiles are worth keeping, and which
can be killed entirely. If you prefer to keep them, please consider
adding them to profiles.desc so that our users can officially use them.

List follows


arch/arm64/big-endian
arch/x86/xbox
default/bsd/fbsd/amd64/10.2/clang
default/bsd/fbsd/x86/10.2
default/linux/amd64/dev/32bit-userland
default/linux/arm/13.0/armv4/desktop/plasma
default/linux/arm/13.0/armv4t/desktop/plasma
default/linux/arm/13.0/armv5te/desktop/plasma
default/linux/arm/13.0/armv6j/desktop/plasma
default/linux/arm/13.0/armv7a/desktop/plasma
default/linux/arm/13.0/desktop/plasma/systemd
default/linux/mips/13.0/desktop
default/linux/mips/13.0/developer
default/linux/mips/13.0/mipsel/desktop
default/linux/mips/13.0/mipsel/developer
default/linux/mips/13.0/mipsel/multilib
default/linux/mips/13.0/mipsel/n32/desktop
default/linux/mips/13.0/mipsel/n32/developer
default/linux/mips/13.0/mipsel/n64/desktop
default/linux/mips/13.0/mipsel/n64/developer
default/linux/mips/13.0/mipsel/o32/desktop
default/linux/mips/13.0/mipsel/o32/developer
default/linux/mips/13.0/multilib
default/linux/mips/13.0/n32/desktop
default/linux/mips/13.0/n32/developer
default/linux/mips/13.0/n64/desktop
default/linux/mips/13.0/n64/developer
default/linux/mips/13.0/o32/desktop
default/linux/mips/13.0/o32/developer
default/linux/powerpc/ppc64/13.0/desktop/gnome/systemd
default/linux/powerpc/ppc64/13.0/desktop/kde/systemd
default/linux/powerpc/ppc64/13.0/developer
default/linux/riscv/13.0/desktop
default/linux/riscv/13.0/developer
default/linux/sparc/experimental/multilib/desktop
default/linux/sparc/experimental/multilib/developer
embedded
features/32bit-native
hardened/linux/arm/armv4
hardened/linux/arm/armv4t
hardened/linux/arm/armv5te
hardened/linux/arm/armv7a/selinux
hardened/linux/mips/mipsel/multilib/n32
hardened/linux/mips/mipsel/multilib/n64
hardened/linux/mips/mipsel/n32
hardened/linux/mips/mipsel/n64
hardened/linux/mips/multilib/n32
hardened/linux/mips/multilib/n64
hardened/linux/mips/n32
hardened/linux/mips/n64
hardened/linux/uclibc/arm/armv6j
prefix/aix/7.1.0.0/ppc
prefix/bsd/freebsd/arch
prefix/darwin/macos/10.4/ppc64
prefix/darwin/macos/10.5/ppc64
prefix/darwin/macos/arch
prefix/hpux/B.11.11/hppa2.0
prefix/linux-standalone/arm
prefix/sunos/solaris/5.9/sparc64
prefix/sunos/solaris/arch
uclibc/amd64
uclibc/arm/2.4
uclibc/arm/armeb/2.4
uclibc/mips/hardened
uclibc/mips/mipsel/hardened
uclibc/ppc/2.4
uclibc/ppc/hardened/2.4
uclibc/sh/2.4
uclibc/x86/2.4
uclibc/x86/2005.1/2.4
uclibc/x86/hardened/2.4
uclibc/x86/linux24
uclibc/x86/linux26


-- 
Best regards,
Michał Górny



pgpVBFbPedRSh.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] MANPATH handling in ebuilds

2017-01-19 Thread Mike Gilbert
On Thu, Jan 19, 2017 at 8:45 AM, Gilles Dartiguelongue  wrote:
> Le mercredi 04 janvier 2017 à 21:12 +, Wolfgang Mueller a écrit :
>> is definitely not set when executing cron scripts like that. I
>> deleted all mandoc.db files and waited for them to be regenerated.
>> Only
>> the one in /usr/share/man was generated, which means that makewhatis
>> fell back to the defaults since MANPATH was empty.
>>
>> Just as I am composing this mail, the cron script that had `source
>> /etc/profile' in it before makewhatis ran, and all the databases are
>> there.
>>
>> Bottom line: MANPATH is not available in cron scripts.
>
> Could you open a bug report on https://bugzilla.gentoo.org/, I think
> this could be a very long standing bug.

It's debatable whether this is a "bug" or not; I don't think it really is.

crontab(1p) says this:

   Upon execution of a command from a crontab entry,  the  implementa‐
   tion shall supply a default environment, defining at least the fol‐
   lowing environment variables:

   HOME  A pathname of the user's home directory.

   LOGNAME   The user's login name.

   PATH  A string representing a search path  guaranteed  to  find
 all of the standard utilities.

   SHELL A  pathname  of  the command interpreter. When crontab is
 invoked as specified by this volume of POSIX.1‐2008,  the
 value shall be a pathname for sh.

If a script executed by cron needs additional env vars, it should
probably source /etc/profile or /etc/profile.env itself.



Re: [gentoo-dev] MANPATH handling in ebuilds

2017-01-19 Thread Gilles Dartiguelongue
Le mercredi 04 janvier 2017 à 21:12 +, Wolfgang Mueller a écrit :
> is definitely not set when executing cron scripts like that. I
> deleted all mandoc.db files and waited for them to be regenerated.
> Only
> the one in /usr/share/man was generated, which means that makewhatis
> fell back to the defaults since MANPATH was empty.
> 
> Just as I am composing this mail, the cron script that had `source
> /etc/profile' in it before makewhatis ran, and all the databases are
> there.
> 
> Bottom line: MANPATH is not available in cron scripts.

Could you open a bug report on https://bugzilla.gentoo.org/, I think
this could be a very long standing bug.

-- 
Gilles Dartiguelongue 

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