-#!/usr/bin/python
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
-#!/usr/bin/python
-# Copyright 2010-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import io
usage += "\n\n"
for line in textwrap.wrap(prog_desc, 70):
- usage += line + "\n"
+ usage += line + "\n"
usage += "\n"
usage += "Required Arguments:\n\n"
-#!/usr/bin/python
+#!/usr/bin/python -bb
# Ripped from HP and updated from Debian
# Update by Gentoo to support unicode output
-#!/usr/bin/python
+#!/usr/bin/python -bb
# Copyright 2011-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!/usr/bin/python -O
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
print("%s --force %s/.locks" % (sys.argv[0], portage.settings["DISTDIR"]))
print()
sys.exit(1)
-
+
force = False
if "--force" in sys.argv[1:]:
force=True
-
+
for x in sys.argv[1:]:
if x == "--force":
continue
for y in portage.locks.hardlock_cleanup(x, remove_all_locks=force):
print(y)
print()
-
+
except OSError as e:
if e.errno in (errno.ENOENT, errno.ENOTDIR):
print("!!! %s is not a directory or does not exist" % x)
-#!/usr/bin/python -O
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
-#!/usr/bin/python
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
-#!/usr/bin/python -O
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-#!/usr/bin/python
-# Copyright 2010-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# This is a helper which ebuild processes can use
self._no_daemon_msg()
return 2
- buf = pipe_reader.getvalue()
+ buf = pipe_reader.getvalue()
retval = 2
-#!/usr/bin/python
-# Copyright 2009-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2009-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# unicode_literals for compat with TextIOWrapper in Python 2
-#!/usr/bin/python -O
-# Copyright 2005-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 2005-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""System health checks and maintenance utilities.
-#!/usr/bin/python
-# Copyright 2006-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2006-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-#!/usr/bin/python
-# Copyright 2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2013-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
-#!/usr/bin/python -O
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-#!/usr/bin/python
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import codecs
-#!/usr/bin/python
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-#!/usr/bin/python
-# Copyright 2008-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
mergedict = {}
for (vuln, update) in myglsa.getAffectionTable(least_change=least_change):
mergedict.setdefault(update, []).append(vuln)
-
+
sys.stdout.write(">>> The following updates will be performed for this GLSA:\n")
for pkg in mergedict:
if pkg != "":
-#!/usr/bin/python
-# Copyright 2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2013-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os
parser.add_argument(
"--owner",
"-o",
- action="store",
+ action="store",
dest="owner"
)
parser.add_argument(
-#!/usr/bin/python
-# Copyright 2010-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os
-#!/usr/bin/python -O
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function, unicode_literals
-#!/usr/bin/python
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-#!/usr/bin/python
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
-#!/usr/bin/python -O
-# Copyright 1999-2013 Gentoo Foundation
+#!/usr/bin/python -bbO
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Next to do: dep syntax checking in mask files
-#!/usr/bin/python
-# Copyright 2012-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2012-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""Dump and restore extended attributes.
-#!/usr/bin/python
-# Copyright 2009-2013 Gentoo Foundation
+#!/usr/bin/python -bb
+# Copyright 2009-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
-# Copyright 2012-2013 Gentoo Foundation
+# Copyright 2012-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import subprocess
layout_conf_path = os.path.join(metadata_dir, "layout.conf")
portage_python = portage._python_interpreter
- egencache_cmd = (portage_python, "-Wd",
+ egencache_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "egencache"),
"--repo", "test_repo",
"--repositories-configuration", settings.repositories.config_string())
- python_cmd = (portage_python, "-Wd", "-c")
+ python_cmd = (portage_python, "-bb", "-Wd", "-c")
test_commands = (
(lambda: not os.path.exists(pms_cache_dir),),
sys.exit(1)
"""),),
- # Don't use python -Wd, since the pms format triggers deprecation warnings
+ # Disable DeprecationWarnings, since the pms format triggers them
# in portdbapi._create_pregen_cache().
(BASH_BINARY, "-c", "echo %s > %s" %
tuple(map(portage._shell_quote,
("cache-formats = pms md5-dict", layout_conf_path,)))),
- (portage_python, "-Wi", "-c") + (textwrap.dedent("""
+ (portage_python, "-bb", "-Wd", "-Wi::DeprecationWarning", "-c") + (textwrap.dedent("""
import os, sys, portage
if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb:
sys.exit(1)
"""),),
- (portage_python, "-Wi", "-c") + (textwrap.dedent("""
+ (portage_python, "-bb", "-Wd", "-Wi::DeprecationWarning", "-c") + (textwrap.dedent("""
import os, sys, portage
from portage.cache.metadata import database as pms_database
if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], pms_database):
-# Copyright 2012-2013 Gentoo Foundation
+# Copyright 2012-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import subprocess
package_mask_path = os.path.join(user_config_dir, "package.mask")
portage_python = portage._python_interpreter
- ebuild_cmd = (portage_python, "-Wd",
+ ebuild_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "ebuild"))
- emerge_cmd = (portage_python, "-Wd",
+ emerge_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "emerge"))
test_ebuild = portdb.findname("dev-libs/dbus-glib-0.98")
-# Copyright 2011-2013 Gentoo Foundation
+# Copyright 2011-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import subprocess
cachedir_pregen = os.path.join(test_repo_location, "metadata", "md5-cache")
portage_python = portage._python_interpreter
- dispatch_conf_cmd = (portage_python, "-Wd",
+ dispatch_conf_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "dispatch-conf"))
- ebuild_cmd = (portage_python, "-Wd",
+ ebuild_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "ebuild"))
- egencache_cmd = (portage_python, "-Wd",
+ egencache_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "egencache"),
"--repo", "test_repo",
"--repositories-configuration", settings.repositories.config_string())
- emerge_cmd = (portage_python, "-Wd",
+ emerge_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "emerge"))
- emaint_cmd = (portage_python, "-Wd",
+ emaint_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "emaint"))
- env_update_cmd = (portage_python, "-Wd",
+ env_update_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "env-update"))
etc_update_cmd = (BASH_BINARY,
os.path.join(PORTAGE_BIN_PATH, "etc-update"))
- fixpackages_cmd = (portage_python, "-Wd",
+ fixpackages_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "fixpackages"))
- portageq_cmd = (portage_python, "-Wd",
+ portageq_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "portageq"))
- quickpkg_cmd = (portage_python, "-Wd",
+ quickpkg_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "quickpkg"))
- regenworld_cmd = (portage_python, "-Wd",
+ regenworld_cmd = (portage_python, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "regenworld"))
rm_binary = find_binary("rm")
-# Copyright 2011-2013 Gentoo Foundation
+# Copyright 2011-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import subprocess
profiles_dir = os.path.join(test_repo_location, "profiles")
license_dir = os.path.join(test_repo_location, "licenses")
- repoman_cmd = (portage._python_interpreter, "-Wd",
+ repoman_cmd = (portage._python_interpreter, "-bb", "-Wd",
os.path.join(PORTAGE_BIN_PATH, "repoman"))
git_binary = find_binary("git")
for cwd in ("", "dev-libs", "dev-libs/A", "dev-libs/B"):
abs_cwd = os.path.join(test_repo_symlink, cwd)
- proc = subprocess.Popen([portage._python_interpreter, "-Wd",
- os.path.join(PORTAGE_BIN_PATH, "repoman"), "full"],
+ proc = subprocess.Popen(repoman_cmd + ("full",),
cwd=abs_cwd, env=env, stdout=stdout)
if debug:
-#!/usr/bin/python -Wd
+#!/usr/bin/python -bbWd
# runTests.py -- Portage Unit Test Functionality
-# Copyright 2006-2013 Gentoo Foundation
+# Copyright 2006-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os, sys
-# Copyright 2011 Gentoo Foundation
+# Copyright 2011-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import subprocess
class WhirlpoolTestCase(TestCase):
def testBundledWhirlpool(self):
# execute the tests bundled with the whirlpool module
- retval = subprocess.call([portage._python_interpreter, "-Wd",
+ retval = subprocess.call([portage._python_interpreter, "-bb", "-Wd",
os.path.join(PORTAGE_PYM_PATH, "portage/util/whirlpool.py")])
self.assertEqual(retval, os.EX_OK)
fi
if [[ -x "${executable}" ]]; then
echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
- "${executable}" -Wd pym/portage/tests/runTests "$@"
+ "${executable}" -bb -Wd pym/portage/tests/runTests "$@"
status=$?
status_array[${#status_array[@]}]=${status}
found_versions[${#found_versions[@]}]=${version}
-#!/usr/bin/python -O
+#!/usr/bin/python -bbO
import tabnanny,sys