[gentoo-dev] Automated Package Removal and Addition Tracker, for the week ending 2017-04-30 23:59 UTC

2017-04-30 Thread Robin H. Johnson
The attached list notes all of the packages that were added or removed
from the tree, for the week ending 2017-04-30 23:59 UTC.

Removals:
dev-java/swing-worker 20170425-21:55 monsieurp  8b5791bf4af
dev-perl/File-DirWalk 20170426-23:40 dilfridge  059f696a581

Additions:
dev-ada/aunit 20170426-18:32 tupone e2658d94c1c
dev-ada/aws   20170430-20:36 tupone 1526c880d20
dev-ada/gnatmem   20170425-19:52 tupone d8e663b26f5
dev-ada/gps-bin   20170430-17:27 tupone fa458aa29ce
dev-python/asn1crypto 20170425-18:33 djc7362a34b881
dev-python/py-lz4framed   20170428-13:16 mrueg  892032a6d4f
dev-ros/rosdiagnostic 20170426-17:26 aballier   0633d002304
games-action/descent1-data20170426-22:16 chewi  deba87d7ea0
games-action/descent2-vertigo 20170426-22:31 chewi  b0d7ed30922
games-action/dxx-rebirth  20170427-21:18 chewi  efe0a6b71b3
games-rpg/comi20170426-21:35 chewi  a8fd61c1b88
gnustep-apps/pikopixel20170427-12:30 voyageur   dacab65f9d5
kde-misc/latte-dock   20170425-13:20 kensington c983b87c3cb
net-analyzer/nessus-agent-bin 20170306-09:21 mareckicb16b4d13af
net-misc/kafkacat 20170425-15:49 mrueg  b6c0516df27
sys-apps/mcstrans 20170426-18:02 perfinion  24edb9749c6
sys-apps/restorecond  20170426-18:08 perfinion  e23657020be
x11-misc/safeeyes 20170429-19:30 sping  a5289693d45

--
Robin Hugh Johnson
Gentoo Linux Developer
E-Mail : robb...@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Removed Packages:
dev-perl/File-DirWalk,removed,dilfridge,20170426-23:40,059f696a581
dev-java/swing-worker,removed,monsieurp,20170425-21:55,8b5791bf4af
Added Packages:
dev-ada/aws,added,tupone,20170430-20:36,1526c880d20
dev-ada/gps-bin,added,tupone,20170430-17:27,fa458aa29ce
x11-misc/safeeyes,added,sping,20170429-19:30,a5289693d45
dev-python/py-lz4framed,added,mrueg,20170428-13:16,892032a6d4f
games-action/dxx-rebirth,added,chewi,20170427-21:18,efe0a6b71b3
games-action/descent2-vertigo,added,chewi,20170426-22:31,b0d7ed30922
games-action/descent1-data,added,chewi,20170426-22:16,deba87d7ea0
games-rpg/comi,added,chewi,20170426-21:35,a8fd61c1b88
gnustep-apps/pikopixel,added,voyageur,20170427-12:30,dacab65f9d5
dev-ada/aunit,added,tupone,20170426-18:32,e2658d94c1c
sys-apps/restorecond,added,perfinion,20170426-18:08,e23657020be
sys-apps/mcstrans,added,perfinion,20170426-18:02,24edb9749c6
dev-ros/rosdiagnostic,added,aballier,20170426-17:26,0633d002304
net-analyzer/nessus-agent-bin,added,marecki,20170306-09:21,cb16b4d13af
dev-ada/gnatmem,added,tupone,20170425-19:52,d8e663b26f5
dev-python/asn1crypto,added,djc,20170425-18:33,7362a34b881
net-misc/kafkacat,added,mrueg,20170425-15:49,b6c0516df27
kde-misc/latte-dock,added,kensington,20170425-13:20,c983b87c3cb

Done.

[gentoo-dev] [PATCH] app-portage/eclass-manpages: Add support for @DEFAULT-ASSUMED

2017-04-30 Thread kentnl
From: Kent Fredric 

@DEFAULT-ASSUMED allows eclasses to document any implied value
that internal code will assume when the ENV var is undefined.

@DEFAULT-ASSUMED should typically be used in conjunction with
@DEFAULT-UNSET, but it can be used in conjunction with either
@DEFAULT-VALUE or normal value extraction.

For instance:

  @VARIABLE: DIST_TEST
  @DEFAULT-ASSUMED: "do parallel"

This inserts an additional suffix to the generated man page heading
line so it renders as follows:

  DIST_TEST (UNSET -> "do parallel")

But indicates that the value itself is not explicitly set by the eclass
and ebuilds should not assume it to have a value.

For instance, upon seeing such an indication, ebuild authors should
be able to tell that doing

  DIST_TEST+=" network"

Would end up producing

  DIST_TEST=" network"

Not

  DIST_TEST="do parallel network"

This is primarily for usecases where the variable is not assigned
anywhere in the top level file, but consuming functions imply a value:

  has "parallel" ${DIST_TEST:-do parallel}
---
 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index d6ed59efd9..772ee867d8 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -40,6 +40,7 @@
 # [@DEFAULT_UNSET]
 # [@INTERNAL]
 # [@REQUIRED]
+# @DEFAULT-ASSUMED: 
 # @DEFAULT-VALUE: 
 # @DESCRIPTION:
 # 
@@ -50,6 +51,7 @@
 # [@DEFAULT_UNSET]
 # [@INTERNAL]
 # [@REQUIRED]
+# @DEFAULT-ASSUMED: 
 # @DEFAULT-VALUE: 
 # @DESCRIPTION:
 # 
@@ -285,6 +287,7 @@ function _handle_variable() {
default_unset = 0
internal = 0
required = 0
+   default_assumed = ""
default_value = ""
 
# make sure people haven't specified this before (copy & paste error)
@@ -302,8 +305,12 @@ function _handle_variable() {
internal = 1
else if ($2 == "@REQUIRED")
required = 1
+   else if ($2 == "@DEFAULT-ASSUMED:") {
+   sub(/^# @[A-Z-]*:[[:space:]]*/,"")
+   default_assumed = $0
+   }
else if ($2 == "@DEFAULT-VALUE:") {
-   sub(/^# @[A-Z_]*:[[:space:]]*/,"")
+   sub(/^# @[A-Z-]*:[[:space:]]*/,"")
default_value = $0
}
else
@@ -343,6 +350,10 @@ function _handle_variable() {
if (required == 1)
val = val " (REQUIRED)"
 
+   if ( default_assumed != "" ) {
+   val = val " (UNSET -> \\fI" default_assumed "\\fR)"
+   }
+
if (internal == 1)
return ""
 
-- 
2.12.2




[gentoo-dev] [PATCH] app-portage/eclass-manpages: Add support for @DEFAULT-VALUE

2017-04-30 Thread kentnl
From: Kent Fredric 

@DEFAULT-VALUE allows eclasses to document the default values they
will inject when eclass-to-manpage can't extract it.

When eclass-to-manpage *can* extract it, it adds a warning when
the extracted value is different from that declared, (but the
declared value still takes precedence)

Note: there is a pre-exisitng poorly documented hack where

  # FOO=VALUE

In a comment serves as a fallback for literal value parsing, which
can supplement DEFAULT-VALUE in a less clear way.

But due to the nature of this syntax, its not trivial to identify
which eclasses are, and aren't using it as variables are routinely
commented without intending them to be used as documentation.

Some such commented assignments lurk in @CODE examples, which are
surely not intended to be extracted as their values

Subsequently, if present, @DEFAULT-VALUE will also trump any such
commented assignments
---
 .../eclass-manpages/files/eclass-to-manpage.awk | 21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 0d41f96327..d6ed59efd9 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -40,6 +40,7 @@
 # [@DEFAULT_UNSET]
 # [@INTERNAL]
 # [@REQUIRED]
+# @DEFAULT-VALUE: 
 # @DESCRIPTION:
 # 
 # foo=""
@@ -49,6 +50,7 @@
 # [@DEFAULT_UNSET]
 # [@INTERNAL]
 # [@REQUIRED]
+# @DEFAULT-VALUE: 
 # @DESCRIPTION:
 # 
 # foo=""
@@ -283,6 +285,7 @@ function _handle_variable() {
default_unset = 0
internal = 0
required = 0
+   default_value = ""
 
# make sure people haven't specified this before (copy & paste error)
if (all_vars[var_name])
@@ -299,6 +302,10 @@ function _handle_variable() {
internal = 1
else if ($2 == "@REQUIRED")
required = 1
+   else if ($2 == "@DEFAULT-VALUE:") {
+   sub(/^# @[A-Z_]*:[[:space:]]*/,"")
+   default_value = $0
+   }
else
opts = 0
}
@@ -315,15 +322,21 @@ function _handle_variable() {
op = "?="
regex = "^[[:space:]]*:[[:space:]]*[$]{" var_name ":?=(.*)}"
val = gensub(regex, "\\1", 1, $0)
-   if (val == $0) {
-   if (default_unset + required + internal == 0)
+   }
+   if (default_value != "") {
+   if ( val != $0 && default_value != val )
+   warn( var_name ": extracted different from 
DEFAULT-VALUE: " default_value " <=> " val )
+   op  = "="
+   val = default_value
+   }
+   if ( val == $0 ) {
+   if (default_unset + required + internal == 0)
warn(var_name ": unable to extract default 
variable content: " $0)
val = ""
-   } else if (val !~ /^["']/ && val ~ / /) {
+   } else if (val !~ /^["']/ && val ~ / /) {
if (default_unset == 1)
warn(var_name ": marked as unset, but has 
value: " val)
val = "\"" val "\""
-   }
}
if (length(val))
val = " " op " \\fI" val "\\fR"
-- 
2.12.2




[gentoo-dev] [PATCH] app-portage/eclass-manpages: Add support for @OUTPUT

2017-04-30 Thread kentnl
From: Kent Fredric 

@RETURNS is abused presently both as bash exit code values ( that
is, bash return values ), and capturable STOUT values.

This is problematic, as they're not equivalent: One is passed
around via $? , and the other requires VAR=$(func) to capture.

Additionally, functions can have both output, and return values,
and both can be used together.

For example:

  function get_thing_version() {
if [[ "${FAIL}" ]]; then
  echo "libthing not installed"
  return 1
fi
echo "1.0"
return 0
  }

  # this line works and MYVAR gets "1.0"
  # and does not die
  MYVAR=$(get_thing_version) \
|| die "Can't get thing version, ${MYVAR}"

  # This dies with the error message communicated from the
  # function
  FAIL=1
  MYVAR=$(get_thing_version) \
|| die "Can't get thing version, ${MYVAR}"

Hence, a reasonable documentation for a function like this would
be:

  @OUTPUT: version of thing when present, explanation of cause for thing 
missing otherwise
  @RETURN: 0 on success, non-zero otherwise

Package-Manager: Portage-2.3.4, Repoman-2.3.2
---
 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 9 +
 1 file changed, 9 insertions(+)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 0b65162c04..0d41f96327 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -27,6 +27,7 @@
 # The format of functions:
 # @FUNCTION: foo
 # @USAGE:  [optional arguments to foo]
+# @OUTPUT: 
 # @RETURN: 
 # @MAINTAINER:
 # 
@@ -217,6 +218,7 @@ function show_function_header() {
 function handle_function() {
func_name = $3
usage = ""
+   funcout = ""
funcret = ""
maintainer = ""
internal = 0
@@ -231,6 +233,8 @@ function handle_function() {
getline
if ($2 == "@USAGE:")
usage = eat_line()
+   if ($2 == "@OUTPUT:")
+   funcout = eat_line()
if ($2 == "@RETURN:")
funcret = eat_line()
if ($2 == "@MAINTAINER:")
@@ -257,6 +261,11 @@ function handle_function() {
print ""
print "Return value: " funcret
}
+   if (funcout != "") {
+   if (desc !="")
+   print ""
+   print "Outputs: " funcout
+   }
 
if (blurb == "")
fail(func_name ": no @BLURB found")
-- 
2.12.2




Re: [gentoo-dev] [PATCH] app-portage/eclass-manpages: @DEFAULT_UNSET -> @DEFAULT-UNSET

2017-04-30 Thread Michał Górny
On sob, 2017-04-29 at 14:05 -0400, Davide Pesavento wrote:
> On Sat, Apr 29, 2017 at 1:40 PM, Michał Górny  wrote:
> > Dnia 29 kwietnia 2017 19:23:49 CEST, Davide Pesavento  
> > napisał(a):
> > > On Sat, Apr 29, 2017 at 1:57 AM, Michał Górny 
> > > wrote:
> > > > On sob, 2017-04-29 at 05:41 +0200, Ulrich Mueller wrote:
> > > > > > > > > > On Fri, 28 Apr 2017, Michał Górny wrote:
> > > > > > 
> > > > > > (and hyphens do not require holding shift).
> > > > > 
> > > > > So they are awkward to type inside a string that is all-caps?
> > > > > 
> > > > 
> > > > Funny enough, yes. I naturally let shift go when pushing '-' ;-).
> > > > Some habit, probably. And I bet some people might actually use caps
> > > > lock.
> > > 
> > > So please remind me why everyone else has to adapt to your habits?
> > 
> > Because I cared enough to do the work. If you want it the other way around, 
> > then send the reverse patch instead of giving asshole comments.
> > 
> 
> Fair enough. FTR, I have no preference either way, this is 100%
> bikeshedding if you ask me.
> 
> Also, I didn't mean to be rude, just wanted to point out that what you
> said about being easier to type might not apply to everybody (in fact,
> the opposite is probably true for most people).

But you were. I get it, you don't have to get it when I try to make
a funny remark. But that's not an excuse to behave like that.

As the commit message said, the only real reason was that hyphen is
around 3.5x more common. Which means changing the other one is 3.5x less
work, and 3.5x smaller problem of changing the habits.

$ grep '@ECLASS-VARIABLE' *.eclass | wc -l
770
$ grep '@DEFAULT_UNSET' *.eclass | wc -l
222

-- 
Best regards,
Michał Górny


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


Re: [gentoo-dev] [PATCH] app-portage/eclass-manpages: @DEFAULT_UNSET -> @DEFAULT-UNSET

2017-04-30 Thread Michał Górny
On nie, 2017-04-30 at 06:03 +1200, Kent Fredric wrote:
> On Fri, 28 Apr 2017 16:39:45 +0200
> Michał Górny  wrote:
> 
> > Change the unset value tag to '@DEFAULT-UNSET' to ensure consistent
> > use of hyphen/underscore throughout eclassdoc. Before, one tag
> > (@ECLASS-VARIABLE) has used hyphen while also one (@DEFAULT_UNSET)
> > used underscore. Unify them to use the former since @ECLASS-VARIABLE
> > tag is more common (and hyphens do not require holding shift).
> > 
> > Fixing all existing uses is perfectly within our power; however, I
> > think it would be reasonable to delay it and combine with other
> > eclass changes to avoid unnecessary cache regen. The script still
> > allows the old tag name for compatibility.
> 
> I have a counter suggestion:
> 
> 1. Leave @ECLASS-VARIABLE as-is
> 2. Leave @DEFAULT_UNSET as is
> 3. Document that underscores are to be used for all new tags

Don't forget to write a complete policy on what names for ebuild
variables should developers use. And then a policy on making new
policies regarding vocabulary. And maybe document some on preferred
words to be used in mailing list messages.

> 4. Add support for @ECLASS_VARIABLE that works the same as
>@ECLASS-VARIABLE
> 5. Don't go out of our way to migrate to @ECLASS_VARIABLE, just let it
>occur over time, particularly in conjunction with other major
>changes.
> 
> Mostly because @FOO_VARIABLE is suspiciously similar syntax to me as
> other ALL CAPS variables used as ENV tokens in Bash.
> 
> And I can't think of a single instance where I've seen a language with
> a convention that used ALL CAPS terms in conjunctions with hyphens,
> ( and regex with _ are ultimately simpler to reason about than ones
> with - )

From now on I'm not going to listen to any suggestions that do not come
with a patch.

-- 
Best regards,
Michał Górny


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


[gentoo-dev] [PATCH 3/4] www-client/chromium: Use eninja from ninja-utils

2017-04-30 Thread Michał Górny
---
 www-client/chromium/chromium-59.0.3067.0.ebuild | 19 +--
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/www-client/chromium/chromium-59.0.3067.0.ebuild 
b/www-client/chromium/chromium-59.0.3067.0.ebuild
index fb975c22b0cd..ac00f473bf45 100644
--- a/www-client/chromium/chromium-59.0.3067.0.ebuild
+++ b/www-client/chromium/chromium-59.0.3067.0.ebuild
@@ -8,7 +8,7 @@ CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et 
fa fi fil fr gu he
hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl 
sr
sv sw ta te th tr uk vi zh-CN zh-TW"
 
-inherit check-reqs chromium-2 eutils gnome2-utils flag-o-matic multilib 
multiprocessing pax-utils portability python-any-r1 readme.gentoo-r1 
toolchain-funcs versionator virtualx xdg-utils
+inherit check-reqs chromium-2 eutils gnome2-utils flag-o-matic multilib 
ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 
toolchain-funcs versionator virtualx xdg-utils
 
 DESCRIPTION="Open-source version of Google Chrome web browser"
 HOMEPAGE="http://chromium.org/;
@@ -503,23 +503,6 @@ src_configure() {
out/Release/gn gen --args="${myconf_gn}" out/Release || die
 }
 
-eninja() {
-   if [[ -z ${NINJAOPTS+set} ]]; then
-   local jobs=$(makeopts_jobs)
-   local loadavg=$(makeopts_loadavg)
-
-   if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
-   NINJAOPTS+=" -j ${jobs}"
-   fi
-   if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
-   NINJAOPTS+=" -l ${loadavg}"
-   fi
-   fi
-   set -- ninja -v ${NINJAOPTS} "$@"
-   echo "$@"
-   "$@"
-}
-
 src_compile() {
local ninja_targets="chrome chromedriver"
if use suid; then
-- 
2.13.0.rc1




[gentoo-dev] [PATCH 4/4] sys-apps/systemd: Use eninja from ninja-utils

2017-04-30 Thread Michał Górny
---
 sys-apps/systemd/systemd-.ebuild | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/sys-apps/systemd/systemd-.ebuild 
b/sys-apps/systemd/systemd-.ebuild
index 7ff69d75cc9a..b4e1f943a599 100644
--- a/sys-apps/systemd/systemd-.ebuild
+++ b/sys-apps/systemd/systemd-.ebuild
@@ -13,7 +13,7 @@ fi
 
 PYTHON_COMPAT=( python{3_4,3_5,3_6} )
 
-inherit bash-completion-r1 linux-info multilib-minimal multiprocessing pam 
python-any-r1 systemd toolchain-funcs udev user
+inherit bash-completion-r1 linux-info multilib-minimal ninja-utils pam 
python-any-r1 systemd toolchain-funcs udev user
 
 DESCRIPTION="System and service manager for Linux"
 HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd;
@@ -271,15 +271,6 @@ multilib_src_configure() {
"$@" || die
 }
 
-eninja() {
-   if [[ -z ${NINJAOPTS+set} ]]; then
-   NINJAOPTS="-j $(makeopts_jobs) -l $(makeopts_loadavg 
"${MAKEOPTS}" 0)"
-   fi
-   set -- ninja -v ${NINJAOPTS} "$@"
-   echo "$@"
-   "$@" || die
-}
-
 multilib_src_compile() {
eninja
 }
-- 
2.13.0.rc1




[gentoo-dev] [PATCH 2/4] cmake-utils.eclass: Use eninja from ninja-utils

2017-04-30 Thread Michał Górny
---
 eclass/cmake-utils.eclass | 52 +++
 1 file changed, 3 insertions(+), 49 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 07f719a62a8c..2b3c8d933d1a 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -116,7 +116,8 @@ case ${EAPI} in
*) die "EAPI=${EAPI:-0} is not supported" ;;
 esac
 
-inherit toolchain-funcs multilib flag-o-matic eutils multiprocessing 
versionator
+inherit toolchain-funcs multilib ninja-utils flag-o-matic eutils \
+   multiprocessing versionator
 
 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
 
@@ -680,44 +681,6 @@ enable_cmake-utils_src_compile() {
cmake-utils_src_make "$@"
 }
 
-_ninjaopts_from_makeopts() {
-   if [[ ${NINJAOPTS+set} == set ]]; then
-   return 0
-   fi
-   local ninjaopts=()
-   set -- ${MAKEOPTS}
-   while (( $# )); do
-   case $1 in
-   -j|-l)
-   if [[ $# -eq 1 || $2 == -* ]]; then
-   if [[ $1 == -j ]]; then
-   # absurdly high job limit
-   ninjaopts+=( $1  )
-   else # -l
-   # remove load limit (like make 
does for -l)
-   ninjaopts+=( $1 0 )
-   fi
-   shift 1
-   else
-   ninjaopts+=( $1 $2 )
-   shift 2
-   fi
-   ;;
-   -j*|-l*)
-   ninjaopts+=( $1 )
-   shift 1
-   ;;
-   -k)
-   # -k 0 = any number of tasks can fail
-   ninjaopts+=( $1 0 )
-   shift 1
-   ;;
-   *) shift ;;
-   esac
-   done
-   export NINJAOPTS="${ninjaopts[*]}"
-}
-
 # @FUNCTION: _cmake_ninja_src_make
 # @INTERNAL
 # @DESCRIPTION:
@@ -727,16 +690,7 @@ _cmake_ninja_src_make() {
 
[[ -e build.ninja ]] || die "build.ninja not found. Error during 
configure stage."
 
-   _ninjaopts_from_makeopts
-
-   if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
-   set -- ninja ${NINJAOPTS} -v "$@"
-   else
-   set -- ninja ${NINJAOPTS} "$@"
-   fi
-
-   echo "$@"
-   "$@" || die
+   eninja "$@"
 }
 
 # @FUNCTION: _cmake_emake_src_make
-- 
2.13.0.rc1




[gentoo-dev] [PATCH 1/4] ninja-utils.eclass: Add a new eclass to handle calling ninja

2017-04-30 Thread Michał Górny
---
 eclass/ninja-utils.eclass | 57 +++
 1 file changed, 57 insertions(+)
 create mode 100644 eclass/ninja-utils.eclass

diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
new file mode 100644
index ..69216176ba61
--- /dev/null
+++ b/eclass/ninja-utils.eclass
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: ninja-utils.eclass
+# @MAINTAINER:
+# Michał Górny 
+# Mike Gilbert 
+# @AUTHOR:
+# Michał Górny 
+# Mike Gilbert 
+# @BLURB: common bits to run dev-util/ninja builder
+# @DESCRIPTION:
+# This eclass provides a single function -- eninja -- that can be used
+# to run the ninja builder alike emake. It does not define any
+# dependencies, you need to depend on dev-util/ninja yourself. Since
+# ninja is rarely used stand-alone, most of the time this eclass will
+# be used indirectly by the eclasses for other build systems (CMake,
+# Meson).
+
+if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then
+
+case ${EAPI:-0} in
+   0|1|3) die "EAPI=${EAPI:-0} is not supported (too old)";;
+   # copied from cmake-utils
+   2|4|5|6) ;;
+   *) die "EAPI=${EAPI} is not yet supported" ;;
+esac
+
+# @ECLASS-VARIABLE: NINJAOPTS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The default set of options to pass to Ninja. Similar to MAKEOPTS,
+# supposed to be set in make.conf. If unset, eninja() will convert
+# MAKEOPTS instead.
+
+inherit multiprocessing
+
+# @FUNCTION: eninja
+# @USAGE: [...]
+# @DESCRIPTION:
+# Call Ninja, passing the NINJAOPTS (or converted MAKEOPTS), followed
+# by the supplied arguments. This function dies if ninja fails. Starting
+# with EAPI 6, it also supports being called via 'nonfatal'.
+eninja() {
+   local nonfatal_args=()
+   [[ ${EAPI:-0} != [245] ]] && nonfatal_args+=( -n )
+
+   if [[ -z ${NINJAOPTS+set} ]]; then
+   NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg 
"${MAKEOPTS}" 0)"
+   fi
+   set -- ninja -v ${NINJAOPTS} "$@"
+   echo "$@" >&2
+   "$@" || die "${nonfatal_args[@]}" "${*} failed"
+}
+
+_NINJA_UTILS_ECLASS=1
+fi
-- 
2.13.0.rc1




[gentoo-dev] [PATCH 3/3] app-portage/eix: Convert to tmpfiles.eclass (example)

2017-04-30 Thread Michał Górny
Replace the use of systemd.eclass with more generic tmpfiles.eclass to
install the tmpfiles.d file. Use tmpfiles_process to ensure that
the directory is created and correctly owned instead of keepdir-ing it
(which triggers QA warnings from Portage) and chown-ing it
in pkg_postinst() (which is a hack to workaround Portage design issues).
---
 app-portage/eix/{eix-0.32.5-r1.ebuild => eix-0.32.5-r2.ebuild} | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)
 rename app-portage/eix/{eix-0.32.5-r1.ebuild => eix-0.32.5-r2.ebuild} (93%)

diff --git a/app-portage/eix/eix-0.32.5-r1.ebuild 
b/app-portage/eix/eix-0.32.5-r2.ebuild
similarity index 93%
rename from app-portage/eix/eix-0.32.5-r1.ebuild
rename to app-portage/eix/eix-0.32.5-r2.ebuild
index 2026b44a4b15..1d6fa3801834 100644
--- a/app-portage/eix/eix-0.32.5-r1.ebuild
+++ b/app-portage/eix/eix-0.32.5-r2.ebuild
@@ -4,7 +4,7 @@
 EAPI=6
 
 PLOCALES="de ru"
-inherit autotools bash-completion-r1 l10n systemd flag-o-matic
+inherit autotools bash-completion-r1 l10n flag-o-matic tmpfiles
 
 DESCRIPTION="Search and query ebuilds"
 HOMEPAGE="https://github.com/vaeth/eix/;
@@ -83,20 +83,18 @@ src_configure() {
 src_install() {
default
dobashcomp bash/eix
-   systemd_dotmpfilesd tmpfiles.d/eix.conf
+   dotmpfiles tmpfiles.d/eix.conf
 
insinto /usr/share/${PN}
doins "${ED}"/usr/bin/eix-functions.sh
rm -r "${ED}"/usr/bin/eix-functions.sh || die
-
-   keepdir /var/cache/eix
 }
 
 pkg_postinst() {
if ! use prefix; then
# note: if this is done in src_install(), portage:portage
# ownership may be reset to root
-   chown portage:portage "${EROOT%/}"/var/cache/eix || die
+   tmpfiles_process eix.conf
fi
 
local obs=${EROOT%/}/var/cache/eix.previous
-- 
2.13.0.rc1




[gentoo-dev] [PATCH 2/3] tmpfiles.eclass: Explicit warn on ROOT != / to avoid breakage

2017-04-30 Thread Michał Górny
---
 eclass/tmpfiles.eclass | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 9cf040de987f..018ea45d4182 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -110,7 +110,18 @@ tmpfiles_process() {
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one 
filename"
 
# Only process tmpfiles for the currently running system
-   [[ ${ROOT} == / ]] || return 0
+   if [[ ${ROOT} != / ]]; then
+   ewarn "Warning: tmpfiles.d not processed on ROOT != /. If you 
do not use"
+   ewarn "a service manager supporting tmpfiles.d, you need to run"
+   ewarn "the following command after booting (or chroot-ing with 
all"
+   ewarn "appropriate filesystems mounted) into the ROOT:"
+   ewarn
+   ewarn "  tmpfiles --create"
+   ewarn
+   ewarn "Failure to do so may result in missing runtime 
directories"
+   ewarn "and failures to run programs or start services."
+   return
+   fi
 
if type systemd-tmpfiles &> /dev/null; then
systemd-tmpfiles --create "$@"
-- 
2.13.0.rc1




[gentoo-dev] [PATCH 1/3] tmpfiles.eclass: Support using on non-Linux systems

2017-04-30 Thread Michał Górny
Fix the eclass code to remove the misguided Linux conditionals.
The whole purpose of the eclass was to avoid having to implement
fallback logic for systems not having service manager tmpfiles.d
support. Making it conditional to Linux implied that for non-Linux
systems (Prefix, FreeBSD) we would have to implement explicit fallback
to create the necessary directories.

While systemd (and therefore systemd-tmpfilesd) is indeed
Linux-specific, the opentmpfiles implementation should be pretty
portable and there is no reason to restrict it to Linux only, or to
prevent using it on non-Linux OpenRC (and non-OpenRC) systems.
---
 eclass/tmpfiles.eclass | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 2a158c482a58..9cf040de987f 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: tmpfiles.eclass
@@ -17,10 +17,16 @@
 # https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
 #
 # The dotmpfiles and newtmpfiles functions are used to install
-# configuration files into /usr/lib/tmpfiles.d, then in pkg_postinst, the
-# tmpfiles_process function can be called to process the newly
+# configuration files into /usr/lib/tmpfiles.d, then in pkg_postinst,
+# the tmpfiles_process function must be called to process the newly
 # installed tmpfiles.d entries.
 #
+# The tmpfiles.d files can be used by service managers to recreate/clean
+# up temporary directories on boot or periodically. Additionally,
+# the pkg_postinst() call ensures that the directories are created
+# on systems that do not support tmpfiles.d natively, without a need
+# for explicit fallback.
+#
 # @EXAMPLE:
 # Typical usage of this eclass:
 #
@@ -53,7 +59,7 @@ case "${EAPI}" in
 *) die "API is undefined for EAPI ${EAPI}" ;;
 esac
 
-RDEPEND="kernel_linux? ( virtual/tmpfiles )"
+RDEPEND="virtual/tmpfiles"
 
 # @FUNCTION: dotmpfiles
 # @USAGE: dotmpfiles  ...
@@ -62,7 +68,6 @@ RDEPEND="kernel_linux? ( virtual/tmpfiles )"
 dotmpfiles() {
debug-print-function "${FUNCNAME}" "$@"
 
-   use kernel_linux || return 0
local f
for f; do
if [[ ${f} != *.conf ]]; then
@@ -83,7 +88,6 @@ dotmpfiles() {
 newtmpfiles() {
debug-print-function "${FUNCNAME}" "$@"
 
-   use kernel_linux || return 0
if [[ $2 != *.conf ]]; then
die "tmpfiles.d files must end with .conf"
fi
@@ -102,7 +106,6 @@ newtmpfiles() {
 tmpfiles_process() {
debug-print-function "${FUNCNAME}" "$@"
 
-   use kernel_linux || return 0
[[ ${EBUILD_PHASE} == postinst ]] || die "${FUNCNAME}: Only valid in 
pkg_postinst"
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one 
filename"
 
-- 
2.13.0.rc1




Re: [gentoo-dev] USE flag name collision in use.local.desc "graphite"

2017-04-30 Thread Kent Fredric
On Sun, 30 Apr 2017 09:48:58 -0400
Brian Evans  wrote:

> If they want to enable a flag to apply system-wide, then it does not
> matter where the description is. To users, a USE flag is a USE flag.

Terminology wise, this is more a side effect that users are exposed to
global methods of setting use flags first, and specific methods of
setting use flags second.

The reality is *all* USE flags have behaviour specific to the packages
they're on.

Just some packages share the same interpretations of the same flags,
and so it *can* make sense to set them simultaneously for multiple
packages.

But this ends up in a "Cognition, Language, Naming things and
Namespaces are hard" corner either way.


pgpqy0tZrOIMf.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] USE flag name collision in use.local.desc "graphite"

2017-04-30 Thread Brian Evans
On 04/30/2017 06:36 AM, Mart Raudsepp wrote:
> Ühel kenal päeval, L, 29.04.2017 kell 22:32, kirjutas Walter Dnes:
>>   Is it considered a reportable bug?
>>
>> [i660][waltdnes][~] grep :graphite /usr/portage/profiles/*.desc
>> /usr/portage/profiles/use.local.desc:dev-lang/gnat-gpl:graphite - Add
>> support for the framework for loop optimizations based on a
>> polyhedral intermediate representation
>> /usr/portage/profiles/use.local.desc:media-libs/harfbuzz:graphite -
>> Use graphite to render complex non-Roman writing systems
>> /usr/portage/profiles/use.local.desc:sys-devel/gcc:graphite - Add
>> support for the framework for loop optimizations based on a
>> polyhedral intermediate representation
>>
>>   The "graphite" USE flag means something entirely different for
>> harfbuzz, i.e. build media-libs/harfbuzz against media-gfx/graphite2
> 
> That's why they are local. You aren't supposed to go and enable those
> flags globally usually.

This statement is a big confusion for users and is a pet peeve of mine.

There is no such thing as calling a USE flag "local" or "global" except
for where the description lies.

If they want to enable a flag to apply system-wide, then it does not
matter where the description is. To users, a USE flag is a USE flag.

Brian




signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] USE flag name collision in use.local.desc "graphite"

2017-04-30 Thread Mart Raudsepp
Ühel kenal päeval, L, 29.04.2017 kell 22:32, kirjutas Walter Dnes:
>   Is it considered a reportable bug?
> 
> [i660][waltdnes][~] grep :graphite /usr/portage/profiles/*.desc
> /usr/portage/profiles/use.local.desc:dev-lang/gnat-gpl:graphite - Add
> support for the framework for loop optimizations based on a
> polyhedral intermediate representation
> /usr/portage/profiles/use.local.desc:media-libs/harfbuzz:graphite -
> Use graphite to render complex non-Roman writing systems
> /usr/portage/profiles/use.local.desc:sys-devel/gcc:graphite - Add
> support for the framework for loop optimizations based on a
> polyhedral intermediate representation
> 
>   The "graphite" USE flag means something entirely different for
> harfbuzz, i.e. build media-libs/harfbuzz against media-gfx/graphite2

That's why they are local. You aren't supposed to go and enable those
flags globally usually.
That said, it does seem a bit suboptimal and maybe one of them could be
describing the feature added by the dependency instead in the USE flag
naming. So it could at least be a bug where discussions of this could
take place, even ifthat doesn't lead to changes in the end (if such a
bug didn't happen in the past)


Mart



[gentoo-dev] Bugzilla package list editing

2017-04-30 Thread Mart Raudsepp
Hello,

I would like to point out that the package list is under the
responsibility of the maintainers whose packages are getting
stabilized, and therefore at least after the point architectures are
CC'ed by maintainer, this field is completely off limits for any non-
maintainer edits whatsoever.

This is just like it was prior to this package list field existing with
long package lists in attachments or short lists in comments. No non-
maintainer was supposed to be going around and changing these things,
nor did they really.
However I constantly get these changed on me now with the package list
feature and I need to constantly go reverting them around with a re-
copypaste from my separate text file with the list (which I mostly need
to keep separately due to aforementioned non-maintainer edits).

Please stop editing package lists when you are not the maintainer and
arches are already CCed.
Alternatively I am forced to start using attachments again (now with
the stabilization list flag), which is more inconvenient to get updates
in by the maintainer.


Thank you,
Mart