[gentoo-dev] [PATCH 2/5] python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1

2015-12-23 Thread Michał Górny
---
 eclass/python-single-r1.eclass | 58 ++
 1 file changed, 58 insertions(+)

diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 4d5026f..9e80866 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -411,6 +411,64 @@ python_gen_cond_dep() {
echo "${matches[@]}"
 }
 
+# @FUNCTION: python_gen_impl_dep
+# @USAGE: [ [...]]
+# @DESCRIPTION:
+# Output a dependency on Python implementations with the specified USE
+# dependency string appended, or no USE dependency string if called
+# without the argument (or with empty argument). If any implementation
+# patterns are passed, the output dependencies will be generated only
+# for the implementations matching them.
+#
+# Use this function when you need to request different USE flags
+# on the Python interpreter depending on package's USE flags. If you
+# only need a single set of interpreter USE flags, just set
+# PYTHON_REQ_USE and use ${PYTHON_DEPS} globally.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy )
+# RDEPEND="foo? ( $(python_gen_impl_dep 'xml(+)') )"
+# @CODE
+#
+# It will cause the variable to look like:
+# @CODE
+# RDEPEND="foo? (
+#   python_single_target_python2_7? (
+# dev-lang/python:2.7[xml(+)] )
+#  python_single_target_pypy? (
+# dev-python/pypy[xml(+)] ) )"
+# @CODE
+python_gen_impl_dep() {
+   debug-print-function ${FUNCNAME} "${@}"
+
+   local impl pattern
+   local matches=()
+
+   if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
+   flag_prefix=python_targets
+   else
+   flag_prefix=python_single_target
+   fi
+
+   local PYTHON_REQ_USE=${1}
+   shift
+
+   local patterns=( "${@-*}" )
+   for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
+   for pattern in "${patterns[@]}"; do
+   if [[ ${impl} == ${pattern} ]]; then
+   local PYTHON_PKG_DEP
+   python_export "${impl}" PYTHON_PKG_DEP
+   matches+=( "${flag_prefix}_${impl}? ( 
${PYTHON_PKG_DEP} )" )
+   break
+   fi
+   done
+   done
+
+   echo "${matches[@]}"
+}
+
 # @FUNCTION: python_setup
 # @DESCRIPTION:
 # Determine what the selected Python implementation is and set
-- 
2.6.4




[gentoo-dev] [PATCH 3/5] app-emulation/xen-tools: Make use of new python_gen_impl_dep function

2015-12-23 Thread Michał Górny
---
 app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild  | 4 ++--
 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild  | 4 ++--
 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild  | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild  | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild 
b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
index 67e3d1c..d29aab3 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
@@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
api? ( dev-libs/libxml2
net-misc/curl )
${PYTHON_DEPS}
-   pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+   pygrub? ( $(python_gen_impl_dep ncurses) )
sys-devel/bin86
sys-devel/dev86
dev-lang/perl
diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild 
b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
index ae93f4d..392be10 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
@@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
api? ( dev-libs/libxml2
net-misc/curl )
${PYTHON_DEPS}
-   pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+   pygrub? ( $(python_gen_impl_dep ncurses) )
sys-devel/bin86
sys-devel/dev86
dev-lang/perl
diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild 
b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
index 8af652c..ba2f756 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
@@ -87,8 +87,8 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
-   pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-   ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+   pygrub? ( $(python_gen_impl_dep ncurses) )
+   ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild 
b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
index 59e9056..a147169 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -90,8 +90,8 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
-   pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-   ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+   pygrub? ( $(python_gen_impl_dep ncurses) )
+   ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild 
b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
index 57d618e..e9f84c0 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
@@ -87,7 +87,7 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
-   ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+   ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild 
b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
index 104fac9..ceb1402 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -90,7 +90,7 @@ DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
-   ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+   ovmf? ( $(python_gen_impl_dep sqlite) )
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
-- 
2.6.4




[gentoo-dev] [PATCH 4/5] dev-python/django: Make use of the new python_gen_impl_dep function

2015-12-23 Thread Michał Górny
---
 dev-python/django/django-1.4.22.ebuild | 2 +-
 dev-python/django/django-1.5.12.ebuild | 2 +-
 dev-python/django/django-1.6.11.ebuild | 2 +-
 dev-python/django/django-1.7.11.ebuild | 2 +-
 dev-python/django/django-1.8.7.ebuild  | 2 +-
 dev-python/django/django-1.9.ebuild| 2 +-
 dev-python/django/django-.ebuild   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dev-python/django/django-1.4.22.ebuild 
b/dev-python/django/django-1.4.22.ebuild
index 51687fb..e2a6216 100644
--- a/dev-python/django/django-1.4.22.ebuild
+++ b/dev-python/django/django-1.4.22.ebuild
@@ -24,7 +24,7 @@ RDEPEND=""
 DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
-   ${PYTHON_DEPS//sqlite?/sqlite}
+   $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
-   ${PYTHON_DEPS//sqlite?/sqlite}
+   $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-1.8.7.ebuild 
b/dev-python/django/django-1.8.7.ebuild
index f610472..f62d9fb 100644
--- a/dev-python/django/django-1.8.7.ebuild
+++ b/dev-python/django/django-1.8.7.ebuild
@@ -30,7 +30,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
-   ${PYTHON_DEPS//sqlite?/sqlite}
+   $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-1.9.ebuild 
b/dev-python/django/django-1.9.ebuild
index a435541..78a3734 100644
--- a/dev-python/django/django-1.9.ebuild
+++ b/dev-python/django/django-1.9.ebuild
@@ -34,7 +34,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
-   ${PYTHON_DEPS//sqlite?/sqlite}
+   $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
diff --git a/dev-python/django/django-.ebuild 
b/dev-python/django/django-.ebuild
index aef2b6f8..4ae76a7 100644
--- a/dev-python/django/django-.ebuild
+++ b/dev-python/django/django-.ebuild
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] )
test? (
-   ${PYTHON_DEPS//sqlite?/sqlite}
+   $(python_gen_impl_dep sqlite)
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/numpy[$(python_gen_usedep 'python*')]
dev-python/pillow[${PYTHON_USEDEP}]
-- 
2.6.4




[gentoo-dev] [PATCH 1/5] python-r1.eclass: Introduce python_gen_impl_dep

2015-12-23 Thread Michał Górny
Add a python_gen_impl_dep() that serves the purpose of generating custom
dependencies on the Python interpreter (like PYTHON_DEPS). The function
provides ability to request dependencies with another USE dependency
string (different than global PYTHON_REQ_USE) and limit the dependencies
to subset of supported implementations.
---
 eclass/python-r1.eclass | 52 +
 1 file changed, 52 insertions(+)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 76fd944..6106577 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -383,6 +383,58 @@ python_gen_cond_dep() {
echo "${matches[@]}"
 }
 
+# @FUNCTION: python_gen_impl_dep
+# @USAGE: [ [...]]
+# @DESCRIPTION:
+# Output a dependency on Python implementations with the specified USE
+# dependency string appended, or no USE dependency string if called
+# without the argument (or with empty argument). If any implementation
+# patterns are passed, the output dependencies will be generated only
+# for the implementations matching them.
+#
+# Use this function when you need to request different USE flags
+# on the Python interpreter depending on package's USE flags. If you
+# only need a single set of interpreter USE flags, just set
+# PYTHON_REQ_USE and use ${PYTHON_DEPS} globally.
+#
+# Example:
+# @CODE
+# PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy )
+# RDEPEND="foo? ( $(python_gen_impl_dep 'xml(+)') )"
+# @CODE
+#
+# It will cause the variable to look like:
+# @CODE
+# RDEPEND="foo? (
+#   python_targets_python2_7? (
+# dev-lang/python:2.7[xml(+)] )
+#  python_targets_pypy? (
+# dev-python/pypy[xml(+)] ) )"
+# @CODE
+python_gen_impl_dep() {
+   debug-print-function ${FUNCNAME} "${@}"
+
+   local impl pattern
+   local matches=()
+
+   local PYTHON_REQ_USE=${1}
+   shift
+
+   local patterns=( "${@-*}" )
+   for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
+   for pattern in "${patterns[@]}"; do
+   if [[ ${impl} == ${pattern} ]]; then
+   local PYTHON_PKG_DEP
+   python_export "${impl}" PYTHON_PKG_DEP
+   matches+=( "python_targets_${impl}? ( 
${PYTHON_PKG_DEP} )" )
+   break
+   fi
+   done
+   done
+
+   echo "${matches[@]}"
+}
+
 # @ECLASS-VARIABLE: BUILD_DIR
 # @DESCRIPTION:
 # The current build directory. In global scope, it is supposed to
-- 
2.6.4




[gentoo-dev] [PATCH 0/5] python-r1 suite: python_gen_impl_dep() function

2015-12-23 Thread Michał Górny
Hi,

Here's a quick set of patches that add python_gen_impl_dep() function
to python-r1 and python-single-r1 eclasses, and use them in a few
ebuilds.

The problem solved is that some Python packages need to depend on more
than one combination of USE flags on the Python interpreter. Currently,
we solved this through bash-substituting USE dependencies in generated
${PYTHON_DEPS} -- though this was kinda ugly.

The python_gen_impl_dep() function intends to match API of other
functions. In particular, its usage is:

  python_gen_impl_dep  [...]

where req-use defines the USE-dep for Python interpreters (alike
PYTHON_REQ_USE) and can optionally be an empty string, and impl-patterns
specify PYTHON_COMPAT patterns to match implementations that will be
present in the dependency. If no patterns are passed, '*' is assumed.

Examples (for PYTHON_COMPAT=( python2_7 python3_4 )):

  python_gen_impl_dep 'bzip2(+)'

python_targets_python2_7? ( dev-lang/python:2.7[bzip2(+)] )
python_targets_python3_4? ( dev-lang/python:3.4[bzip2(+)] )

  python_gen_impl_dep ''

python_targets_python2_7? ( dev-lang/python:2.7 )
python_targets_python3_4? ( dev-lang/python:3.4 )

  python_gen_impl_dep '' python3*

python_targets_python3_4? ( dev-lang/python:3.4 )

Please review the patches sent in reply.


Michał Górny (5):
  python-r1.eclass: Introduce python_gen_impl_dep
  python-single-r1.eclass: Add python_gen_impl_dep, alike in python-r1
  app-emulation/xen-tools: Make use of new python_gen_impl_dep function
  dev-python/django: Make use of the new python_gen_impl_dep function
  sys-apps/portage: Make use of the new python_gen_impl_dep function

 app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild |  2 +-
 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild |  2 +-
 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild  |  4 +-
 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild  |  4 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild  |  2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild  |  2 +-
 dev-python/django/django-1.4.22.ebuild |  2 +-
 dev-python/django/django-1.5.12.ebuild |  2 +-
 dev-python/django/django-1.6.11.ebuild |  2 +-
 dev-python/django/django-1.7.11.ebuild |  2 +-
 dev-python/django/django-1.8.7.ebuild  |  2 +-
 dev-python/django/django-1.9.ebuild|  2 +-
 dev-python/django/django-.ebuild   |  2 +-
 eclass/python-r1.eclass| 52 +++
 eclass/python-single-r1.eclass | 58 ++
 sys-apps/portage/portage-2.2.20.1.ebuild   |  3 +-
 sys-apps/portage/portage-2.2.23.ebuild |  3 +-
 sys-apps/portage/portage-2.2.24.ebuild |  3 +-
 sys-apps/portage/portage-2.2.25.ebuild |  3 +-
 sys-apps/portage/portage-2.2.26.ebuild |  3 +-
 sys-apps/portage/portage-.ebuild   |  3 +-
 21 files changed, 131 insertions(+), 27 deletions(-)

-- 
2.6.4




[gentoo-dev] Paths in pkg-config file when using escons?

2015-12-23 Thread Helmut Jarausch
Hi,

sorry for posting here but gentoo-devhelp seems to be dead.


I need an ebuild for libmypaint (GIT version) since this is required by the GIT 
version of Gimp.
I use

src_compile() {
#workaround scons bug with locales. Bug #352700
export LANG="en_US.UTF-8"
tc-export CC CXX
myesconsargs=( "enable_gegl=true" "GEGL_VERSION=0.3" )
escons
}

src_install () {
escons prefix="${D}/usr" install
python_optimize "${D}"usr/share/${PN}
}


Unfortunately, the pkg-config files

/usr/lib/pkgconfig/libmypaint-gegl.pc  and  /usr/lib/pkgconfig/libmypaint.pc

still contain the paths during build, i.e.

prefix=/var/tmp/portage/media-libs/libmypaint-/image//usr
exec_prefix=/var/tmp/portage/media-libs/libmypaint-/image//usr
libdir=/var/tmp/portage/media-libs/libmypaint-/image//usr/lib
includedir=/var/tmp/portage/media-libs/libmypaint-/image//usr/include

How can I fix this?

Many thanks for a hint,
Helmut




Re: [gentoo-dev] Paths in pkg-config file when using escons?

2015-12-23 Thread Francesco Riosa
and what about $LIBDIR ?
libmypaint build system is totally broken. Please tell upstream, eventually
providing a better one.

just for testing purposes
sed -e "s:${D}::" ${D}/usr/lib/pkgconfig/*.pc || die "cannot sanitize *.pc
files"
should suffice.





2015-12-23 21:16 GMT+01:00 Peter Stuge :

> Hi Helmut,
>
> Helmut Jarausch wrote:
> >   escons prefix="${D}/usr" install
> ..
> > prefix=/var/tmp/portage/media-libs/libmypaint-/image//usr
> ..
> > How can I fix this?
>
> Set prefix to /usr and use another method to install into ${D}.
>
>
> //Peter
>
>


Re: [gentoo-portage-dev] [PATCH] emerge: Add --autounmask-only parameter

2015-12-23 Thread Lucian Poston
On Wed, Dec 23, 2015 at 5:58 PM, Zac Medico  wrote:
> I think we should also call display_problems just before
> display_autounmask, since it could display some very useful information.

display_problems calls display_autounmask. I'll send a patch v2 that
replaces the display_autounmask call with display_problems.



Re: [gentoo-portage-dev] [PATCH] emerge: Add --autounmask-only parameter

2015-12-23 Thread Zac Medico
On 12/23/2015 01:39 PM, Lucian Poston wrote:
> diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
> index a080ba4..5004fd1 100644
> --- a/pym/_emerge/actions.py
> +++ b/pym/_emerge/actions.py
> @@ -327,6 +327,10 @@ def action_build(settings, trees, mtimedb,
>   display_missing_pkg_set(root_config, e.value)
>   return 1
>  
> + if "--autounmask-only" in myopts:
> + mydepgraph.display_autounmask()
> + return 0
> +
>   if not success:
>   mydepgraph.display_problems()
>   return 1

I think we should also call display_problems just before
display_autounmask, since it could display some very useful information.
Otherwise, the patch looks good to me.
-- 
Thanks,
Zac



[gentoo-portage-dev] [PATCH] emerge: Add --autounmask-only parameter

2015-12-23 Thread Lucian Poston
The --autounmask-only parameter will display autounmask messages,
perform autounmasking (in accordance with the other --autounmask-*
parameters), and exit with success (return value 0).
---
 man/emerge.1|  6 ++
 pym/_emerge/actions.py  |  4 
 pym/_emerge/depgraph.py |  4 ++--
 pym/_emerge/main.py | 11 +++
 4 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/man/emerge.1 b/man/emerge.1
index c03f044..05b2a01 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -361,6 +361,12 @@ the specified configuration file(s), or enable the
 \fBEMERGE_DEFAULT_OPTS\fR variable may be used to
 disable this option by default in \fBmake.conf\fR(5).
 .TP
+.BR "\-\-autounmask\-only [ y | n ]"
+Instead of doing any package building, just unmask
+packages and generate package.use settings as necessary
+to satisfy dependencies. This option is disabled by
+default.
+.TP
 .BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
 If \-\-autounmask is enabled, keyword and mask changes
 using the \'=\' operator will be written. With this
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index a080ba4..5004fd1 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -327,6 +327,10 @@ def action_build(settings, trees, mtimedb,
display_missing_pkg_set(root_config, e.value)
return 1
 
+   if "--autounmask-only" in myopts:
+   mydepgraph.display_autounmask()
+   return 0
+
if not success:
mydepgraph.display_problems()
return 1
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 2169b00..6984f06 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -7972,7 +7972,7 @@ class depgraph(object):
 
return display(self, mylist, favorites, verbosity)
 
-   def _display_autounmask(self):
+   def display_autounmask(self):
"""
Display --autounmask message and optionally write it to config 
files
(using CONFIG_PROTECT). The message includes the comments and 
the changes.
@@ -8395,7 +8395,7 @@ class depgraph(object):
 
self._show_ignored_binaries()
 
-   self._display_autounmask()
+   self.display_autounmask()
 
for depgraph_sets in self._dynamic_config.sets.values():
for pset in depgraph_sets.sets.values():
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 5a8b93c..5dbafee 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -127,6 +127,7 @@ def insert_optional_args(args):
'--alert': y_or_n,
'--ask'  : y_or_n,
'--autounmask'   : y_or_n,
+   '--autounmask-only'  : y_or_n,
'--autounmask-keep-masks': y_or_n,
'--autounmask-unrestricted-atoms' : y_or_n,
'--autounmask-write' : y_or_n,
@@ -323,6 +324,11 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
 
+   "--autounmask-only": {
+   "help": "only perform --autounmask",
+   "choices" : true_y_or_n
+   },
+
"--autounmask-unrestricted-atoms": {
"help": "write autounmask changes with >= atoms if 
possible",
"choices" : true_y_or_n
@@ -745,6 +751,11 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.autounmask in true_y:
myoptions.autounmask = True
 
+   if myoptions.autounmask_only in true_y:
+   myoptions.autounmask_only = True
+   else:
+   myoptions.autounmask_only = None
+
if myoptions.autounmask_unrestricted_atoms in true_y:
myoptions.autounmask_unrestricted_atoms = True
 
-- 
2.4.10