[gentoo-commits] proj/portage:master commit in: pym/portage/tests/ebuild/, pym/portage/package/ebuild/, pym/portage/repository/

2015-12-07 Thread Arfrever Frehtes Taifersar Arahesis
commit: 10647652ebeff52c3dbc0419ab9030ba76d46122
Author: Arfrever Frehtes Taifersar Arahesis  Apache  Org>
AuthorDate: Tue Dec  8 06:58:36 2015 +
Commit: Arfrever Frehtes Taifersar Arahesis  apache  org>
CommitDate: Tue Dec  8 06:58:36 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=10647652

portage.repository.config.RepoConfig: Delete user_location attribute and 
consistently use location attribute everywhere.

 pym/portage/package/ebuild/config.py|  4 ++--
 pym/portage/repository/config.py| 21 ++---
 pym/portage/tests/ebuild/test_config.py |  4 ++--
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 7cf5a4c..b6217e7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -539,13 +539,13 @@ class config(object):
#filling PORTDIR and PORTDIR_OVERLAY variable for 
compatibility
main_repo = self.repositories.mainRepo()
if main_repo is not None:
-   self["PORTDIR"] = main_repo.user_location
+   self["PORTDIR"] = main_repo.location
self.backup_changes("PORTDIR")
expand_map["PORTDIR"] = self["PORTDIR"]
 
# repoman controls PORTDIR_OVERLAY via the environment, 
so no
# special cases are needed here.
-   portdir_overlay = 
list(self.repositories.repoUserLocationList())
+   portdir_overlay = 
list(self.repositories.repoLocationList())
if portdir_overlay and portdir_overlay[0] == 
self["PORTDIR"]:
portdir_overlay = portdir_overlay[1:]
 

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index b987b56..b792d78 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -91,8 +91,8 @@ class RepoConfig(object):
'profile_formats', 'sign_commit', 'sign_manifest',
'sync_depth', 'sync_hooks_only_on_change',
'sync_type', 'sync_umask', 'sync_uri', 'sync_user', 
'thin_manifest',
-   'update_changelog', 'user_location', '_eapis_banned',
-   '_eapis_deprecated', '_masters_orig', 'module_specific_options',
+   'update_changelog', '_eapis_banned', '_eapis_deprecated',
+   '_masters_orig', 'module_specific_options',
)
 
def __init__(self, name, repo_opts, local_config=True):
@@ -189,7 +189,6 @@ class RepoConfig(object):
self.format = format
 
location = repo_opts.get('location')
-   self.user_location = location
if location is not None and location.strip():
if os.path.isdir(location) or portage._sync_mode:
location = os.path.realpath(location)
@@ -410,8 +409,8 @@ class RepoConfig(object):
repo_msg.append(self.name)
if self.format:
repo_msg.append(indent + "format: " + self.format)
-   if self.user_location:
-   repo_msg.append(indent + "location: " + 
self.user_location)
+   if self.location:
+   repo_msg.append(indent + "location: " + self.location)
if self.sync_type:
repo_msg.append(indent + "sync-type: " + self.sync_type)
if self.sync_umask:
@@ -527,7 +526,7 @@ class RepoConfigLoader(object):
old_location == 
default_portdir):

ignored_map.setdefault(repo.name, []).append(old_location)
if old_location == 
portdir:
-   portdir = 
repo.user_location
+   portdir = 
repo.location
 
if repo.priority is None:
if base_priority == 0 and ov == 
portdir_orig:
@@ -826,7 +825,7 @@ class RepoConfigLoader(object):
master_repos = []
for master_name in repo.masters:
if master_name not in prepos:
-   layout_filename = 
os.path.join(repo.user_location,
+   layout_filename = 
os.path.join(repo.location,
"metadata", 
"layout.conf")
writemsg_level(_("Unavailable 
repository '%s' " \
  

[gentoo-commits] proj/portage:master commit in: pym/portage/tests/ebuild/, pym/portage/package/ebuild/_config/, ...

2015-12-01 Thread Arfrever Frehtes Taifersar Arahesis
commit: 48c2af4538d581fb2225c0ac9620b7fcfe4eae2e
Author: Arfrever Frehtes Taifersar Arahesis  Apache  Org>
AuthorDate: Wed Dec  2 01:16:34 2015 +
Commit: Arfrever Frehtes Taifersar Arahesis  apache  org>
CommitDate: Wed Dec  2 01:16:34 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=48c2af45

Respect PYTHONDONTWRITEBYTECODE in test suite.

 pym/portage/package/ebuild/_config/special_env_vars.py | 2 +-
 pym/portage/tests/dbapi/test_portdb_cache.py   | 3 ++-
 pym/portage/tests/ebuild/test_doebuild_fd_pipes.py | 3 ++-
 pym/portage/tests/ebuild/test_doebuild_spawn.py| 3 ++-
 pym/portage/tests/ebuild/test_ipc_daemon.py| 3 ++-
 pym/portage/tests/emerge/test_config_protect.py| 3 ++-
 pym/portage/tests/emerge/test_emerge_slot_abi.py   | 3 ++-
 pym/portage/tests/emerge/test_simple.py| 3 ++-
 pym/portage/tests/repoman/test_simple.py   | 3 ++-
 pym/portage/tests/sync/test_sync_local.py  | 3 ++-
 10 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py 
b/pym/portage/package/ebuild/_config/special_env_vars.py
index 8479cf5..9ae53c1 100644
--- a/pym/portage/package/ebuild/_config/special_env_vars.py
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py
@@ -77,7 +77,7 @@ environ_whitelist += [
"PORTAGE_SIGPIPE_STATUS", "PORTAGE_SOCKS5_PROXY",
"PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV", "PORTAGE_USERNAME",
"PORTAGE_VERBOSE", "PORTAGE_WORKDIR_MODE", "PORTAGE_XATTR_EXCLUDE",
-   "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH",
+   "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PYTHONDONTWRITEBYTECODE",
"REPLACING_VERSIONS", "REPLACED_BY_VERSION",
"ROOT", "ROOTPATH", "T", "TMP", "TMPDIR",
"USE_EXPAND", "USE_ORDER", "WORKDIR",

diff --git a/pym/portage/tests/dbapi/test_portdb_cache.py 
b/pym/portage/tests/dbapi/test_portdb_cache.py
index 5ac9b03..bd93446 100644
--- a/pym/portage/tests/dbapi/test_portdb_cache.py
+++ b/pym/portage/tests/dbapi/test_portdb_cache.py
@@ -1,4 +1,4 @@
-# Copyright 2012-2014 Gentoo Foundation
+# Copyright 2012-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import subprocess
@@ -134,6 +134,7 @@ class PortdbCacheTestCase(TestCase):
"PORTAGE_OVERRIDE_EPREFIX" : eprefix,
"PORTAGE_PYTHON" : portage_python,
"PORTAGE_REPOSITORIES" : 
settings.repositories.config_string(),
+   "PYTHONDONTWRITEBYTECODE" : 
os.environ.get("PYTHONDONTWRITEBYTECODE", ""),
"PYTHONPATH" : pythonpath,
}
 

diff --git a/pym/portage/tests/ebuild/test_doebuild_fd_pipes.py 
b/pym/portage/tests/ebuild/test_doebuild_fd_pipes.py
index 61392dd..2a65537 100644
--- a/pym/portage/tests/ebuild/test_doebuild_fd_pipes.py
+++ b/pym/portage/tests/ebuild/test_doebuild_fd_pipes.py
@@ -1,4 +1,4 @@
-# Copyright 2013 Gentoo Foundation
+# Copyright 2013-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import textwrap
@@ -75,6 +75,7 @@ class DoebuildFdPipesTestCase(TestCase):
settings.features.add("test")
settings['PORTAGE_PYTHON'] = portage._python_interpreter
settings['PORTAGE_QUIET'] = "1"
+   settings['PYTHONDONTWRITEBYTECODE'] = 
os.environ.get("PYTHONDONTWRITEBYTECODE", "")
 
fake_bin = os.path.join(settings["EPREFIX"], "bin")
portage.util.ensure_dirs(fake_bin)

diff --git a/pym/portage/tests/ebuild/test_doebuild_spawn.py 
b/pym/portage/tests/ebuild/test_doebuild_spawn.py
index ae9a5c5..6b34465 100644
--- a/pym/portage/tests/ebuild/test_doebuild_spawn.py
+++ b/pym/portage/tests/ebuild/test_doebuild_spawn.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import textwrap
@@ -65,6 +65,7 @@ class DoebuildSpawnTestCase(TestCase):
settings['PORTAGE_PYTHON'] = _python_interpreter
settings['PORTAGE_BUILDDIR'] = os.path.join(
settings['PORTAGE_TMPDIR'], cpv)
+   settings['PYTHONDONTWRITEBYTECODE'] = 
os.environ.get('PYTHONDONTWRITEBYTECODE', '')
settings['T'] = os.path.join(
settings['PORTAGE_BUILDDIR'], 'temp')
for x in ('PORTAGE_BUILDDIR', 'T'):

diff --git a/pym/portage/tests/ebuild/test_ipc_daemon.py 
b/pym/portage/tests/ebuild/test_ipc_daemon.py
index a871076..835f51f 100644
--- a/pym/portage/tests/ebuild/test_ipc_daemon.py
+++ b/pym/portage/tests/ebuild/test_ipc_daemon.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2015 

[gentoo-commits] proj/portage:master commit in: pym/portage/tests/ebuild/, pym/portage/package/ebuild/, ...

2014-11-27 Thread Zac Medico
commit: ffbc3416f535752e50a60adfaf0d64486c50a035
Author: Zac Medico zmedico AT gentoo DOT org
AuthorDate: Sun Nov 23 21:03:21 2014 +
Commit: Zac Medico zmedico AT gentoo DOT org
CommitDate: Thu Nov 27 08:02:00 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ffbc3416

make.defaults: negative incrementals in USE_EXPAND (530222)

Previously, USE_EXPAND variable settings in profile make.defaults only
supported positive incremental settings. This patch adds support for
negative settings like PYTHON_TARGETS=-python3_3, which brings
behavior into alignment with PMS.

Notably, this patch does not change behavior for settings in make.conf.
In make.conf, settings to USE_EXPAND variables remain entirely
non-incremental. PMS does not govern make.conf behavior.

X-Gentoo-Bug: 530222
X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=530222
Acked-by: Brian Dolbec dolsen AT gentoo.org

---
 pym/portage/package/ebuild/config.py   |  19 ++-
 .../tests/ebuild/test_use_expand_incremental.py| 132 +
 pym/portage/tests/resolver/ResolverPlayground.py   |  10 ++
 3 files changed, 151 insertions(+), 10 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index bf39487..01876cd 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2332,22 +2332,21 @@ class config(object):
if v is None:
continue
prefix = k.lower() + '_'
-   if k in myincrementals:
-   for x in v.split():
-   if x[:1] == '-':
-   
expand_use.append('-' + prefix + x[1:])
-   else:
-   
expand_use.append(prefix + x)
-   else:
-   for x in v.split():
+   for x in v.split():
+   if x[:1] == '-':
+   expand_use.append('-' + 
prefix + x[1:])
+   else:

expand_use.append(prefix + x)
+
if expand_use:
expand_use.append(use)
use  = ' '.join(expand_use)
self.make_defaults_use.append(use)
self.make_defaults_use = tuple(self.make_defaults_use)
-   configdict_defaults['USE'] = ' '.join(
-   stack_lists([x.split() for x in 
self.make_defaults_use]))
+   # Preserve both positive and negative flags here, since
+   # negative flags may later interact with other flags 
pulled
+   # in via USE_ORDER.
+   configdict_defaults['USE'] = ' 
'.join(self.make_defaults_use)
# Set to None so this code only runs once.
self._make_defaults = None
 

diff --git a/pym/portage/tests/ebuild/test_use_expand_incremental.py 
b/pym/portage/tests/ebuild/test_use_expand_incremental.py
new file mode 100644
index 000..a58f08c
--- /dev/null
+++ b/pym/portage/tests/ebuild/test_use_expand_incremental.py
@@ -0,0 +1,132 @@
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from __future__ import unicode_literals
+
+import io
+
+from portage import os, _encodings
+from portage.dep import Atom
+from portage.package.ebuild.config import config
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import ResolverPlayground
+from portage.util import ensure_dirs
+
+class UseExpandIncrementalTestCase(TestCase):
+
+   def testUseExpandIncremental(self):
+
+   profiles = (
+   (
+   'base',
+   {
+   eapi: (5,),
+   parent: (..,),
+   make.defaults: (
+   INPUT_DEVICES=\keyboard 
mouse\,
+   PYTHON_TARGETS=\python2_7 
python3_3\,
+   (USE_EXPAND=\INPUT_DEVICES 
PYTHON_TARGETS 
+   VIDEO_CARDS\),
+   )
+   }
+   ),
+