public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] emerge/actions: Add python version to portage version line
@ 2014-04-06  8:33 Douglas Freed
  2014-04-06  9:09 ` [gentoo-portage-dev] [PATCH v2] " Douglas Freed
  0 siblings, 1 reply; 6+ messages in thread
From: Douglas Freed @ 2014-04-06  8:33 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Douglas Freed

Adds the currently running python version to the portage version line,
so that it's immediately obvious what version of python is being used to
run portage
---
 pym/_emerge/actions.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 2a1354b..9bc6ed1 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2996,6 +2996,7 @@ def relative_profile_path(portdir, abs_profile):
 	return profilever
 
 def getportageversion(portdir, _unused, profile, chost, vardb):
+	pythonver = 'python %d.%d.%d-%s-%d' % sys.version_info
 	profilever = None
 	repositories = vardb.settings.repositories
 	if profile:
@@ -3051,8 +3052,8 @@ def getportageversion(portdir, _unused, profile, chost, vardb):
 	gccver = getgccversion(chost)
 	unameout=platform.release()+" "+platform.machine()
 
-	return "Portage %s (%s, %s, %s, %s)" % \
-		(portage.VERSION, profilever, gccver, ",".join(libcver), unameout)
+	return "Portage %s (%s, %s, %s, %s, %s)" % \
+		(portage.VERSION, pythonver, profilever, gccver, ",".join(libcver), unameout)
 
 def git_sync_timestamps(portdb, portdir):
 	"""
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-portage-dev] [PATCH v2] emerge/actions: Add python version to portage version line
  2014-04-06  8:33 [gentoo-portage-dev] [PATCH] emerge/actions: Add python version to portage version line Douglas Freed
@ 2014-04-06  9:09 ` Douglas Freed
  2014-04-06 14:20   ` Alexander Berntsen
  2014-04-19  5:45   ` Brian Dolbec
  0 siblings, 2 replies; 6+ messages in thread
From: Douglas Freed @ 2014-04-06  9:09 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Douglas Freed

Adds the currently running python version to the portage version line,
so that it's immediately obvious what version of python is being used to
run portage.
---

Notes:
    This version fixes a traceback with python 2.x by coercing sys.version_info to a
    list with [:].

 pym/_emerge/actions.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 2a1354b..ff72d70 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2996,6 +2996,7 @@ def relative_profile_path(portdir, abs_profile):
 	return profilever
 
 def getportageversion(portdir, _unused, profile, chost, vardb):
+	pythonver = 'python %d.%d.%d-%s-%d' % sys.version_info[:]
 	profilever = None
 	repositories = vardb.settings.repositories
 	if profile:
@@ -3051,8 +3052,8 @@ def getportageversion(portdir, _unused, profile, chost, vardb):
 	gccver = getgccversion(chost)
 	unameout=platform.release()+" "+platform.machine()
 
-	return "Portage %s (%s, %s, %s, %s)" % \
-		(portage.VERSION, profilever, gccver, ",".join(libcver), unameout)
+	return "Portage %s (%s, %s, %s, %s, %s)" % \
+		(portage.VERSION, pythonver, profilever, gccver, ",".join(libcver), unameout)
 
 def git_sync_timestamps(portdb, portdir):
 	"""
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] emerge/actions: Add python version to portage version line
  2014-04-06  9:09 ` [gentoo-portage-dev] [PATCH v2] " Douglas Freed
@ 2014-04-06 14:20   ` Alexander Berntsen
  2014-04-07  2:29     ` Brian Dolbec
  2014-04-19  5:45   ` Brian Dolbec
  1 sibling, 1 reply; 6+ messages in thread
From: Alexander Berntsen @ 2014-04-06 14:20 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/04/14 11:09, Douglas Freed wrote:
> Adds the currently running python version to the portage version
> line, so that it's immediately obvious what version of python is
> being used to run portage.
Is this useful?

The patch itself looks OK though. I tested it briefly with HEAD and a
couple of python versions.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlNBYpsACgkQRtClrXBQc7XgFwD+LSILTSjYCR2D5Z6IFbIEwAiK
Hi+kp+X0zWN7MwimUdMBAIuVnutZ8zb0VBCdgF/zANV/SEZ4Y60mcLzDMNK1pJxT
=eA08
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] emerge/actions: Add python version to portage version line
  2014-04-06 14:20   ` Alexander Berntsen
@ 2014-04-07  2:29     ` Brian Dolbec
  2014-04-07  8:08       ` Alexander Berntsen
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Dolbec @ 2014-04-07  2:29 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Sun, 06 Apr 2014 16:20:12 +0200
Alexander Berntsen <bernalex@gentoo.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On 06/04/14 11:09, Douglas Freed wrote:
> > Adds the currently running python version to the portage version
> > line, so that it's immediately obvious what version of python is
> > being used to run portage.
> Is this useful?
> 

   YES, there can be problems associated with certain python versions,
   like the recent bug 506870.  It turned out to be a pypy
   compatibility bug.


> The patch itself looks OK though. I tested it briefly with HEAD and a
> couple of python versions.
> - -- 
> Alexander
> bernalex@gentoo.org
> https://secure.plaimi.net/~alexander
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iF4EAREIAAYFAlNBYpsACgkQRtClrXBQc7XgFwD+LSILTSjYCR2D5Z6IFbIEwAiK
> Hi+kp+X0zWN7MwimUdMBAIuVnutZ8zb0VBCdgF/zANV/SEZ4Y60mcLzDMNK1pJxT
> =eA08
> -----END PGP SIGNATURE-----
> 



- -- 
Brian Dolbec <dolsen>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQF8BAEBCgBmBQJTQg2GXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy
MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfLrYcIAMwK3Zij/OgF4mnsoV39YlHZ
nqfk3KfP6uBwAejprkeNPGcNmuC3CvnscfEyyTmgH2o6kgg7QZe46POGiBv4ftJB
Ipq1dOZJrde2Ww9LJiHc89mGmdVN1jwG8hhKlQtOzKBqFGBlxTN4Sa63LsUUz1jW
L3I51l3uyb1Xu+Y87gxj+obvWv+81cCb1aMmkUuA9P5UrRsBQm0fjBOP1cufkbsP
etvkrraD32grEhoKUXjsstB1cLSYKGS9gVQLeII4z/TAq4DjbNwcYs+IRfrovaKM
MIKS/qcQfw3yPLBkI7v6dLzChxvBWpgACtE93xkK/o7gQKW+ntH6JUqERVVCwA4=
=Mjmg
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] emerge/actions: Add python version to portage version line
  2014-04-07  2:29     ` Brian Dolbec
@ 2014-04-07  8:08       ` Alexander Berntsen
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Berntsen @ 2014-04-07  8:08 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 07/04/14 04:29, Brian Dolbec wrote:
> YES, there can be problems associated with certain python
> versions, like the recent bug 506870.  It turned out to be a pypy 
> compatibility bug.
OK. ACK from me then.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlNCXRQACgkQRtClrXBQc7V8xgEArMUtP+qHF/WIaxxcsvmqh/uk
3fs/d+YqSMHSN3AmoNwBALZC0+s1jajyy4+9EHzXnvFR6DIhFS1E9ZixtDx2P27r
=g8Ex
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] emerge/actions: Add python version to portage version line
  2014-04-06  9:09 ` [gentoo-portage-dev] [PATCH v2] " Douglas Freed
  2014-04-06 14:20   ` Alexander Berntsen
@ 2014-04-19  5:45   ` Brian Dolbec
  1 sibling, 0 replies; 6+ messages in thread
From: Brian Dolbec @ 2014-04-19  5:45 UTC (permalink / raw
  To: gentoo-portage-dev

On Sun,  6 Apr 2014 09:09:08 +0000
Douglas Freed <dwfreed@mtu.edu> wrote:

> Adds the currently running python version to the portage version line,
> so that it's immediately obvious what version of python is being used
> to run portage.
> ---

committed:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=54e439500e9c95582973c2350f293796b9455d44


-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-19  5:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-06  8:33 [gentoo-portage-dev] [PATCH] emerge/actions: Add python version to portage version line Douglas Freed
2014-04-06  9:09 ` [gentoo-portage-dev] [PATCH v2] " Douglas Freed
2014-04-06 14:20   ` Alexander Berntsen
2014-04-07  2:29     ` Brian Dolbec
2014-04-07  8:08       ` Alexander Berntsen
2014-04-19  5:45   ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox