From 07209178d4c5e292d49054e2182242a32c22eafc Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 21 Sep 2009 17:22:22 +0000 Subject: [PATCH] Merged from trunk -r14290:14291 | 14291 | Support print() function with Python 2 in some files. | | arfrever | | svn path=/main/branches/prefix/; revision=14337 --- bin/archive-conf | 2 ++ bin/check-implicit-pointer-usage.py | 3 +++ bin/clean_locks | 2 ++ bin/dispatch-conf | 2 ++ bin/ebuild | 2 ++ bin/ebuild-helpers/dohtml | 2 ++ bin/egencache | 2 ++ bin/emaint | 3 +++ bin/emerge | 3 ++- bin/env-update | 5 ++++- bin/fixpackages | 2 ++ bin/glsa-check | 2 ++ bin/portageq | 2 ++ bin/quickpkg | 6 +++++- bin/regenworld | 2 ++ bin/repoman | 2 ++ pym/portage/tests/runTests | 1 + 17 files changed, 40 insertions(+), 3 deletions(-) diff --git a/bin/archive-conf b/bin/archive-conf index d76707b5f..ce6a607a2 100755 --- a/bin/archive-conf +++ b/bin/archive-conf @@ -10,6 +10,8 @@ # Jeremy Wohl's dispatch-conf script and the portage chkcontents script. # +from __future__ import print_function + import sys from portage import os diff --git a/bin/check-implicit-pointer-usage.py b/bin/check-implicit-pointer-usage.py index 24277e081..844ea8184 100755 --- a/bin/check-implicit-pointer-usage.py +++ b/bin/check-implicit-pointer-usage.py @@ -13,6 +13,9 @@ # interpreted as pointers. Those are almost guaranteed to cause # crashes. # + +from __future__ import print_function + import re import sys diff --git a/bin/clean_locks b/bin/clean_locks index b657f750b..8c5270677 100755 --- a/bin/clean_locks +++ b/bin/clean_locks @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function + import sys, errno # for an explanation on this logic, see pym/_emerge/__init__.py from os import environ as ose diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 81ef88fc5..a86d9fdf4 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -12,6 +12,8 @@ # dialog menus # +from __future__ import print_function + if not hasattr(__builtins__, "set"): from sets import Set as set diff --git a/bin/ebuild b/bin/ebuild index 4564dded1..ac5781ef8 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function + import sys # This block ensures that ^C interrupts are handled quietly. try: diff --git a/bin/ebuild-helpers/dohtml b/bin/ebuild-helpers/dohtml index d3d9f9e55..39e7ab107 100755 --- a/bin/ebuild-helpers/dohtml +++ b/bin/ebuild-helpers/dohtml @@ -29,6 +29,8 @@ # - will do as 'dohtml -r', but ignore directories named CVS, SCCS, RCS # +from __future__ import print_function + import os import sys diff --git a/bin/egencache b/bin/egencache index 98d20c25e..d6e69b042 100755 --- a/bin/egencache +++ b/bin/egencache @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function + import sys # This block ensures that ^C interrupts are handled quietly. try: diff --git a/bin/emaint b/bin/emaint index c070c3266..580447c48 100755 --- a/bin/emaint +++ b/bin/emaint @@ -1,5 +1,8 @@ #!@PORTAGE_PYTHON@ -O # vim: noet : + +from __future__ import print_function + import re import signal import sys diff --git a/bin/emerge b/bin/emerge index eabc1d24a..05ed9ae91 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3,7 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import os +from __future__ import print_function + import sys # This block ensures that ^C interrupts are handled quietly. try: diff --git a/bin/env-update b/bin/env-update index 43abef500..73bb2b39e 100755 --- a/bin/env-update +++ b/bin/env-update @@ -3,7 +3,10 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import sys, errno +from __future__ import print_function + +import errno +import sys def usage(status): print("Usage: env-update [--no-ldconfig]") diff --git a/bin/fixpackages b/bin/fixpackages index 5758074c6..140eda4bb 100755 --- a/bin/fixpackages +++ b/bin/fixpackages @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function + import os,sys os.environ["PORTAGE_CALLER"]="fixpackages" diff --git a/bin/glsa-check b/bin/glsa-check index c1def7275..21f33ba17 100755 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function + import sys # for an explanation on this logic, see pym/_emerge/__init__.py diff --git a/bin/portageq b/bin/portageq index a3b1c3506..f197db69e 100755 --- a/bin/portageq +++ b/bin/portageq @@ -3,6 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function + import sys # This block ensures that ^C interrupts are handled quietly. try: diff --git a/bin/quickpkg b/bin/quickpkg index cad838932..e15f4b289 100755 --- a/bin/quickpkg +++ b/bin/quickpkg @@ -3,7 +3,11 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import errno, signal, sys +from __future__ import print_function + +import errno +import signal +import sys from itertools import izip from os import environ as ose diff --git a/bin/regenworld b/bin/regenworld index a0b9337fb..f4cd445f4 100755 --- a/bin/regenworld +++ b/bin/regenworld @@ -5,6 +5,8 @@ # NOTE: this file does not respect ROOT +from __future__ import print_function + import sys # for an explanation on this logic, see pym/_emerge/__init__.py from os import environ as ose diff --git a/bin/repoman b/bin/repoman index d7db51ea2..a0fd91efd 100755 --- a/bin/repoman +++ b/bin/repoman @@ -7,6 +7,8 @@ # Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems) # that last one is tricky because multiple profiles need to be checked. +from __future__ import print_function + import codecs import commands import errno diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests index 3bf8e3d3e..57e23f583 100755 --- a/pym/portage/tests/runTests +++ b/pym/portage/tests/runTests @@ -4,6 +4,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +from __future__ import print_function import os, sys import os.path as osp -- 2.26.2