* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-02-05 12:23 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:23 UTC (permalink / raw
To: gentoo-commits
commit: 50d3d61aaaf8745d1c155e7825dc182335f8c476
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 5 12:21:10 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Feb 5 12:21:10 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=50d3d61a
binpkg: check for missing EPREFIX by absence only
Do not treat an empty prefix (the empty string) as an absent EPREFIX.
If people use EPREFIX='', then they should be able to use binpkgs as
well.
---
pym/_emerge/Package.py | 2 +-
pym/_emerge/depgraph.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 98a32a6..c809337 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -184,7 +184,7 @@ class Package(Task):
if self.built and not self.installed:
# we can have an old binary which has no EPREFIX information
- if "EPREFIX" not in self.metadata or not self.metadata["EPREFIX"]:
+ if "EPREFIX" not in self.metadata:
masks['EPREFIX.missing'] = ''
if len(self.metadata["EPREFIX"].strip()) < len(EPREFIX):
masks['EPREFIX.tooshort'] = self.metadata["EPREFIX"].strip()
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 17ed2d8..08a8c74 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5965,7 +5965,7 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None):
pkg.metadata["CHOST"]))
if pkg.built and not pkg.installed:
- if not "EPREFIX" in pkg.metadata or not pkg.metadata["EPREFIX"]:
+ if not "EPREFIX" in pkg.metadata:
mreasons.append(_MaskReason("EPREFIX", "missing EPREFIX"))
elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
mreasons.append(_MaskReason("EPREFIX", "EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"]))
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-02-05 12:25 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:25 UTC (permalink / raw
To: gentoo-commits
commit: 6503980e0e3bcfce9fbaff85c33d87f616e955a9
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 4 15:41:45 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Feb 4 15:41:45 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6503980e
depgraph: don't drop deps in _add_dep
This will fix bug #353613. We remove a hunk of code that was meant
to limit recursion, but is obsolete an buggy. The recursion limiting
is now handled by _add_pkg and the _ignored_deps stack.
---
pym/_emerge/depgraph.py | 29 -----------------------------
1 files changed, 0 insertions(+), 29 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 811eda6..4334a33 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -683,8 +683,6 @@ class depgraph(object):
dep_pkg = dep.child
existing_node = self._dynamic_config._slot_pkg_map[
dep.root].get(dep_pkg.slot_atom)
- if existing_node is not dep_pkg:
- existing_node = None
if not dep_pkg:
if dep.priority.optional:
@@ -731,33 +729,6 @@ class depgraph(object):
noiselevel=-1, level=logging.DEBUG)
return 0
- # In some cases, dep_check will return deps that shouldn't
- # be proccessed any further, so they are identified and
- # discarded here. Try to discard as few as possible since
- # discarded dependencies reduce the amount of information
- # available for optimization of merge order.
- if dep.priority.satisfied and \
- dep.priority.satisfied.visible and \
- not dep_pkg.installed and \
- not (existing_node or recurse):
- myarg = None
- if dep.root == self._frozen_config.target_root:
- try:
- myarg = next(self._iter_atoms_for_pkg(dep_pkg))
- except StopIteration:
- pass
- except portage.exception.InvalidDependString:
- if not dep_pkg.installed:
- # This shouldn't happen since the package
- # should have been masked.
- raise
- if not myarg:
- # Existing child selection may not be valid unless
- # it's added to the graph immediately, since "complete"
- # mode may select a different child later.
- dep.child = None
- self._dynamic_config._ignored_deps.append(dep)
- return 1
if not self._add_pkg(dep_pkg, dep):
return 0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-02-05 12:25 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:25 UTC (permalink / raw
To: gentoo-commits
commit: f90df89f9053bdad96d61935d704f33239f3fed5
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 4 17:41:30 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Feb 4 17:41:30 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f90df89f
depgraph: make downgrades trigger complete graph
It's common for downgrades to break dependencies, as in bug #353613, so
automatically trigger complete graph mode when a downgrade is found.
---
pym/_emerge/depgraph.py | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 4334a33..f131889 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -3456,8 +3456,27 @@ class depgraph(object):
return 1
if "complete" not in self._dynamic_config.myparams:
- # Skip this to avoid consuming enough time to disturb users.
- return 1
+ # Automatically enable complete mode if there are any
+ # downgrades, since they often break dependencies
+ # (like in bug #353613).
+ have_downgrade = False
+ for node in self._dynamic_config.digraph:
+ if not isinstance(node, Package) or \
+ node.operation != "merge":
+ continue
+ vardb = self._frozen_config.roots[
+ node.root].trees["vartree"].dbapi
+ inst_pkg = vardb.match_pkgs(node.slot_atom)
+ if inst_pkg and inst_pkg[0] > node:
+ have_downgrade = True
+ break
+
+ if have_downgrade:
+ self._dynamic_config.myparams["complete"] = True
+ else:
+ # Skip complete graph mode, in order to avoid consuming
+ # enough time to disturb users.
+ return 1
self._load_vdb()
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-02-05 12:25 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:25 UTC (permalink / raw
To: gentoo-commits
commit: 4d6d55b00d1e08453397c37f6b986c60175fd30f
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 5 03:20:37 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Feb 5 03:20:37 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4d6d55b0
get_dep_chain: add "set" node type
---
pym/_emerge/depgraph.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f131889..6e8ca31 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2199,7 +2199,11 @@ class depgraph(object):
traversed_nodes.add(node)
if isinstance(node, DependencyArg):
- dep_chain.append((_unicode_decode("%s") % (node,), "argument"))
+ if self._dynamic_config.digraph.parent_nodes(node):
+ node_type = "set"
+ else:
+ node_type = "argument"
+ dep_chain.append((_unicode_decode("%s") % (node,), node_type))
elif node is not start_node:
for ppkg, patom in all_parents[child]:
@@ -2650,7 +2654,6 @@ class depgraph(object):
# It's redundant to show parent for AtomArg since
# it's the same as 'xinfo' displayed above.
dep_chain = self._get_dep_chain(myparent, atom)
-
for node, node_type in dep_chain:
msg.append('(dependency required by "%s" [%s])' % \
(colorize('INFORM', _unicode_decode("%s") % \
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-02-05 12:25 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-02-05 12:25 UTC (permalink / raw
To: gentoo-commits
commit: a7c3400c1c8022b5b1b00e1d5b871bf902b25f48
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 5 07:32:54 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Feb 5 07:32:54 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7c3400c
backtrack_depgraph: get_best_run for last run
It's essential to feed back autounmask config changes, especially
USE changes, in order to make the last run as successful as possible.
This fixes a regression in the master branch, since commit
2186f87c22e0c4bdb86065855c2034bdbb66fa45.
---
pym/_emerge/depgraph.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 6e8ca31..c4d84ab 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5771,7 +5771,8 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
mydepgraph = depgraph(settings, trees, myopts, myparams, spinner,
frozen_config=frozen_config,
- allow_backtracking=False)
+ allow_backtracking=False,
+ backtrack_parameters=backtracker.get_best_run())
success, favorites = mydepgraph.select_files(myfiles)
return (success, mydepgraph, favorites)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-03-13 15:02 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-03-13 15:02 UTC (permalink / raw
To: gentoo-commits
commit: 3ba5f4d961808e49e34f0d1c78349c11ace6d8a8
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 13 14:59:38 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Mar 13 14:59:38 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3ba5f4d9
getloadavg: try harder to get loadavg on alt platforms
Patch from Michael Haubenwallner to read loadavg from `uptime` on AIX
and HP-UX.
---
pym/_emerge/getloadavg.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/getloadavg.py b/pym/_emerge/getloadavg.py
index e9babf1..8e62ebf 100644
--- a/pym/_emerge/getloadavg.py
+++ b/pym/_emerge/getloadavg.py
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
from portage import os
+import platform
getloadavg = getattr(os, "getloadavg", None)
if getloadavg is None:
@@ -11,8 +12,16 @@ if getloadavg is None:
Raises OSError if the load average was unobtainable.
"""
try:
- loadavg_str = open('/proc/loadavg').readline()
- except IOError:
+ if platform.system() in ["AIX", "HP-UX"]:
+ loadavg_str = os.popen('LANG=C /usr/bin/uptime 2>/dev/null').readline().split()
+ while loadavg_str[0] != 'load' and loadavg_str[1] != 'average:':
+ loadavg_str = loadavg_str[1:]
+ loadavg_str = loadavg_str[2:5]
+ loadavg_str = [x.rstrip(',') for x in loadavg_str]
+ loadavg_str = ' '.join(loadavg_str)
+ else:
+ loadavg_str = open('/proc/loadavg').readline()
+ except (IOError, IndexError):
# getloadavg() is only supposed to raise OSError, so convert
raise OSError('unknown')
loadavg_split = loadavg_str.split()
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-07-26 17:58 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-07-26 17:58 UTC (permalink / raw
To: gentoo-commits
commit: f2e0121125b28ecff78e5507884abfbbea0efce6
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 26 17:57:52 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 17:57:52 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f2e01211
Binpkg: use io.open iso codecs.open
---
pym/_emerge/Binpkg.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py
index 6c944e2..77ac720 100644
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@ -276,7 +276,7 @@ class Binpkg(CompositeTask):
self._buildprefix = self._buildprefix.strip()
# We want to install in "our" prefix, not the binary one
self.settings["EPREFIX"] = EPREFIX
- f = codecs.open(_unicode_encode(os.path.join(infloc, 'EPREFIX'),
+ f = io.open(_unicode_encode(os.path.join(infloc, 'EPREFIX'),
encoding=_encodings['fs'], errors='strict'),
mode='w', encoding=_encodings['content'], errors='strict')
try:
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-08-25 20:26 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-08-25 20:26 UTC (permalink / raw
To: gentoo-commits
commit: b568cf74f91864da2d3bacabbe940bc9b5d59ff2
Author: Hector Rivas <keymon <AT> gmail <DOT> com>
AuthorDate: Thu Aug 25 20:24:37 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Aug 25 20:24:37 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b568cf74
Binpkg: fix ValueError when installing binpkgs
Our Prefix code wasn't entirely unicode-ed, bug #379469.
---
pym/_emerge/Binpkg.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py
index 77ac720..4b66033 100644
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@ -280,7 +280,7 @@ class Binpkg(CompositeTask):
encoding=_encodings['fs'], errors='strict'),
mode='w', encoding=_encodings['content'], errors='strict')
try:
- f.write(EPREFIX + "\n")
+ f.write(_unicode_decode(EPREFIX + "\n"))
finally:
f.close()
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-08-29 19:03 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-08-29 19:03 UTC (permalink / raw
To: gentoo-commits
commit: 749ef8e20137bede1a9824448b2676224b06f71b
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 29 19:00:10 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 19:00:10 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=749ef8e2
chk_updated_info_files: run _unicode_decode on EPREFIX
Attempt to avoid
TypeError: not all arguments converted during string formatting
---
pym/_emerge/main.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 7aa9852..ec7e0ce 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -161,7 +161,7 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
processed_count += 1
myso = portage.subprocess_getstatusoutput(
"LANG=C LANGUAGE=C %s/usr/bin/install-info " +
- "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
+ "--dir-file=%s/dir %s/%s" % (_unicode_decode(EPREFIX), inforoot, inforoot, x))[1]
existsstr="already exists, for file `"
if myso!="":
if re.search(existsstr,myso):
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2011-08-31 18:47 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2011-08-31 18:47 UTC (permalink / raw
To: gentoo-commits
commit: 5551d449dffe531935dcd672f37c5cd3abd55a44
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 31 18:43:25 2011 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Aug 31 18:43:25 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5551d449
chk_updated_info_files: redo previous TypeError fix
Another attempt as suggested and explained by Burcin Erocal. % has
precedence over +, so concatenate the two strings in the C-way.
---
pym/_emerge/main.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 94e33be..84b7b41 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -161,8 +161,8 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
del e
processed_count += 1
myso = portage.subprocess_getstatusoutput(
- "LANG=C LANGUAGE=C %s/usr/bin/install-info " +
- "--dir-file=%s/dir %s/%s" % (_unicode_decode(EPREFIX), inforoot, inforoot, x))[1]
+ "LANG=C LANGUAGE=C %s/usr/bin/install-info " \
+ "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
existsstr="already exists, for file `"
if myso!="":
if re.search(existsstr,myso):
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2012-02-09 8:05 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2012-02-09 8:05 UTC (permalink / raw
To: gentoo-commits
commit: 9554b8be1fa3e72b3634954e0f57bc232b184441
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 9 08:04:34 2012 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Feb 9 08:04:34 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9554b8be
BinpkgChpathtoolAsync.py: remove now it's obsolete
---
pym/_emerge/BinpkgChpathtoolAsync.py | 35 ----------------------------------
1 files changed, 0 insertions(+), 35 deletions(-)
diff --git a/pym/_emerge/BinpkgChpathtoolAsync.py b/pym/_emerge/BinpkgChpathtoolAsync.py
deleted file mode 100644
index 26f4fd5..0000000
--- a/pym/_emerge/BinpkgChpathtoolAsync.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-from _emerge.SpawnProcess import SpawnProcess
-# for an explanation on this logic, see pym/_emerge/__init__.py
-import os
-import sys
-if os.environ.__contains__("PORTAGE_PYTHONPATH"):
- sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"])
-else:
- sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym"))
-import portage
-class BinpkgChpathtoolAsync(SpawnProcess):
-
- __slots__ = ("buildprefix", "eprefix", "image_dir", "pkg", "work_dir")
-
- _shell_binary = portage.const.BASH_BINARY
- _chpathtool_binary = \
- os.path.join(portage.const.PORTAGE_BIN_PATH, "chpathtool")
-
- def _start(self):
- b = os.path.join(self.work_dir, self.buildprefix.lstrip(os.path.sep))
- i = os.path.join(self.image_dir, self.eprefix.lstrip(os.path.sep))
- # make sure the directory structure for EPREFIX is set up in
- # the image, but avoid the last directory being there,
- # otherwise chpathtool will complain
- portage.util.ensure_dirs(i)
- os.rmdir(i)
- self.args = [self._shell_binary, "-c",
- "%s -q '%s' '%s' '%s' '%s'" % \
- (self._chpathtool_binary, b, i, self.buildprefix, self.eprefix)]
-
- self.env = self.pkg.root_config.settings.environ()
- SpawnProcess._start(self)
-
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2012-09-06 18:14 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2012-09-06 18:14 UTC (permalink / raw
To: gentoo-commits
commit: 3bce5a49dbf9cc04fe8816b8551236b892276d52
Author: Gregory M. Turner <gmturner007 <AT> ameritech <DOT> net>
AuthorDate: Thu Sep 6 18:12:36 2012 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Sep 6 18:12:36 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3bce5a49
action_sync: use new python3.2 compatible exception handling style
Signed-off-by: Gregory M. Turner <gmturner007 <AT> ameritech.net>
---
pym/_emerge/actions.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 17aed72..ae8df10 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2475,7 +2475,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
sys.exit(1)
try:
os.rmdir(myportdir)
- except OSError, e:
+ except OSError as e:
if e.errno != errno.ENOENT:
sys.stderr.write(
"!!! existing '%s' directory; exiting.\n" % myportdir)
@@ -2501,7 +2501,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
f.write(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()))
f.write('\n')
f.close()
- except IOError, e:
+ except IOError as e:
# too bad, next time better luck!
pass
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2012-09-30 11:33 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2012-09-30 11:33 UTC (permalink / raw
To: gentoo-commits
commit: 336f280625e59cc31bf9137001fbef46c9b9fb61
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 30 11:32:06 2012 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Sep 30 11:32:06 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=336f2806
chk_updated_info_files: fix merge fault and fix for Prefix
We still used some old invalid code. Patch by Alan Hourihane from
gentoo-alt ML.
---
pym/_emerge/main.py | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 92fae5c..8553bbc 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -181,9 +181,19 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
raise
del e
processed_count += 1
- myso = portage.subprocess_getstatusoutput(
- "LANG=C LANGUAGE=C %s/usr/bin/install-info " \
- "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
+ try:
+ proc = subprocess.Popen(
+ ['%s/usr/bin/install-info'
+ '--dir-file=%s' % (EPREFIX, os.path.join(inforoot, "dir")),
+ os.path.join(inforoot, x)],
+ env=dict(os.environ, LANG="C", LANGUAGE="C"),
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ except OSError:
+ myso = None
+ else:
+ myso = _unicode_decode(
+ proc.communicate()[0]).rstrip("\n")
+ proc.wait()
existsstr="already exists, for file `"
if myso:
if re.search(existsstr,myso):
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2013-02-28 20:12 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2013-02-28 20:12 UTC (permalink / raw
To: gentoo-commits
commit: f6f3b2ad4d5f68681911b4495f9b69d8ce60b9ab
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 28 20:13:12 2013 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Feb 28 20:13:12 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f6f3b2ad
getloadavg: fix indent
---
pym/_emerge/getloadavg.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/getloadavg.py b/pym/_emerge/getloadavg.py
index 637d011..e4cb009 100644
--- a/pym/_emerge/getloadavg.py
+++ b/pym/_emerge/getloadavg.py
@@ -20,8 +20,8 @@ if getloadavg is None:
loadavg_str = [x.rstrip(',') for x in loadavg_str]
loadavg_str = ' '.join(loadavg_str)
else:
- with open('/proc/loadavg') as f:
- loadavg_str = f.readline()
+ with open('/proc/loadavg') as f:
+ loadavg_str = f.readline()
except (IOError, IndexError):
# getloadavg() is only supposed to raise OSError, so convert
raise OSError('unknown')
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2013-03-23 22:00 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2013-03-23 22:00 UTC (permalink / raw
To: gentoo-commits
commit: 80f9a5dff0605a5114bbed93464be68ffc0e668a
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 21:59:58 2013 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 21:59:58 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=80f9a5df
SpawnProcess: disable FD_CLOEXEC on stdout for #456296
---
pym/_emerge/SpawnProcess.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py
index 9155050..c549884 100644
--- a/pym/_emerge/SpawnProcess.py
+++ b/pym/_emerge/SpawnProcess.py
@@ -14,6 +14,12 @@ from portage import os
from portage.const import BASH_BINARY
from portage.util._async.PipeLogger import PipeLogger
+# https://bugs.gentoo.org/show_bug.cgi?id=456296
+import platform
+if platform.system() in ("Darwin",):
+ # disable FD_CLOEXEC on stdout, breaks horribly
+ fcntl = None
+
class SpawnProcess(SubProcess):
"""
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2015-06-02 17:42 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2015-06-02 17:42 UTC (permalink / raw
To: gentoo-commits
commit: e00665d14c50351c4c8cd08d60d7d4d625b0a18d
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 2 17:41:37 2015 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jun 2 17:41:37 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e00665d1
getgccversion: add support for Clang
Since Gentoo Prefix for Mac OS X uses Clang as system compiler, portage
picks up either gcc from the host, or complains no compiler is
installed, which both are obviously not true.
pym/_emerge/actions.py | 42 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 047fa98..6910ac6 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2362,14 +2362,25 @@ def getgccversion(chost):
gcc_ver_command = ['gcc', '-dumpversion']
gcc_ver_prefix = 'gcc-'
+ clang_ver_command = ['clang', '--version']
+ clang_ver_prefix = 'clang-'
+
+ ubinpath = os.path.join('/', portage.const.EPREFIX, 'usr', 'bin')
+
gcc_not_found_error = red(
"!!! No gcc found. You probably need to 'source /etc/profile'\n" +
"!!! to update the environment of this terminal and possibly\n" +
"!!! other terminals also.\n"
)
+ def getclangversion(output):
+ version = re.search('clang version ([0-9.]+) ', output)
+ if version:
+ return version.group(1)
+ return "unknown"
+
try:
- proc = subprocess.Popen(["gcc-config", "-c"],
+ proc = subprocess.Popen([ubinpath + "/gcc-config", "-c"],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
except OSError:
myoutput = None
@@ -2382,7 +2393,7 @@ def getgccversion(chost):
try:
proc = subprocess.Popen(
- [chost + "-" + gcc_ver_command[0]] + gcc_ver_command[1:],
+ [ubinpath + "/" + chost + "-" + gcc_ver_command[0]] + gcc_ver_command[1:],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
except OSError:
myoutput = None
@@ -2394,7 +2405,7 @@ def getgccversion(chost):
return gcc_ver_prefix + myoutput
try:
- proc = subprocess.Popen(gcc_ver_command,
+ proc = subprocess.Popen([ubinpath + "/" + gcc_ver_command[0]] + gcc_ver_command[1:],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
except OSError:
myoutput = None
@@ -2405,6 +2416,31 @@ def getgccversion(chost):
if mystatus == os.EX_OK:
return gcc_ver_prefix + myoutput
+ try:
+ proc = subprocess.Popen(
+ [ubinpath + "/" + chost + "-" + clang_ver_command[0]] + clang_ver_command[1:],
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ except OSError:
+ myoutput = None
+ mystatus = 1
+ else:
+ myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n")
+ mystatus = proc.wait()
+ if mystatus == os.EX_OK:
+ return clang_ver_prefix + getclangversion(myoutput)
+
+ try:
+ proc = subprocess.Popen([ubinpath + "/" + clang_ver_command[0]] + clang_ver_command[1:],
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ except OSError:
+ myoutput = None
+ mystatus = 1
+ else:
+ myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n")
+ mystatus = proc.wait()
+ if mystatus == os.EX_OK:
+ return clang_ver_prefix + getclangversion(myoutput)
+
portage.writemsg(gcc_not_found_error, noiselevel=-1)
return "[unavailable]"
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2017-03-24 7:43 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2017-03-24 7:43 UTC (permalink / raw
To: gentoo-commits
commit: 337b7fa533809196abcbf79b4a43172d595e943e
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 24 07:42:54 2017 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Mar 24 07:42:54 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=337b7fa5
getgccversion: properly guard the use of chost
pym/_emerge/actions.py | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 704243a7e..6f9b805ef 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2495,18 +2495,19 @@ def getgccversion(chost=None):
if mystatus == os.EX_OK:
return gcc_ver_prefix + myoutput
- try:
- proc = subprocess.Popen(
- [ubinpath + "/" + chost + "-" + clang_ver_command[0]] + clang_ver_command[1:],
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- except OSError:
- myoutput = None
- mystatus = 1
- else:
- myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n")
- mystatus = proc.wait()
- if mystatus == os.EX_OK:
- return clang_ver_prefix + getclangversion(myoutput)
+ if chost:
+ try:
+ proc = subprocess.Popen(
+ [ubinpath + "/" + chost + "-" + clang_ver_command[0]] + clang_ver_command[1:],
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ except OSError:
+ myoutput = None
+ mystatus = 1
+ else:
+ myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n")
+ mystatus = proc.wait()
+ if mystatus == os.EX_OK:
+ return clang_ver_prefix + getclangversion(myoutput)
try:
proc = subprocess.Popen([ubinpath + "/" + clang_ver_command[0]] + clang_ver_command[1:],
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2017-03-24 19:09 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2017-03-24 19:09 UTC (permalink / raw
To: gentoo-commits
commit: daad4a7d399ef9bcfba35bc2675e720c60f2250c
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 24 13:24:26 2017 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Mar 24 13:24:26 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=daad4a7d
Package: sync with mainline
pym/_emerge/Package.py | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 1570f3d48..2c1a116ea 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -19,7 +19,6 @@ from portage.eapi import _get_eapi_attrs, eapi_has_use_aliases
from portage.exception import InvalidData, InvalidDependString
from portage.localization import _
from _emerge.Task import Task
-from portage.const import EPREFIX
if sys.hexversion >= 0x3000000:
basestring = str
@@ -47,7 +46,7 @@ class Package(Task):
"LICENSE", "MD5", "PDEPEND", "PROVIDE", "PROVIDES",
"RDEPEND", "repository", "REQUIRED_USE",
"PROPERTIES", "REQUIRES", "RESTRICT", "SIZE",
- "SLOT", "USE", "_mtime_", "EPREFIX"]
+ "SLOT", "USE", "_mtime_"]
_dep_keys = ('DEPEND', 'HDEPEND', 'PDEPEND', 'RDEPEND')
_buildtime_keys = ('DEPEND', 'HDEPEND')
@@ -377,13 +376,6 @@ class Package(Task):
if missing_keywords:
masks['KEYWORDS'] = missing_keywords
- if self.built and not self.installed:
- # we can have an old binary which has no EPREFIX information
- if "EPREFIX" not in self.metadata:
- masks['EPREFIX.missing'] = ''
- if len(self.metadata["EPREFIX"].strip()) < len(EPREFIX):
- masks['EPREFIX.tooshort'] = self.metadata["EPREFIX"].strip()
-
try:
missing_properties = settings._getMissingProperties(
self.cpv, self._metadata)
@@ -427,10 +419,7 @@ class Package(Task):
if 'EAPI.unsupported' in masks:
return False
- if self.built and not self.installed and ( \
- 'EPREFIX.missing' in masks or \
- 'EPREFIX.tooshort' in masks) or \
- 'invalid' in masks:
+ if 'invalid' in masks:
return False
if not self.installed and ( \
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2017-03-24 19:09 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2017-03-24 19:09 UTC (permalink / raw
To: gentoo-commits
commit: 6d6aab7529b113d088f8550456a04ed666de9542
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 24 14:19:30 2017 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Mar 24 14:19:30 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6d6aab75
Package: EPREFIX is a metadata key in Prefix
pym/_emerge/Package.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 2c1a116ea..952245054 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -46,7 +46,7 @@ class Package(Task):
"LICENSE", "MD5", "PDEPEND", "PROVIDE", "PROVIDES",
"RDEPEND", "repository", "REQUIRED_USE",
"PROPERTIES", "REQUIRES", "RESTRICT", "SIZE",
- "SLOT", "USE", "_mtime_"]
+ "SLOT", "USE", "_mtime_", "EPREFIX"]
_dep_keys = ('DEPEND', 'HDEPEND', 'PDEPEND', 'RDEPEND')
_buildtime_keys = ('DEPEND', 'HDEPEND')
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
@ 2018-05-25 19:32 Fabian Groffen
0 siblings, 0 replies; 20+ messages in thread
From: Fabian Groffen @ 2018-05-25 19:32 UTC (permalink / raw
To: gentoo-commits
commit: 298caad4eed4c6025776fd84b0cda9ef6c59119c
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri May 25 19:30:25 2018 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri May 25 19:30:25 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=298caad4
_get_masking_status: avoid Prefix checks when not in use
Also, fix deprecation warnings for _emerge.Package.Package.metadata
pym/_emerge/depgraph.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 813e345e0..f7bac69f9 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -10042,11 +10042,15 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None):
mreasons.append(_MaskReason("CHOST", "CHOST: %s" % \
pkg._metadata["CHOST"]))
- if pkg.built and not pkg.installed:
- if not "EPREFIX" in pkg.metadata:
- mreasons.append(_MaskReason("EPREFIX", "missing EPREFIX"))
- elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
- mreasons.append(_MaskReason("EPREFIX", "EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"]))
+ eprefix = pkgsettings["EPREFIX"]
+ if len(eprefix.rstrip('/')) > 0 and pkg.built and not pkg.installed:
+ if not "EPREFIX" in pkg._metadata:
+ mreasons.append(_MaskReason("EPREFIX",
+ "missing EPREFIX"))
+ elif len(pkg._metadata["EPREFIX"].strip()) < len(eprefix):
+ mreasons.append(_MaskReason("EPREFIX",
+ "EPREFIX: '%s' too small" % \
+ pkg._metadata["EPREFIX"]))
if pkg.invalid:
for msgs in pkg.invalid.values():
^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-05-25 19:32 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-26 17:58 [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/ Fabian Groffen
-- strict thread matches above, loose matches on Subject: below --
2018-05-25 19:32 Fabian Groffen
2017-03-24 19:09 Fabian Groffen
2017-03-24 19:09 Fabian Groffen
2017-03-24 7:43 Fabian Groffen
2015-06-02 17:42 Fabian Groffen
2013-03-23 22:00 Fabian Groffen
2013-02-28 20:12 Fabian Groffen
2012-09-30 11:33 Fabian Groffen
2012-09-06 18:14 Fabian Groffen
2012-02-09 8:05 Fabian Groffen
2011-08-31 18:47 Fabian Groffen
2011-08-29 19:03 Fabian Groffen
2011-08-25 20:26 Fabian Groffen
2011-03-13 15:02 Fabian Groffen
2011-02-05 12:25 Fabian Groffen
2011-02-05 12:25 Fabian Groffen
2011-02-05 12:25 Fabian Groffen
2011-02-05 12:25 Fabian Groffen
2011-02-05 12:23 Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox