--- a/src/Makefile Thu Mar 12 11:17:36 2015 -0700
+++ b/src/Makefile Tue Mar 17 18:19:09 2015 -0700
@@ -20,11 +20,11 @@
#
#
-# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
#
-PYTHON26 = /usr/bin/python2.6
PYTHON27 = /usr/bin/python2.7
+PYTHON34 = /usr/bin/python3.4
all := TARGET = all
install := TARGET = install
@@ -50,15 +50,14 @@
SUBDIRS=zoneproxy tsol
all: $(SUBDIRS)
- $(PYTHON26) setup.py build
$(PYTHON27) setup.py build
clean: $(SUBDIRS)
- $(PYTHON26) setup.py clean
+ $(PYTHON27) setup.py clean
@cd pkg; pwd; make clean
clobber: $(SUBDIRS)
- $(PYTHON26) setup.py clobber
+ $(PYTHON27) setup.py clobber
@cd pkg; pwd; make clobber
#
@@ -66,19 +65,17 @@
# it's the best way to ensure things stay pylint clean.
#
install: $(SUBDIRS)
- $(PYTHON26) setup.py install
$(PYTHON27) setup.py install
lint:
- $(PYTHON26) setup.py lint
+ $(PYTHON27) setup.py lint
@cd zoneproxy; pwd; make lint
clint:
- $(PYTHON26) setup.py clint
+ $(PYTHON27) setup.py clint
@cd zoneproxy; pwd; make lint
pylint: install
- PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON26) setup.py pylint
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint
#
@@ -92,15 +89,15 @@
packages: install pylint
@cd pkg; pwd; $(MAKE) $(TARGET) check \
PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH \
- PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.6/vendor-packages
+ PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.7/vendor-packages
test:
- $(PYTHON26) setup.py test
+ $(PYTHON27) setup.py test
test-verbose:
- $(PYTHON26) setup.py test -v
+ $(PYTHON27) setup.py test -v
test-generate:
- $(PYTHON26) setup.py test -g
+ $(PYTHON27) setup.py test -g
FRC:
--- a/src/client.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/client.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
@@ -3237,14 +3237,14 @@
]
for n in range(len(line_widths)):
if line_widths[n] < 0:
- fmt += "{{{0}:<{1}}} ".format(n,
+ fmt += "{{{0}!s:<{1}}} ".format(n,
-line_widths[n])
else:
- fmt += "{{{0}:>{1}}} ".format(n,
+ fmt += "{{{0}!s:>{1}}} ".format(n,
line_widths[n])
return fmt
for n in range(len(widths)):
- fmt += "{{{0}}}\t".format(n)
+ fmt += "{{{0}!s}}\t".format(n)
fmt.rstrip("\t")
return fmt
@@ -4974,7 +4974,7 @@
width = max(width, len(li_header[col]))
if (fmt != ''):
fmt += "\t"
- fmt += "{{{0}:{1}}}".format(col, width)
+ fmt += "{{{0}!s:{1}}}".format(col, width)
if not omit_headers:
msg(fmt.format(*li_header))
@@ -5114,7 +5114,7 @@
# display audit return values
width = max(max([len(k) for k in rvdict.keys()]), 8)
- fmt = "{{0:{0}}}\t{{1}}".format(width)
+ fmt = "{{0!s:{0}}}\t{{1}}".format(width)
if not omit_headers:
msg(fmt.format("NAME", "STATUS"))
--- a/src/depot-config.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/depot-config.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/depot.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/depot.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/man/ja_JP/pkg.5 Thu Mar 12 11:17:36 2015 -0700
+++ b/src/man/ja_JP/pkg.5 Tue Mar 17 18:19:09 2015 -0700
@@ -158,8 +158,8 @@
<varlistentry><term><literal>timestamp</literal></term>
<listitem><para>この属性は、ファイルに対するアクセスおよび変更時間を設定するために使用します。<literal>timestamp</literal> 属性値は、コロンおよびハイフンを省略した、ISO-8601 形式の UTC で表現する必要があります。</para>
<para><literal>timestamp</literal> 属性は、Python 用の <filename>.pyc</filename> または <filename>.pyo</filename> ファイルをパッケージングする場合に不可欠です。<filename>.pyc</filename> または <filename>.pyo</filename> ファイルに関連する <filename>.py</filename> ファイルは、次の例で示すように、これらのファイル内に埋め込まれたタイムスタンプを使用してマーク付けする必要があります。</para>
-<programlisting>file path=usr/lib/python2.6/vendor-packages/pkg/__init__.pyc ...
-file path=usr/lib/python2.6/vendor-packages/pkg/__init__.py \
+<programlisting>file path=usr/lib/python2.7/vendor-packages/pkg/__init__.pyc ...
+file path=usr/lib/python2.7/vendor-packages/pkg/__init__.py \
timestamp=20130311T221521Z ...</programlisting>
</listitem>
</varlistentry>
@@ -212,7 +212,7 @@
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-version</literal></term>
-<listitem><para><literal>mediator</literal> 属性で記述されたインタフェースの (負にならない整数のドットで区切られた並びとして表された) バージョンを指定します。この属性は、<literal>mediator</literal> が指定され、<literal>mediator-implementation</literal> は指定されていない場合に必要です。ローカルシステム管理者は、使用するバージョンを明示的に設定できます。指定された値は一般に、リンクを提供しているパッケージのバージョンに一致するようにしてください (たとえば、<literal>runtime/python-26</literal> は <literal>mediator-version=2.6</literal> を使用します)。ただし、これは必須ではありません。</para>
+<listitem><para><literal>mediator</literal> 属性で記述されたインタフェースの (負にならない整数のドットで区切られた並びとして表された) バージョンを指定します。この属性は、<literal>mediator</literal> が指定され、<literal>mediator-implementation</literal> は指定されていない場合に必要です。ローカルシステム管理者は、使用するバージョンを明示的に設定できます。指定された値は一般に、リンクを提供しているパッケージのバージョンに一致するようにしてください (たとえば、<literal>runtime/python-27</literal> は <literal>mediator-version=2.7</literal> を使用します)。ただし、これは必須ではありません。</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-implementation</literal></term>
--- a/src/man/ja_JP/pkgdepend.1 Thu Mar 12 11:17:36 2015 -0700
+++ b/src/man/ja_JP/pkgdepend.1 Tue Mar 17 18:19:09 2015 -0700
@@ -179,7 +179,7 @@
</example>
<example><title>依存関係の生成をバイパスする</title>
<para>指定された Python スクリプトの標準の Python 実行パスに <filename>opt/python</filename> を追加し、<filename>opt/python/foo/file.py</filename> として提供されるファイルの <literal>test</literal> という名前のすべての Python モジュールに対する依存関係の生成をバイパスします。</para>
-<para><filename>usr/lib/python2.6/vendor-packages/xdg</filename> で提供されたすべてのファイルに対する依存関係の生成を回避します。</para>
+<para><filename>usr/lib/python2.7/vendor-packages/xdg</filename> で提供されたすべてのファイルに対する依存関係の生成を回避します。</para>
<screen>$ <userinput>cat manifest.py</userinput>
set name=pkg.fmri value=pkg:/[email protected],1.0
set name=pkg.summary value="My test package"
@@ -195,7 +195,7 @@
pkg.depend.bypass-generate=.*/test.py.* \
pkg.depend.bypass-generate=.*/testmodule.so \
pkg.depend.bypass-generate=.*/test.so \
- pkg.depend.bypass-generate=usr/lib/python2.6/vendor-packages/xdg/.* \
+ pkg.depend.bypass-generate=usr/lib/python2.7/vendor-packages/xdg/.* \
pkg.depend.runpath=$PKGDEPEND_RUNPATH:/opt/python
$ <userinput>pkgdepend generate -d proto manifest.py</userinput></screen>
--- a/src/man/pkg.5 Thu Mar 12 11:17:36 2015 -0700
+++ b/src/man/pkg.5 Tue Mar 17 18:19:09 2015 -0700
@@ -7,11 +7,11 @@
<refentry id="pkg-5">
<refmeta><refentrytitle>pkg</refentrytitle><manvolnum>5</manvolnum>
-<refmiscinfo class="date">28 May 2014</refmiscinfo>
+<refmiscinfo class="date">28 Jan 2015</refmiscinfo>
<refmiscinfo class="sectdesc">&man5;</refmiscinfo>
<refmiscinfo class="software">&release;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
-<refmiscinfo class="copyright">Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.</refmiscinfo>
+<refmiscinfo class="copyright">Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.</refmiscinfo>
</refmeta>
<refnamediv>
<refname>pkg</refname><refpurpose>Image Packaging System</refpurpose>
@@ -365,8 +365,8 @@
time on the file. The <literal>timestamp</literal> attribute value must be
expressed in UTC in ISO-8601 format, omitting the colons and hyphens.</para>
<para>The <literal>timestamp</literal> attribute is essential when packaging <filename>.pyc</filename> or <filename>.pyo</filename> files for Python. The related <filename>.py</filename> file for the <filename>.pyc</filename> or <filename>.pyo</filename> files must be marked with the timestamp embedded within those files, as shown in the following example:</para>
-<programlisting>file path=usr/lib/python2.6/vendor-packages/pkg/__init__.pyc ...
-file path=usr/lib/python2.6/vendor-packages/pkg/__init__.py \
+<programlisting>file path=usr/lib/python2.7/vendor-packages/pkg/__init__.pyc ...
+file path=usr/lib/python2.7/vendor-packages/pkg/__init__.py \
timestamp=20130311T221521Z ...</programlisting>
</listitem>
</varlistentry>
@@ -456,8 +456,8 @@
This attribute is required if <literal>mediator</literal> is specified and <literal>
mediator-implementation</literal> is not. A local system administrator can
set the version to use explicitly. The value specified should generally match
-the version of the package delivering the link (for example, <literal>runtime/python-26
-</literal> should use <literal>mediator-version=2.6</literal>), although this
+the version of the package delivering the link (for example, <literal>runtime/python-27
+</literal> should use <literal>mediator-version=2.7</literal>), although this
is not required.</para>
</listitem>
</varlistentry>
--- a/src/man/pkgdepend.1 Thu Mar 12 11:17:36 2015 -0700
+++ b/src/man/pkgdepend.1 Tue Mar 17 18:19:09 2015 -0700
@@ -7,11 +7,11 @@
<refentry id="pkgdepend-1">
<refmeta><refentrytitle>pkgdepend</refentrytitle><manvolnum>1</manvolnum>
-<refmiscinfo class="date">12 Jul 2013</refmiscinfo>
+<refmiscinfo class="date">28 Jan 2015</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&release;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
-<refmiscinfo class="copyright">Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.</refmiscinfo>
+<refmiscinfo class="copyright">Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.</refmiscinfo>
</refmeta>
<refnamediv>
<refname>pkgdepend</refname><refpurpose>Image Packaging System dependency analyzer</refpurpose></refnamediv>
@@ -281,7 +281,7 @@
for a given Python script, and bypass dependency generation against all Python
modules called <literal>test</literal> for a file delivered as <filename>opt/python/foo/file.py
</filename>.</para>
-<para>Avoid generating dependencies against any file delivered in <filename>usr/lib/python2.6/vendor-packages/xdg
+<para>Avoid generating dependencies against any file delivered in <filename>usr/lib/python2.7/vendor-packages/xdg
</filename>.</para>
<screen>$ <userinput>cat manifest.py</userinput>
set name=pkg.fmri value=pkg:/[email protected],1.0
@@ -298,7 +298,7 @@
pkg.depend.bypass-generate=.*/test.py.* \
pkg.depend.bypass-generate=.*/testmodule.so \
pkg.depend.bypass-generate=.*/test.so \
- pkg.depend.bypass-generate=usr/lib/python2.6/vendor-packages/xdg/.* \
+ pkg.depend.bypass-generate=usr/lib/python2.7/vendor-packages/xdg/.* \
pkg.depend.runpath=$PKGDEPEND_RUNPATH:/opt/python
$ <userinput>pkgdepend generate -d proto manifest.py</userinput></screen>
--- a/src/man/zh_CN/pkg.5 Thu Mar 12 11:17:36 2015 -0700
+++ b/src/man/zh_CN/pkg.5 Tue Mar 17 18:19:09 2015 -0700
@@ -158,8 +158,8 @@
<varlistentry><term><literal>timestamp</literal></term>
<listitem><para>此属性用于设置文件的访问权限和修改时间。必须以 ISO-8601 格式使用 UTC 表示 <literal>timestamp</literal> 属性值,省略冒号和连字符。</para>
<para>为 Python 打包 <filename> .pyc</filename> 或 <filename>.pyo</filename> 文件时需要 <literal>timestamp</literal> 属性。<filename>.pyc</filename> 或 <filename>.pyo</filename> 文件的相关 <filename> .py</filename> 文件必须使用这些文件内嵌入的时间戳进行标记,如以下示例中所示:</para>
-<programlisting>file path=usr/lib/python2.6/vendor-packages/pkg/__init__.pyc ...
-file path=usr/lib/python2.6/vendor-packages/pkg/__init__.py \
+<programlisting>file path=usr/lib/python2.7/vendor-packages/pkg/__init__.pyc ...
+file path=usr/lib/python2.7/vendor-packages/pkg/__init__.py \
timestamp=20130311T221521Z ...</programlisting>
</listitem>
</varlistentry>
@@ -212,7 +212,7 @@
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-version</literal></term>
-<listitem><para>指定 <literal>mediator</literal> 属性描述的接口的版本(表示为非负整数的点分序列)。如果指定了 <literal>mediator</literal> 而未指定 <literal>mediator-implementation</literal>,则此属性是必需的。本地系统管理员可以显式设置要使用的版本。指定的值通常应与提供链接的软件包版本相匹配(例如,<literal>runtime/python-26</literal> 应使用 <literal>mediator-version=2.6</literal>),尽管这不是必需的。</para>
+<listitem><para>指定 <literal>mediator</literal> 属性描述的接口的版本(表示为非负整数的点分序列)。如果指定了 <literal>mediator</literal> 而未指定 <literal>mediator-implementation</literal>,则此属性是必需的。本地系统管理员可以显式设置要使用的版本。指定的值通常应与提供链接的软件包版本相匹配(例如,<literal>runtime/python-27</literal> 应使用 <literal>mediator-version=2.7</literal>),尽管这不是必需的。</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>mediator-implementation</literal></term>
--- a/src/man/zh_CN/pkgdepend.1 Thu Mar 12 11:17:36 2015 -0700
+++ b/src/man/zh_CN/pkgdepend.1 Tue Mar 17 18:19:09 2015 -0700
@@ -179,7 +179,7 @@
</example>
<example><title>绕过依赖项生成</title>
<para>将 <filename>opt/python</filename> 附加到给定 Python 脚本的标准 Python 运行路径,然后根据名称为 <literal>test</literal> 的所有 Python 模块绕过作为 <filename>opt/python/foo/file.py </filename> 提供的文件的依赖项生成。</para>
-<para>避免针对 <filename>usr/lib/python2.6/vendor-packages/xdg </filename> 中提供的任何文件生成依赖项。</para>
+<para>避免针对 <filename>usr/lib/python2.7/vendor-packages/xdg </filename> 中提供的任何文件生成依赖项。</para>
<screen>$ <userinput>cat manifest.py</userinput>
set name=pkg.fmri value=pkg:/[email protected],1.0
set name=pkg.summary value="My test package"
@@ -195,7 +195,7 @@
pkg.depend.bypass-generate=.*/test.py.* \
pkg.depend.bypass-generate=.*/testmodule.so \
pkg.depend.bypass-generate=.*/test.so \
- pkg.depend.bypass-generate=usr/lib/python2.6/vendor-packages/xdg/.* \
+ pkg.depend.bypass-generate=usr/lib/python2.7/vendor-packages/xdg/.* \
pkg.depend.runpath=$PKGDEPEND_RUNPATH:/opt/python
$ <userinput>pkgdepend generate -d proto manifest.py</userinput></screen>
--- a/src/modules/actions/signature.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/actions/signature.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python
#
# CDDL HEADER START
#
--- a/src/modules/client/sigpolicy.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/client/sigpolicy.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python
#
# CDDL HEADER START
#
@@ -21,7 +21,7 @@
#
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
import pkg.client.api_errors as apx
--- a/src/modules/depotcontroller.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/depotcontroller.py Tue Mar 17 18:19:09 2015 -0700
@@ -27,6 +27,7 @@
import os
import pkg.pkgsubprocess as subprocess
import pkg.server.repository as sr
+import ssl
import sys
import signal
import time
@@ -280,7 +281,10 @@
try:
repourl = urlparse.urljoin(self.get_depot_url(),
"versions/0")
- url = urllib2.urlopen(repourl)
+ # Disable SSL peer verification, we just want to check
+ # if the depot is running.
+ url = urllib2.urlopen(repourl,
+ context=ssl._create_unverified_context())
url.close()
except urllib2.HTTPError as e:
# Server returns NOT_MODIFIED if catalog is up
--- a/src/modules/digest.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/digest.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/modules/flavor/python.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/flavor/python.py Tue Mar 17 18:19:09 2015 -0700
@@ -50,9 +50,9 @@
class PythonMismatchedVersion(base.DependencyAnalysisError):
"""Exception that is raised when a module is installed into a path
- associated with a known version of python (/usr/lib/python2.4 for
+ associated with a known version of python (/usr/lib/python2.7 for
example) but has a different version of python specified in its
- #! line (#!/usr/bin/python2.5 for example)."""
+ #! line (#!/usr/bin/python3.4 for example)."""
def __init__(self, installed_version, declared_version, local_file,
installed_path):
--- a/src/modules/lint/base.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/lint/base.py Tue Mar 17 18:19:09 2015 -0700
@@ -101,7 +101,11 @@
# any keyword args, in order.
return "{0}{1}".format(name, arg_spec.defaults[c - i])
- excl = self.config.get("pkglint", "pkglint.exclude").split()
+ excl = self.config.get("pkglint", "pkglint.exclude")
+ if excl is None:
+ excl = ""
+ else:
+ excl = excl.split()
for item in inspect.getmembers(self, inspect.ismethod):
method = item[1]
# register the methods in the object that correspond
@@ -297,7 +301,11 @@
checkers = []
excluded_checkers = []
- exclude = config.get("pkglint", "pkglint.exclude").split()
+ exclude = config.get("pkglint", "pkglint.exclude")
+ if exclude is None:
+ exclude = ""
+ else:
+ exclude = exclude.split()
for cl in inspect.getmembers(module, inspect.isclass):
myclass = cl[1]
if issubclass(myclass, Checker):
--- a/src/modules/lint/engine.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/lint/engine.py Tue Mar 17 18:19:09 2015 -0700
@@ -415,7 +415,11 @@
excl = []
try:
- excl = conf.get("pkglint", "pkglint.exclude").split()
+ excl = conf.get("pkglint", "pkglint.exclude")
+ if excl is None:
+ excl = ""
+ else:
+ excl = excl.split()
except ConfigParser.NoOptionError:
pass
--- a/src/modules/pipeutils.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/pipeutils.py Tue Mar 17 18:19:09 2015 -0700
@@ -36,7 +36,6 @@
pipe:
PipedHTTPResponse
PipedHTTPConnection
- PipedHTTP
The following classes are implemented to allow RPC servers operations
over a pipe:
@@ -180,13 +179,13 @@
"""Required to support select.select()."""
return self.__pipefd
- def readline(self):
+ def readline(self, *args):
"""Read one entire line from the pipe.
Can block waiting for input."""
if self.__readfh is not None:
# read from the fd that we received over the pipe
- data = self.__readfh.readline()
+ data = self.__readfh.readline(*args)
if data != "":
return data
# the fd we received over the pipe is empty
@@ -198,7 +197,7 @@
return ""
self.__readfh = os.fdopen(fd)
# return data from the received fd
- return self.readline()
+ return self.readline(*args)
def read(self, size=-1):
"""Read at most size bytes from the pipe.
@@ -329,6 +328,10 @@
# Unused argument; pylint: disable=W0613
return
+ def setsockopt(self, *args):
+ """set socket opt."""
+ pass
+
class PipedHTTPResponse(httplib.HTTPResponse):
"""Create a httplib.HTTPResponse like object that can be used with
@@ -379,25 +382,6 @@
return self.sock.fileno()
-class PipedHTTP(httplib.HTTP):
- """Create httplib.HTTP like object that can be used with
- a pipe as a transport. We override the minimum number of parent
- routines necessary.
-
- xmlrpclib uses the legacy httplib.HTTP class interfaces (instead of
- the newer class httplib.HTTPConnection interfaces), so we need to
- provide a "Piped" compatibility class that wraps the httplib.HTTP
- compatibility class."""
-
- _connection_class = PipedHTTPConnection
-
- @property
- def sock(self):
- """Return the "socket" associated with this HTTP pipe
- connection."""
- return self._conn.sock
-
-
class _PipedTransport(rpc.Transport):
"""Create a Transport object which can create new PipedHTTP
connections via an existing pipe."""
@@ -407,6 +391,7 @@
self.__http_enc = http_enc
rpc.Transport.__init__(self)
self.verbose = False
+ self._extra_headers = None
def __del__(self):
# make sure the destructor gets called for our connection
@@ -422,8 +407,8 @@
"""Create a new PipedHTTP connection to the server. This
involves creating a new pipe, and sending one end of the pipe
to the server, and then wrapping the local end of the pipe
- with a PipedHTTP object. This object can then be subsequently
- used to issue http requests."""
+ with a PipedHTTPConnection object. This object can then be
+ subsequently used to issue http requests."""
# Redefining name from outer scope; pylint: disable=W0621
assert self.__pipe_file is not None
@@ -434,8 +419,8 @@
if self.__http_enc:
# we're using http encapsulation so return a
- # PipedHTTP connection object
- return PipedHTTP(client_pipefd)
+ # PipedHTTPConnection object
+ return PipedHTTPConnection(client_pipefd)
# we're not using http encapsulation so return a
# PipeSocket object
--- a/src/modules/pkgsubprocess.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/modules/pkgsubprocess.py Tue Mar 17 18:19:09 2015 -0700
@@ -37,7 +37,6 @@
pass
__all__ = ["Popen", "PIPE", "STDOUT", "call"]
-py_version = '.'.join(platform.python_version_tuple()[:2])
def call(*args, **kwargs):
return Popen(*args, **kwargs).wait()
@@ -53,10 +52,10 @@
if "posix_spawnp" in globals():
- def __execute(self, args, executable, preexec_fn,
+ def _execute_child(self, args, executable, preexec_fn,
close_fds, cwd, env, universal_newlines, startupinfo,
- creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite,
- errread, errwrite, to_close=None):
+ creationflags, shell, to_close, p2cread, p2cwrite, c2pread,
+ c2pwrite, errread, errwrite):
"""Execute program using posix spawn"""
if isinstance(args, types.StringTypes):
@@ -180,24 +179,3 @@
if errwrite and errread:
_close_in_parent(errwrite)
- if py_version == '2.6':
- def _execute_child(self, args, executable, preexec_fn,
- close_fds, cwd, env, universal_newlines, startupinfo,
- creationflags, shell, p2cread, p2cwrite, c2pread,
- c2pwrite, errread, errwrite):
- self.__execute(args, executable, preexec_fn,
- close_fds, cwd, env, universal_newlines,
- startupinfo, creationflags, shell, p2cread,
- p2cwrite, c2pread, c2pwrite, errread, errwrite)
-
- elif py_version == '2.7':
- def _execute_child(self, args, executable, preexec_fn,
- close_fds, cwd, env, universal_newlines, startupinfo,
- creationflags, shell, to_close, p2cread, p2cwrite,
- c2pread, c2pwrite, errread, errwrite):
- self.__execute(args, executable, preexec_fn,
- close_fds, cwd, env, universal_newlines,
- startupinfo, creationflags, shell, p2cread,
- p2cwrite, c2pread, c2pwrite, errread,
- errwrite, to_close=to_close)
-
--- a/src/pkg/Makefile Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/Makefile Tue Mar 17 18:19:09 2015 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
PKGVERS_COMPONENT = 5.12
@@ -66,7 +66,7 @@
$(PUBLISHALL)MANIFESTS = $(ALL_MANIFESTS)
PKGCMDENV = \
PATH=$(PKGROOT)/usr/bin:/usr/sbin:/usr/bin \
- PYTHONPATH=$(PKGROOT)/usr/lib/python2.6/vendor-packages
+ PYTHONPATH=$(PKGROOT)/usr/lib/python2.7/vendor-packages
PKG = $(PKGCMDENV) pkg
PKGDEPEND = $(PKGCMDENV) pkgdepend
PKGFMT = $(PKGCMDENV) pkgfmt
@@ -99,8 +99,8 @@
PKGVERS_BRANCH=$(PKGVERS_BRANCH) \
PKGVERS=$(PKGVERS) \
REV=$(REV) \
- PYDIR=usr/lib/python2.6 \
- PYDIRVP=usr/lib/python2.6/vendor-packages \
+ PYDIR=usr/lib/python2.7 \
+ PYDIRVP=usr/lib/python2.7/vendor-packages \
CHANGESET=$(CHANGESET) \
PKGPUBLISHER_LOCALIZABLE=$(PKGPUBLISHER_LOCALIZABLE)
PKGMOG_DEFINES = $(PKGMOG_DEFVALS:%=-D %)
--- a/src/pkg/external_deps.txt Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/external_deps.txt Tue Mar 17 18:19:09 2015 -0700
@@ -9,31 +9,20 @@
pkg:/developer/gnome/gnome-doc-utils
pkg:/developer/python/pylint
pkg:/developer/versioning/mercurial
- pkg:/library/python-2/cherrypy-26
- pkg:/library/python-2/coverage-26
- pkg:/library/python-2/jsonrpclib-26
- pkg:/library/python-2/locale-services
- pkg:/library/python-2/m2crypto-26
- pkg:/library/python-2/mako-26
- pkg:/library/python-2/ply-26
- pkg:/library/python-2/pybonjour-26
- pkg:/library/python-2/pycurl-26
- pkg:/library/python-2/pyopenssl-26
- pkg:/library/python-2/simplejson-26
- pkg:/library/python/cherrypy-26
- pkg:/library/python/coverage-26
- pkg:/library/python/jsonrpclib-26
+ pkg:/library/python/cherrypy-27
+ pkg:/library/python/coverage-27
+ pkg:/library/python/jsonrpclib-27
pkg:/library/python/locale-services
- pkg:/library/python/m2crypto-26
- pkg:/library/python/mako-26
- pkg:/library/python/ply-26
- pkg:/library/python/pybonjour-26
- pkg:/library/python/pycurl-26
- pkg:/library/python/pyopenssl-26
- pkg:/library/python/simplejson-26
+ pkg:/library/python/m2crypto-27
+ pkg:/library/python/mako-27
+ pkg:/library/python/ply-27
+ pkg:/library/python/pybonjour-27
+ pkg:/library/python/pycurl-27
+ pkg:/library/python/pyopenssl-27
+ pkg:/library/python/simplejson-27
pkg:/package/svr4
- pkg:/runtime/python-26
pkg:/runtime/python-27
+ pkg:/runtime/python-34
pkg:/service/network/dns/mdns
pkg:/shell/ksh
pkg:/shell/ksh93
@@ -51,5 +40,5 @@
pkg:/text/locale
pkg:/text/tidy
pkg:/web/server/apache-22
- pkg:/web/server/apache-22/module/apache-wsgi-26
+ pkg:/web/server/apache-22/module/apache-wsgi-27
pkg:/web/wget
--- a/src/pkg/manifests/developer:opensolaris:pkg5.p5m Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/manifests/developer:opensolaris:pkg5.p5m Tue Mar 17 18:19:09 2015 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri value=pkg:/developer/opensolaris/pkg5@$(PKGVERS)
@@ -36,12 +36,12 @@
depend type=require fmri=pkg:/developer/gnome/gnome-doc-utils
depend type=require fmri=pkg:/developer/python/pylint
depend type=require fmri=pkg:/developer/versioning/mercurial
-depend type=require fmri=pkg:/library/python-2/coverage-26
-depend type=require fmri=pkg:/library/python-2/jsonrpclib-26
-depend type=require fmri=pkg:/library/python-2/locale-services
+depend type=require fmri=pkg:/library/python/coverage-27
+depend type=require fmri=pkg:/library/python/jsonrpclib-27
+depend type=require fmri=pkg:/library/python/locale-services
depend type=require fmri=pkg:/package/svr4
-depend type=require fmri=pkg:/runtime/python-26
depend type=require fmri=pkg:/runtime/python-27
+depend type=require fmri=pkg:/runtime/python-34
depend type=require fmri=pkg:/system/header
depend type=require fmri=pkg:/system/linker
depend type=require fmri=pkg:/system/locale/extra
@@ -50,4 +50,4 @@
depend type=require fmri=pkg:/text/locale
depend type=require fmri=pkg:/text/tidy
depend type=require fmri=pkg:/web/server/apache-22
-depend type=require fmri=pkg:/web/server/apache-22/module/apache-wsgi-26
+depend type=require fmri=pkg:/web/server/apache-22/module/apache-wsgi-27
--- a/src/pkg/manifests/package:pkg.p5m Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/manifests/package:pkg.p5m Tue Mar 17 18:19:09 2015 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri value=pkg:/package/pkg@$(PKGVERS)
@@ -31,7 +31,7 @@
dir path=$(PYDIR)
dir path=$(PYDIRVP)
dir path=$(PYDIRVP)/pkg
-file path=$(PYDIRVP)/pkg-0.1-py2.6.egg-info
+file path=$(PYDIRVP)/pkg-0.1-py2.7.egg-info
dir path=$(PYDIRVP)/pkg/64
file path=$(PYDIRVP)/pkg/64/_varcet.so
file path=$(PYDIRVP)/pkg/64/sha512_t.so
--- a/src/pkg/manifests/package:pkg:depot.p5m Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/manifests/package:pkg:depot.p5m Tue Mar 17 18:19:09 2015 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri value=pkg:/package/pkg/depot@$(PKGVERS)
@@ -67,4 +67,4 @@
#
depend type=require fmri=web/server/apache-22
# p5p support in the system repository requires mod_wsgi
-depend type=require fmri=web/server/apache-22/module/apache-wsgi-26
+depend type=require fmri=web/server/apache-22/module/apache-wsgi-27
--- a/src/pkg/manifests/package:pkg:system-repository.p5m Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/manifests/package:pkg:system-repository.p5m Tue Mar 17 18:19:09 2015 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri value=pkg:/package/pkg/system-repository@$(PKGVERS)
@@ -67,4 +67,4 @@
#
depend type=require fmri=web/server/apache-22
# p5p support in the system repository requires mod_wsgi
-depend type=require fmri=web/server/apache-22/module/apache-wsgi-26
+depend type=require fmri=web/server/apache-22/module/apache-wsgi-27
--- a/src/pkg/transforms/defaults Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkg/transforms/defaults Tue Mar 17 18:19:09 2015 -0700
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Set some specific permissions
@@ -106,12 +106,13 @@
set name=org.opensolaris.consolidation value=ips
set name=variant.opensolaris.zone value=global value=nonglobal
-# Generate a python 2.7 dir/file action for each python 2.6 dir/file action
+# XXX Uncomment it when we need to deliver python 3.4 version of modules.
+# Generate a python 3.4 dir/file action for each python 2.7 dir/file action
# it ran across.
-<transform file dir link hardlink path=(.*)python2.6(.*) -> emit %(action.name) path=%<1>python2.7%<2>>
+# <transform file dir link hardlink path=(.*)python2.7(.*) -> emit %(action.name) path=%<1>python3.4%<2>>
# Do the version substitution on the .egg-info file.
-<transform file path=.*python2.7.*py2.6.egg-info -> edit path py2.6 py2.7>
-# Avoid generating dependencies against any 2.7 file.
-<transform file path=.*python2.7 -> default pkg.depend.bypass-generate .*>
+# <transform file path=.*python3.4.*py2.7.egg-info -> edit path py2.7 py3.4>
+# Avoid generating dependencies against any 3.4 file.
+# <transform file path=.*python3.4 -> default pkg.depend.bypass-generate .*>
# vim: ft=pkg5manifest
--- a/src/pkgdep.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkgdep.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/pkgrepo.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pkgrepo.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/publish.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/publish.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/pull.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pull.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/pydates Thu Mar 12 11:17:36 2015 -0700
+++ b/src/pydates Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
@@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# Create a dictionary (timestamps) mapping paths of python files in the modules
--- a/src/scripts/pkg.bat Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkg.bat Tue Mar 17 18:19:09 2015 -0700
@@ -19,15 +19,14 @@
rem
rem CDDL HEADER END
rem
-rem Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-rem Use is subject to license terms.
+rem Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
rem
setlocal
set CMDSCRIPT=client.py
set MY_HOME=%~dp0
set MY_IPS_BASE=%MY_HOME%\..\..
-set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.6\vendor-packages
+set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.7\vendor-packages
set MY_BASE=%MY_HOME%\..\..\..
set PATH=%MY_BASE%\python;%PATH%
set PYTHONUNBUFFERED=yes
--- a/src/scripts/pkg.depotd.bat Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkg.depotd.bat Tue Mar 17 18:19:09 2015 -0700
@@ -19,15 +19,14 @@
rem
rem CDDL HEADER END
rem
-rem Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-rem Use is subject to license terms.
+rem Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
rem
setlocal
set CMDSCRIPT=depot.py
set MY_HOME=%~dp0
set MY_IPS_BASE=%MY_HOME%\..\..
-set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.6\vendor-packages
+set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.7\vendor-packages
set MY_BASE=%MY_HOME%\..\..\..
set PATH=%MY_BASE%\python;%PATH%
set PYTHONUNBUFFERED=yes
--- a/src/scripts/pkg.depotd.sh Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkg.depotd.sh Tue Mar 17 18:19:09 2015 -0700
@@ -19,8 +19,8 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+#
# Resolve a symbolic link to the true file location
resolve_symlink () {
@@ -55,12 +55,12 @@
my_ips_base=`cd ${my_home}/../..; pwd`
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${my_ips_base}/usr/lib:/usr/sfw/lib
PYTHONHOME=${my_base}/python
-PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.6/vendor-packages
+PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.7/vendor-packages
PKG_REPO=${my_base}/var/pkg/repo
PKG_HOME=${my_ips_base}/usr
export LD_LIBRARY_PATH PYTHONHOME PYTHONPATH PKG_REPO PKG_HOME
-if [ -x ${my_base}/python/bin/python2.6 ] ; then
- PYEXE=${my_base}/python/bin/python2.6
+if [ -x ${my_base}/python/bin/python2.7 ] ; then
+ PYEXE=${my_base}/python/bin/python2.7
else
PYEXE=`which python`
unset PYTHONHOME
--- a/src/scripts/pkg.sh Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkg.sh Tue Mar 17 18:19:09 2015 -0700
@@ -19,8 +19,8 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+#
# Resolve a symbolic link to the true file location
resolve_symlink () {
@@ -55,11 +55,11 @@
my_ips_base=`cd ${my_home}/../..; pwd`
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${my_ips_base}/usr/lib
PYTHONHOME=${my_base}/python
-PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.6/vendor-packages
+PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.7/vendor-packages
PKG_HOME=${my_ips_base}/usr
export LD_LIBRARY_PATH PYTHONHOME PYTHONPATH PKG_HOME
-if [ -x ${my_base}/python/bin/python2.6 ] ; then
- PYEXE=${my_base}/python/bin/python2.6
+if [ -x ${my_base}/python/bin/python2.7 ] ; then
+ PYEXE=${my_base}/python/bin/python2.7
else
PYEXE=`which python`
unset PYTHONHOME
--- a/src/scripts/pkgrecv.bat Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkgrecv.bat Tue Mar 17 18:19:09 2015 -0700
@@ -19,15 +19,14 @@
rem
rem CDDL HEADER END
rem
-rem Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-rem Use is subject to license terms.
+rem Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
rem
setlocal
set CMDSCRIPT=pull.py
set MY_HOME=%~dp0
set MY_IPS_BASE=%MY_HOME%\..\..
-set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.6\vendor-packages
+set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.7\vendor-packages
set MY_BASE=%MY_HOME%\..\..\..
set PATH=%MY_BASE%\python;%PATH%
set PYTHONUNBUFFERED=yes
--- a/src/scripts/pkgrecv.sh Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkgrecv.sh Tue Mar 17 18:19:09 2015 -0700
@@ -19,8 +19,8 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+#
# Resolve a symbolic link to the true file location
resolve_symlink () {
@@ -55,11 +55,11 @@
my_ips_base=`cd ${my_home}/../..; pwd`
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${my_ips_base}/usr/lib
PYTHONHOME=${my_base}/python
-PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.6/vendor-packages
+PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.7/vendor-packages
PKG_HOME=${my_ips_base}/usr
export LD_LIBRARY_PATH PYTHONHOME PYTHONPATH PKG_HOME
-if [ -x ${my_base}/python/bin/python2.6 ] ; then
- PYEXE=${my_base}/python/bin/python2.6
+if [ -x ${my_base}/python/bin/python2.7 ] ; then
+ PYEXE=${my_base}/python/bin/python2.7
else
PYEXE=`which python`
unset PYTHONHOME
--- a/src/scripts/pkgsend.bat Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkgsend.bat Tue Mar 17 18:19:09 2015 -0700
@@ -19,15 +19,14 @@
rem
rem CDDL HEADER END
rem
-rem Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-rem Use is subject to license terms.
+rem Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
rem
setlocal
set CMDSCRIPT=publish.py
set MY_HOME=%~dp0
set MY_IPS_BASE=%MY_HOME%\..\..
-set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.6\vendor-packages
+set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.7\vendor-packages
set MY_BASE=%MY_HOME%\..\..\..
set PATH=%MY_BASE%\python;%PATH%
set PYTHONUNBUFFERED=yes
--- a/src/scripts/pkgsend.sh Thu Mar 12 11:17:36 2015 -0700
+++ b/src/scripts/pkgsend.sh Tue Mar 17 18:19:09 2015 -0700
@@ -19,8 +19,8 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+#
# Resolve a symbolic link to the true file location
resolve_symlink () {
@@ -55,11 +55,11 @@
my_ips_base=`cd ${my_home}/../..; pwd`
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${my_ips_base}/usr/lib
PYTHONHOME=${my_base}/python
-PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.6/vendor-packages
+PYTHONPATH=${PYTHONPATH}:${my_ips_base}/usr/lib/python2.7/vendor-packages
PKG_HOME=${my_ips_base}/usr
export LD_LIBRARY_PATH PYTHONHOME PYTHONPATH PKG_HOME
-if [ -x ${my_base}/python/bin/python2.6 ] ; then
- PYEXE=${my_base}/python/bin/python2.6
+if [ -x ${my_base}/python/bin/python2.7 ] ; then
+ PYEXE=${my_base}/python/bin/python2.7
else
PYEXE=`which python`
unset PYTHONHOME
--- a/src/setup.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/setup.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
@@ -103,7 +103,7 @@
# Extract Python minor version.
py_version = '.'.join(platform.python_version_tuple()[:2])
-assert py_version in ('2.6', '2.7')
+assert py_version in ('2.7', '3.4')
py_install_dir = 'usr/lib/python' + py_version + '/vendor-packages'
scripts_dir = 'usr/bin'
@@ -705,9 +705,11 @@
else:
file_util.copy_file(src, dest, update=1)
- # Don't install the scripts for python 2.7.
- if py_version == '2.7':
- return
+ # XXX Uncomment it when we need to deliver python 3.4 version
+ # of modules.
+ # Don't install the scripts for python 3.4. Uncomment it when
+ # if py_version == '3.4':
+ # return
for d, files in scripts[osname].iteritems():
for (srcname, dstname) in files:
dst_dir = util.change_root(self.root_dir, d)
@@ -798,7 +800,7 @@
stderr.close()
print("install failed and returned {0:d}.".format(ret),
file=sys.stderr)
- print("Command was: {0}".fromat(" ".join(args)),
+ print("Command was: {0}".format(" ".join(args)),
file=sys.stderr)
sys.exit(1)
@@ -872,7 +874,7 @@
print("--------", file=sys.stderr)
for fn in missing:
print("{0}".format(fn.strip()), file=sys.stderr)
- print("--------", file=sys.stderr)
+ print("--------", file=sys.stderr)
missing.close()
print("""\
Please evaluate whether any of the above file(s) needs localization.
--- a/src/sign.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/sign.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/svc/svc-pkg-mdns Thu Mar 12 11:17:36 2015 -0700
+++ b/src/svc/svc-pkg-mdns Tue Mar 17 18:19:09 2015 -0700
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Load SMF constants and functions
@@ -51,7 +51,7 @@
# adjust the PYTHONPATH to point to the current environment
# we need to make sure to adjust the PYTHONPATH accordingly
- # to a Python 2.4 or 2.6 environment
+ # to a Python 2.7 or 3.4 environment
python_ver=$(head -1 ${pkg_root}usr/lib/pkg.depotd 2>/dev/null |
awk -F/ '{print $NF}')
if [[ $python_ver != *python* ]]; then
--- a/src/svc/svc-pkg-server Thu Mar 12 11:17:36 2015 -0700
+++ b/src/svc/svc-pkg-server Tue Mar 17 18:19:09 2015 -0700
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Load SMF constants and functions
@@ -64,7 +64,7 @@
# adjust the PYTHONPATH to point to the current environment
# we need to make sure to adjust the PYTHONPATH accordingly
- # to a Python 2.4 or 2.6 environment
+ # to a Python 2.7 or 3.4 environment
python_ver=$(head -1 ${pkg_root}usr/lib/pkg.depotd 2>/dev/null |
awk -F/ '{print $NF}')
if [[ $python_ver != *python* ]]; then
--- a/src/sysrepo.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/sysrepo.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/api/t_api_search.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/api/t_api_search.py Tue Mar 17 18:19:09 2015 -0700
@@ -50,7 +50,7 @@
open [email protected],5.11-0
add dir mode=0755 owner=root group=bin path=/bin
add dir mode=0755 owner=root group=bin path=/bin/example_dir
- add dir mode=0755 owner=root group=bin path=/usr/lib/python2.6/vendor-packages/OpenSSL
+ add dir mode=0755 owner=root group=bin path=/usr/lib/python2.7/vendor-packages/OpenSSL
add file tmp/example_file mode=0555 owner=root group=bin path=/bin/example_path
add link path=/bin/exlink target=/bin/example_path mediator=example mediator-version=7.0 mediator-implementation=unladen-swallow
add set name=com.sun.service.incorporated_changes value="6556919 6627937"
@@ -179,7 +179,7 @@
])
res_remote_openssl = set([
- ("pkg:/[email protected]", "basename", "dir group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/OpenSSL")
+ ("pkg:/[email protected]", "basename", "dir group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/OpenSSL")
])
res_remote_bug_id = set([
--- a/src/tests/api/t_client.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/api/t_client.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
#
# CDDL HEADER START
@@ -21,8 +21,8 @@
# CDDL HEADER END
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+#
import testutils
if __name__ == "__main__":
--- a/src/tests/api/t_dependencies.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/api/t_dependencies.py Tue Mar 17 18:19:09 2015 -0700
@@ -54,22 +54,22 @@
"authlog_path": "var/log/authlog",
"curses_path": "usr/xpg4/lib/libcurses.so.1",
"indexer_path":
- "usr/lib/python2.6/vendor-packages/pkg_test/client/indexer.py",
+ "usr/lib/python2.7/vendor-packages/pkg_test/client/indexer.py",
"ksh_path": "usr/bin/ksh",
"libc_path": "lib/libc.so.1",
"pkg_path":
- "usr/lib/python2.6/vendor-packages/pkg_test/client/__init__.py",
+ "usr/lib/python2.7/vendor-packages/pkg_test/client/__init__.py",
"bypass_path": "pkgdep_test/file.py",
"relative_dependee":
- "usr/lib/python2.6/vendor-packages/pkg_test/client/bar.py",
+ "usr/lib/python2.7/vendor-packages/pkg_test/client/bar.py",
"relative_depender":
- "usr/lib/python2.6/vendor-packages/pkg_test/client/foo.py",
+ "usr/lib/python2.7/vendor-packages/pkg_test/client/foo.py",
"runpath_mod_path": "opt/pkgdep_runpath/__init__.py",
"runpath_mod_test_path": "opt/pkgdep_runpath/pdtest.py",
"script_path": "lib/svc/method/svc-pkg-depot",
"syslog_path": "var/log/syslog",
- "py_mod_path": "usr/lib/python2.6/vendor-packages/cProfile.py",
- "py_mod_path27": "usr/lib/python2.7/vendor-packages/cProfile.py"
+ "py_mod_path": "usr/lib/python2.7/vendor-packages/cProfile.py",
+ "py_mod_path34": "usr/lib/python3.4/vendor-packages/cProfile.py"
}
smf_paths = {
@@ -137,7 +137,7 @@
python_mod_manf = """ \
file NOHASH group=bin mode=0755 owner=root path={py_mod_path}
-file NOHASH group=bin mode=0755 owner=root path={py_mod_path27}
+file NOHASH group=bin mode=0755 owner=root path={py_mod_path34}
""".format(**paths)
relative_ext_depender_manf = """ \
@@ -972,7 +972,7 @@
# the following scripts and manifests are used to test pkgdepend
# runpath and bypass
python_bypass_text = """\
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
# This python script has an import used to test pkgdepend runpath and bypass
# functionality. pdtest is installed in a non-standard location and generates
# dependencies on multiple files (pdtest.py, pdtest.pyc, pdtest.pyo, etc.)
@@ -1017,7 +1017,7 @@
python_bypass_manf = """
file NOHASH group=sys mode=0755 owner=root path={bypass_path} \
pkg.depend.bypass-generate=opt/pkgdep_runpath/pdtest.py \
- pkg.depend.bypass-generate=usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtestmodule.so \
+ pkg.depend.bypass-generate=usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtestmodule.so \
pkg.depend.runpath=opt:$PKGDEPEND_RUNPATH
file NOHASH group=sys mode=0755 owner=root path={runpath_mod_path}
file NOHASH group=sys mode=0755 owner=root path={runpath_mod_test_path}
@@ -1093,8 +1093,8 @@
python_wildcard_combo_bypass_manf = """
file NOHASH group=sys mode=0755 owner=root path={bypass_path} \
pkg.depend.bypass-generate=pdtest.py \
- pkg.depend.bypass-generate=usr/lib/python2.6/vendor-packages/.* \
- pkg.depend.bypass-generate=usr/lib/python2.6/site-packages/pkgdep_runpath/pdtestmodule.so \
+ pkg.depend.bypass-generate=usr/lib/python2.7/vendor-packages/.* \
+ pkg.depend.bypass-generate=usr/lib/python2.7/site-packages/pkgdep_runpath/pdtestmodule.so \
pkg.depend.runpath=$PKGDEPEND_RUNPATH:opt
file NOHASH group=sys mode=0755 owner=root path={runpath_mod_path}
file NOHASH group=sys mode=0755 owner=root path={runpath_mod_test_path}
@@ -1126,9 +1126,9 @@
self.make_proto_text_file(self.paths["bypass_path"],
self.python_bypass_text)
self.make_proto_text_file(self.paths["runpath_mod_path"],
- "#!/usr/bin/python2.6")
+ "#!/usr/bin/python2.7")
self.make_proto_text_file(self.paths["runpath_mod_test_path"],
- "#!/usr/bin/python2.6")
+ "#!/usr/bin/python2.7")
def make_broken_python_test_file(self, py_version):
pdir = "usr/lib/python{0}/vendor-packages".format(py_version)
@@ -1411,7 +1411,7 @@
[str(s) for s in sorted(expected_deps)]))
self.__debug = True
t_path = self.make_manifest(self.ext_python_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
self.make_proto_text_file(self.paths["indexer_path"],
self.python_text)
_check_all_res(dependencies.list_implicit_deps(t_path,
@@ -1465,7 +1465,7 @@
[str(s) for s in sorted(expected_deps)]))
self.__debug = True
t_path = self.make_manifest(self.ext_python_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
# Check that absolute imports still work.
self.make_proto_text_file(self.paths["indexer_path"],
self.python_abs_text)
@@ -1541,7 +1541,7 @@
[str(s) for s in sorted(expected_deps)]))
self.__debug = True
t_path = self.make_manifest(self.ext_python_pkg_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
self.make_proto_text_file(self.paths["pkg_path"],
self.python_text)
_check_all_res(dependencies.list_implicit_deps(t_path,
@@ -1556,8 +1556,8 @@
we try to import __main__"""
t_path = self.make_manifest(self.python_mod_manf)
+ self.make_python_test_files(3.4)
self.make_python_test_files(2.7)
- self.make_python_test_files(2.6)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], convert=False)
@@ -1571,7 +1571,7 @@
t_path = self.make_manifest(
self.relative_ext_depender_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], remove_internal_deps=True,
@@ -1645,8 +1645,8 @@
syntax error doesn't cause a traceback."""
t_path = self.make_manifest(self.python_mod_manf)
+ self.make_broken_python_test_file(3.4)
self.make_broken_python_test_file(2.7)
- self.make_broken_python_test_file(2.6)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], convert=False)
self.assert_(es != 2, "Unexpected errors reported: {0}".format(es))
@@ -1903,7 +1903,7 @@
str(elf.UnsupportedDynamicToken("/proto_path", "/install",
"run_path", "tok"))
str(py.PythonModuleMissingPath("foo", "bar"))
- str(py.PythonMismatchedVersion("2.7", "2.6", "foo", "bar"))
+ str(py.PythonMismatchedVersion("2.7", "3.4", "foo", "bar"))
str(py.PythonSubprocessError(2, "foo", "bar"))
str(py.PythonSubprocessBadLine("cmd", ["l1", "l2"]))
mi = dlmf.ModuleInfo("name", ["/d1", "/d2"])
@@ -2427,7 +2427,7 @@
"""Test basic functionality of runpaths."""
t_path = self.make_manifest(self.python_runpath_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], remove_internal_deps=False,
@@ -2439,7 +2439,7 @@
if "pdtest.py" in dep.attrs["pkg.debug.depend.file"]:
self.assert_("opt/pkgdep_runpath" in
dep.attrs["pkg.debug.depend.path"])
- self.assert_("usr/lib/python2.6/pkgdep_runpath"
+ self.assert_("usr/lib/python2.7/pkgdep_runpath"
in dep.attrs["pkg.debug.depend.path"])
# ensure this dependency was indeed generated
# as a result of our test file
@@ -2450,7 +2450,7 @@
def test_runpath_2(self):
"""Test invalid runpath attributes."""
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
# test a runpath with multiple values
t_path = self.make_manifest(self.python_invalid_runpath_manf)
@@ -2470,7 +2470,7 @@
"""Test setting an empty runpath attribute"""
t_path = self.make_manifest(self.python_empty_runpath_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], remove_internal_deps=False,
@@ -2567,21 +2567,21 @@
"""
# this manifest should result in multiple dependencies
t_path = self.make_manifest(self.python_bypass_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], remove_internal_deps=False,
convert=False)
self.assert_(self.verify_bypass(ds, es, [
"opt/pkgdep_runpath/pdtest.py",
- "usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtestmodule.so"]),
+ "usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtestmodule.so"]),
"Python script was not bypassed")
# now check we depend on some files which should not have been
# bypassed
self.assert_(self.verify_dep_generation(ds,
- ["usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtest.so",
- "usr/lib/python2.6/plat-sunos5/pkgdep_runpath/pdtest/__init__.py",
- "usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtest.py",
+ ["usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtest.so",
+ "usr/lib/python2.7/plat-sunos5/pkgdep_runpath/pdtest/__init__.py",
+ "usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtest.py",
"opt/pkgdep_runpath/pdtest.pyc"]))
# now run this again as a control, this time skipping bypass
@@ -2591,9 +2591,9 @@
# the first two items in the list were previously bypassed
self.assert_(self.verify_dep_generation(ds,
["opt/pkgdep_runpath/pdtest.py",
- "usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtestmodule.so",
- "usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtest.so",
- "usr/lib/python2.6/plat-sunos5/pkgdep_runpath/pdtest/__init__.py",
+ "usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtestmodule.so",
+ "usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtest.so",
+ "usr/lib/python2.7/plat-sunos5/pkgdep_runpath/pdtest/__init__.py",
"opt/pkgdep_runpath/pdtest.pyc"]),
"Python script did not generate a dependency on bypassed")
@@ -2630,7 +2630,7 @@
def test_bypass_2(self):
"""Ensure that bypasses containing wildcards work"""
t_path = self.make_manifest(self.python_wildcard_bypass_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], remove_internal_deps=False,
@@ -2651,12 +2651,12 @@
convert=False)
self.assert_(self.verify_bypass(ds, es, [
- "usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtest.pyo",
- "usr/lib/python2.6/lib-old/pkgdep_runpath/pdtestmodule.so"]),
+ "usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtest.pyo",
+ "usr/lib/python2.7/lib-old/pkgdep_runpath/pdtestmodule.so"]),
"Directory bypass wildcard failed")
self.assert_(self.verify_dep_generation(ds, [
- "usr/lib/python2.6/pkgdep_runpath/__init__.py",
- "usr/lib/python2.6/lib-old/pkgdep_runpath/__init__.py"]),
+ "usr/lib/python2.7/pkgdep_runpath/__init__.py",
+ "usr/lib/python2.7/lib-old/pkgdep_runpath/__init__.py"]),
"Failed to generate dependencies, despite dir-wildcards")
t_path = self.make_manifest(
@@ -2671,14 +2671,14 @@
"Failed to bypass some paths despite use of file-wildcard")
# we should still have dependencies on these
self.assert_(self.verify_dep_generation(ds, [
- "usr/lib/python2.6/lib-dynload/pkgdep_runpath/pdtest.pyo",
- "usr/lib/python2.6/lib-old/pkgdep_runpath/pdtestmodule.so"]),
+ "usr/lib/python2.7/lib-dynload/pkgdep_runpath/pdtest.pyo",
+ "usr/lib/python2.7/lib-old/pkgdep_runpath/pdtestmodule.so"]),
"Failed to generate dependencies, despite file-wildcards")
# finally, test a combination of the above, we have:
# pkg.depend.bypass-generate=.*/pdtest.py \
- # pkg.depend.bypass-generate=usr/lib/python2.6/vendor-packages/.* \
- # pkg.depend.bypass-generate=usr/lib/python2.6/site-packages/pkgdep_runpath/pdtestmodule.so
+ # pkg.depend.bypass-generate=usr/lib/python2.7/vendor-packages/.* \
+ # pkg.depend.bypass-generate=usr/lib/python2.7/site-packages/pkgdep_runpath/pdtestmodule.so
t_path = self.make_manifest(
self.python_wildcard_combo_bypass_manf)
@@ -2687,21 +2687,21 @@
convert=False)
self.assert_(self.verify_bypass(ds, es, [
"opt/pkgdep_runpath/pdtest.py",
- "usr/lib/python2.6/vendor-packages/pkgdep_runpath/pdtest.py"
- "usr/lib/python2.6/site-packages/pkgdep_runpath/pdtest.py",
- "usr/lib/python2.6/site-packages/pkgdep_runpath/pdtestmodule.so"]),
+ "usr/lib/python2.7/vendor-packages/pkgdep_runpath/pdtest.py"
+ "usr/lib/python2.7/site-packages/pkgdep_runpath/pdtest.py",
+ "usr/lib/python2.7/site-packages/pkgdep_runpath/pdtestmodule.so"]),
"Failed to bypass some paths despite use of combo-wildcard")
# we should still have dependencies on these
self.assert_(self.verify_dep_generation(ds, [
- "usr/lib/python2.6/site-packages/pkgdep_runpath/pdtest.pyc",
- "usr/lib/python2.6/lib-old/pkgdep_runpath/pdtestmodule.so"]),
+ "usr/lib/python2.7/site-packages/pkgdep_runpath/pdtest.pyc",
+ "usr/lib/python2.7/lib-old/pkgdep_runpath/pdtestmodule.so"]),
"Failed to generate dependencies, despite file-wildcards")
def test_bypass_3(self):
"""Ensure that bypasses which don't match any dependencies have
no effect on the computed dependencies."""
t_path = self.make_manifest(self.python_bypass_nomatch_manf)
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
[self.proto_dir], {}, [], remove_internal_deps=False,
@@ -2756,7 +2756,7 @@
self.make_proto_text_file(self.paths["script_path"],
self.script_text)
self.make_smf_test_files()
- self.make_python_test_files(2.6)
+ self.make_python_test_files(2.7)
self.make_elf(self.paths["curses_path"])
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(t_path,
--- a/src/tests/api/t_plat.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/api/t_plat.py Tue Mar 17 18:19:09 2015 -0700
@@ -20,8 +20,7 @@
# CDDL HEADER END
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
import testutils
if __name__ == "__main__":
@@ -71,8 +70,8 @@
os.close(fd1)
os.close(fd2)
portable.rename(path1, path2)
- self.failIf(os.path.exists(path1))
- self.failUnless(os.path.exists(path2))
+ self.assertFalse(os.path.exists(path1))
+ self.assertTrue(os.path.exists(path2))
fd2 = os.open(path2, os.O_RDONLY)
self.assertEquals(os.read(fd2, 3), "foo")
os.close(fd2)
--- a/src/tests/certgenerator.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/certgenerator.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/cli/t_https.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_https.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/cli/t_pkg_freeze.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkg_freeze.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/cli/t_pkg_install.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkg_install.py Tue Mar 17 18:19:09 2015 -0700
@@ -5162,7 +5162,7 @@
# Make sure we didn't get a second zerg line
dllines = readfile()
- self.failUnless(len(dllines) == 3, msg=dllines)
+ self.assertTrue(len(dllines) == 3, msg=dllines)
assertContents(dllines, ["zerg", "borg", "warg"])
# Now for the same test on upgrade
@@ -5171,7 +5171,7 @@
self.pkg("{0} [email protected]".format(install_cmd))
dllines = readfile()
- self.failUnless(len(dllines) == 4, msg=dllines)
+ self.assertTrue(len(dllines) == 4, msg=dllines)
assertContents(dllines, ["zerg2", "zorg", "borg", "zork"])
def test_driver_aliases_upgrade(self):
--- a/src/tests/cli/t_pkg_mediated.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkg_mediated.py Tue Mar 17 18:19:09 2015 -0700
@@ -175,50 +175,50 @@
close """
pkg_python = """
- open pkg://test/runtime/[email protected]
- add set name=pkg.summary value="Example python package"
- add file tmp/foopy path=/usr/bin/python2.6 owner=root group=bin mode=0555
- add link path=/usr/bin/python target=python2.6 mediator=python mediator-version=2.6
- close
open pkg://test/runtime/[email protected]
add set name=pkg.summary value="Example python package"
add file tmp/foopy path=/usr/bin/python2.7 owner=root group=bin mode=0555
add link path=/usr/bin/python target=python2.7 mediator=python mediator-version=2.7
close
- open pkg://test/runtime/[email protected]
- add set name=pkg.summary value="Example python implementation package"
- add file tmp/foopyus path=/usr/bin/python2.6-unladen-swallow owner=root group=bin mode=0555
- add link path=/usr/bin/python target=python2.6-unladen-swallow mediator=python mediator-version=2.6 mediator-implementation=unladen-swallow
+ open pkg://test/runtime/[email protected]
+ add set name=pkg.summary value="Example python package"
+ add file tmp/foopy path=/usr/bin/python3.4 owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python3.4 mediator=python mediator-version=3.4
close
open pkg://test/runtime/[email protected]
add set name=pkg.summary value="Example python implementation package"
add file tmp/foopyus path=/usr/bin/python2.7-unladen-swallow owner=root group=bin mode=0555
add link path=/usr/bin/python target=python2.7-unladen-swallow mediator=python mediator-version=2.7 mediator-implementation=unladen-swallow
close
- open pkg://test/runtime/[email protected]
+ open pkg://test/runtime/[email protected]
+ add set name=pkg.summary value="Example python implementation package"
+ add file tmp/foopyus path=/usr/bin/python3.4-unladen-swallow owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python3.4-unladen-swallow mediator=python mediator-version=3.4 mediator-implementation=unladen-swallow
+ close
+ open pkg://test/runtime/[email protected]
add set name=pkg.summary value="Example python versioned implementation package"
- add file tmp/foopyus path=/usr/bin/python2.8-unladen-swallow owner=root group=bin mode=0555
- add link path=/usr/bin/python target=python2.8-unladen-swallow mediator=python mediator-version=2.8 [email protected]
+ add file tmp/foopyus path=/usr/bin/python3.5-unladen-swallow owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python3.5-unladen-swallow mediator=python mediator-version=3.5 [email protected]
close """
pkg_multi_python = """
- open pkg://test/runtime/[email protected]
+ open pkg://test/runtime/[email protected]
add set name=pkg.summary value="Example python package with multiple implementations"
- add file tmp/foopy path=/usr/bin/python2.6 owner=root group=bin mode=0555
- add link path=/usr/bin/python target=python2.6 mediator=python mediator-implementation=cpython
- add file tmp/foopyus path=/usr/bin/python2.6-unladen-swallow owner=root group=bin mode=0555
- add link path=/usr/bin/python target=python2.6-unladen-swallow mediator=python mediator-implementation=unladen-swallow
+ add file tmp/foopy path=/usr/bin/python2.7 owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python2.7 mediator=python mediator-implementation=cpython
+ add file tmp/foopyus path=/usr/bin/python2.7-unladen-swallow owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python2.7-unladen-swallow mediator=python mediator-implementation=unladen-swallow
close
- open pkg://test/runtime/[email protected]
+ open pkg://test/runtime/[email protected]
add set name=pkg.summary value="Example python implementation package with multiple implementations and versions"
- add file tmp/foopy path=/usr/bin/python2.6 owner=root group=bin mode=0555
- add link path=/usr/bin/python target=python2.6 mediator=python mediator-version=2.6
- add file tmp/foopyus path=/usr/bin/python2.6-unladen-swallow owner=root group=bin mode=0555
add file tmp/foopy path=/usr/bin/python2.7 owner=root group=bin mode=0555
add link path=/usr/bin/python target=python2.7 mediator=python mediator-version=2.7
- add link path=/usr/bin/python target=python2.6-unladen-swallow mediator=python mediator-version=2.6 mediator-implementation=unladen-swallow
add file tmp/foopyus path=/usr/bin/python2.7-unladen-swallow owner=root group=bin mode=0555
+ add file tmp/foopy path=/usr/bin/python3.4 owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python3.4 mediator=python mediator-version=3.4
add link path=/usr/bin/python target=python2.7-unladen-swallow mediator=python mediator-version=2.7 mediator-implementation=unladen-swallow
+ add file tmp/foopyus path=/usr/bin/python3.4-unladen-swallow owner=root group=bin mode=0555
+ add link path=/usr/bin/python target=python3.4-unladen-swallow mediator=python mediator-version=3.4 mediator-implementation=unladen-swallow
close
"""
@@ -405,11 +405,11 @@
self.__assert_available_mediation_matches("""\
perl\tsystem\t5.10.0\tsystem\t\t
perl\tsystem\t5.8.4\tsystem\t\t
-python\tsystem\t2.8\tsystem\[email protected]\t
+python\tsystem\t3.5\tsystem\[email protected]\t
+python\tsystem\t3.4\tsystem\t\t
+python\tsystem\t3.4\tsystem\tunladen-swallow\t
python\tsystem\t2.7\tsystem\t\t
python\tsystem\t2.7\tsystem\tunladen-swallow\t
-python\tsystem\t2.6\tsystem\t\t
-python\tsystem\t2.6\tsystem\tunladen-swallow\t
vi\tsite\t\tsite\tvim\t
vi\tvendor\t\tvendor\tnvi\t
vi\tsystem\t\tsystem\tsvr4\t
@@ -848,18 +848,18 @@
# Install python and python-unladen-swallow at the same time,
# verify that unladen-swallow is NOT selected.
- self.pkg("install python-26 python-unladen-swallow-26")
+ self.pkg("install python-27 python-unladen-swallow-27")
self.__assert_mediation_matches("""\
-python\tsystem\t2.6\tsystem\t\t
+python\tsystem\t2.7\tsystem\t\t
""")
check_not_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
# Set only mediation version and verify unladen swallow is NOT
# selected.
- self.pkg("set-mediator -vvv -V 2.6 python")
+ self.pkg("set-mediator -vvv -V 2.7 python")
self.__assert_mediation_matches("""\
-python\tlocal\t2.6\tsystem\t\t
+python\tlocal\t2.7\tsystem\t\t
""")
check_not_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
@@ -868,7 +868,7 @@
# was selected.
self.pkg("set-mediator -vvv -I unladen-swallow python")
self.__assert_mediation_matches("""\
-python\tlocal\t2.6\tlocal\tunladen-swallow\t
+python\tlocal\t2.7\tlocal\tunladen-swallow\t
""")
check_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
@@ -877,54 +877,54 @@
# still selected.
self.pkg("unset-mediator -V python")
self.__assert_mediation_matches("""\
-python\tsystem\t2.6\tlocal\tunladen-swallow\t
+python\tsystem\t2.7\tlocal\tunladen-swallow\t
""")
check_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
- # Install python-27 and verify unladen swallow is still
+ # Install python-34 and verify unladen swallow is still
# selected.
- self.pkg("install python-27")
+ self.pkg("install python-34")
self.__assert_mediation_matches("""\
-python\tsystem\t2.6\tlocal\tunladen-swallow\t
+python\tsystem\t2.7\tlocal\tunladen-swallow\t
""")
check_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
- # Install python-unladen-swallow-27 and verify that version
+ # Install python-unladen-swallow-34 and verify that version
# is selected.
- self.pkg("install python-unladen-swallow-27")
+ self.pkg("install python-unladen-swallow-34")
self.__assert_mediation_matches("""\
-python\tsystem\t2.7\tlocal\tunladen-swallow\t
+python\tsystem\t3.4\tlocal\tunladen-swallow\t
+""")
+ check_target(gen_python_links(), "python3.4-unladen-swallow")
+ self.pkg("verify")
+
+ # Set mediation version to 2.7 and verify that version of
+ # unladen swallow is selected.
+ self.pkg("set-mediator -vvv -V 2.7 python")
+ self.__assert_mediation_matches("""\
+python\tlocal\t2.7\tlocal\tunladen-swallow\t
""")
check_target(gen_python_links(), "python2.7-unladen-swallow")
self.pkg("verify")
- # Set mediation version to 2.6 and verify that version of
- # unladen swallow is selected.
- self.pkg("set-mediator -vvv -V 2.6 python")
- self.__assert_mediation_matches("""\
-python\tlocal\t2.6\tlocal\tunladen-swallow\t
-""")
- check_target(gen_python_links(), "python2.6-unladen-swallow")
- self.pkg("verify")
-
# Unset implementation mediation and verify unladen swallow
# is NOT selected.
self.pkg("unset-mediator -vvv -I python")
self.__assert_mediation_matches("""\
-python\tlocal\t2.6\tsystem\t\t
+python\tlocal\t2.7\tsystem\t\t
""")
check_not_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
- # Remove python-26 and python-27 and then verify unladen swallow
+ # Remove python-27 and python-34 and then verify unladen swallow
# is selected.
- self.pkg("uninstall -vvv python-26 python-27")
+ self.pkg("uninstall -vvv python-27 python-34")
self.__assert_mediation_matches("""\
-python\tlocal\t2.6\tsystem\tunladen-swallow\t
+python\tlocal\t2.7\tsystem\tunladen-swallow\t
""")
- check_target(gen_python_links(), "python2.6-unladen-swallow")
+ check_target(gen_python_links(), "python2.7-unladen-swallow")
self.pkg("verify")
# Set mediation implementation to None explicitly and verify
@@ -932,40 +932,40 @@
# since no package satisfied mediation.
self.pkg("set-mediator -vvv -I None python")
self.__assert_mediation_matches("""\
-python\tlocal\t2.6\tlocal\t\t
+python\tlocal\t2.7\tlocal\t\t
""")
check_not_exists(gen_python_links())
self.pkg("verify")
- # Install [email protected], then set mediation implementation
- # to [email protected] and verify the 2.8 implementation is
+ # Install [email protected], then set mediation implementation
+ # to [email protected] and verify the 3.5 implementation is
# selected.
- self.pkg("install -vvv python-unladen-swallow-28")
+ self.pkg("install -vvv python-unladen-swallow-35")
check_not_exists(gen_python_links())
self.pkg("verify")
self.pkg("set-mediator -vvv "
- "-V '' -I [email protected] python")
- check_target(gen_python_links(), "python2.8-unladen-swallow")
+ "-V '' -I [email protected] python")
+ check_target(gen_python_links(), "python3.5-unladen-swallow")
self.__assert_mediation_matches("""\
-python\tsystem\t2.8\tlocal\[email protected]\t
+python\tsystem\t3.5\tlocal\[email protected]\t
""")
self.pkg("verify")
# Set mediation to unladen-swallow and verify
- # [email protected] remains selected.
+ # [email protected] remains selected.
self.pkg("set-mediator -vvv -I unladen-swallow python")
- check_target(gen_python_links(), "python2.8-unladen-swallow")
+ check_target(gen_python_links(), "python3.5-unladen-swallow")
self.__assert_mediation_matches("""\
-python\tsystem\t2.8\tlocal\tunladen-swallow\t2.8
+python\tsystem\t3.5\tlocal\tunladen-swallow\t3.5
""")
self.pkg("verify")
# Remove installed links and ensure verify fails, then fix and
# ensure verify passes.
remove_links(gen_python_links())
- self.pkg("verify -v python-unladen-swallow-26 "
- "python-unladen-swallow-27")
- self.pkg("verify -v python-unladen-swallow-28", exit=1)
+ self.pkg("verify -v python-unladen-swallow-27 "
+ "python-unladen-swallow-34")
+ self.pkg("verify -v python-unladen-swallow-35", exit=1)
self.pkg("fix")
self.pkg("verify -v")
@@ -973,25 +973,25 @@
# explicitly requested in parentheses.
self.__assert_human_mediation_matches("""\
MEDIATOR VER. SRC. VERSION IMPL. SRC. IMPLEMENTATION
-python system 2.8 local unladen-swallow(@2.8)
+python system 3.5 local unladen-swallow(@3.5)
""")
# Set mediation to unladen-swallow@ and verify unladen-swallow
- # 2.7 is selected.
+ # 3.4 is selected.
self.pkg("set-mediator -vvv -I unladen-swallow@ python")
- check_target(gen_python_links(), "python2.7-unladen-swallow")
+ check_target(gen_python_links(), "python3.4-unladen-swallow")
self.__assert_mediation_matches("""\
-python\tsystem\t2.7\tlocal\tunladen-swallow@\t
+python\tsystem\t3.4\tlocal\tunladen-swallow@\t
""")
self.pkg("verify")
# Remove links and ensure verify fails for for unladen-swallow
- # 2.7, but passes for 2.6 and 2.8, and that fix will allow
+ # 3.4, but passes for 2.7 and 3.5, and that fix will allow
# verify to pass again.
remove_links(gen_python_links())
- self.pkg("verify -v python-unladen-swallow-26 "
- "python-unladen-swallow-28")
- self.pkg("verify -v python-unladen-swallow-27", exit=1)
+ self.pkg("verify -v python-unladen-swallow-27 "
+ "python-unladen-swallow-35")
+ self.pkg("verify -v python-unladen-swallow-34", exit=1)
self.pkg("fix")
self.pkg("verify -v")
@@ -1031,7 +1031,7 @@
# Install multi-impl-python; verify that unladen swallow is NOT
# selected.
- self.pkg("install -vvv multi-impl-python-26")
+ self.pkg("install -vvv multi-impl-python-27")
self.__assert_mediation_matches("""\
python\tsystem\t\tsystem\tcpython\t
""")
@@ -1060,21 +1060,21 @@
self.pkg("unset-mediator -I python")
self.pkg("install -vvv multi-impl-ver-python")
- # Verify that the default implementation of Python 2.7 was
- # selected even though the package offers Python 2.6 and an
+ # Verify that the default implementation of Python 3.4 was
+ # selected even though the package offers Python 2.7 and an
# unladen swallow implemenation of each version of Python.
self.__assert_mediation_matches("""\
-python\tsystem\t2.7\tsystem\t\t
+python\tsystem\t3.4\tsystem\t\t
""")
check_not_target(gen_python_links(), "unladen-swallow")
self.pkg("verify")
# Test available mediations.
self.__assert_available_mediation_matches("""\
+python\tsystem\t3.4\tsystem\t\t
+python\tsystem\t3.4\tsystem\tunladen-swallow\t
python\tsystem\t2.7\tsystem\t\t
python\tsystem\t2.7\tsystem\tunladen-swallow\t
-python\tsystem\t2.6\tsystem\t\t
-python\tsystem\t2.6\tsystem\tunladen-swallow\t
""")
def test_02_hardlink_mediation(self):
--- a/src/tests/cli/t_pkg_search.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkg_search.py Tue Mar 17 18:19:09 2015 -0700
@@ -56,7 +56,7 @@
open [email protected],5.11-0
add dir mode=0755 owner=root group=bin path=/bin
add dir mode=0755 owner=root group=bin path=/bin/example_dir
- add dir mode=0755 owner=root group=bin path=/usr/lib/python2.6/vendor-packages/OpenSSL
+ add dir mode=0755 owner=root group=bin path=/usr/lib/python2.7/vendor-packages/OpenSSL
add file tmp/example_file mode=0555 owner=root group=bin path=/bin/example_path
add set name=com.sun.service.incorporated_changes value="6556919 6627937"
add set name=com.sun.service.random_test value=42 value=79
@@ -156,7 +156,7 @@
res_remote_openssl = set([
headers,
- "basename dir usr/lib/python2.6/vendor-packages/OpenSSL pkg:/[email protected]\n"
+ "basename dir usr/lib/python2.7/vendor-packages/OpenSSL pkg:/[email protected]\n"
])
res_remote_bug_id = set([
--- a/src/tests/cli/t_pkg_sysrepo.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkg_sysrepo.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/cli/t_pkgdep.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkgdep.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
@@ -42,17 +42,21 @@
DDP = base.Dependency.DEPEND_DEBUG_PREFIX
+py_ver_default = "2.7"
+py_ver_other = "3.4"
+
class TestPkgdepBasics(pkg5unittest.SingleDepotTestCase):
test_manf_1 = """\
hardlink path=baz target=var/log/authlog
file group=bin mode=0755 owner=root \
-path=usr/lib/python2.6/v\
+path=usr/lib/python{0}/v\
endor-packages/pkg/client/indexer.py
file NOHA\
SH group=bin mode=0755 owner=root path=u\
sr/xpg4/lib/libcurses.so.1
-"""
+""".format(py_ver_default)
+
test_manf_2 = """\
set name=variant.arch value=foo value=bar
file NOHASH group=bin mode=0755 owner=root path=usr/xpg4/lib/libcurses.so.1 variant.arch=foo
@@ -78,10 +82,10 @@
"""
payload_manf = """\
-hardlink path=usr/baz target=lib/python2.6/foo/bar.py
-file usr/lib/python2.6/vendor-packages/pkg/client/indexer.py \
-group=bin mode=0755 owner=root path=usr/lib/python2.6/foo/bar.py
-"""
+hardlink path=usr/baz target=lib/python{0}/foo/bar.py
+file usr/lib/python{0}/vendor-packages/pkg/client/indexer.py \
+group=bin mode=0755 owner=root path=usr/lib/python{0}/foo/bar.py
+""".format(py_ver_default)
elf_sub_manf = """\
file {file_loc} group=bin mode=0755 owner=root path=bar/foo
@@ -167,8 +171,8 @@
"{pfx}.path=var/log "
"type=require {pfx}.reason=baz "
"{pfx}.type=hardlink\n" +
- self.make_pyver_python_res("2.6", proto_area, reason,
- include_os=include_os)).format(
+ self.make_pyver_python_res(py_ver_default, proto_area,
+ reason, include_os=include_os)).format(
pfx=base.Dependency.DEPEND_DEBUG_PREFIX,
dummy_fmri=base.Dependency.DUMMY_FMRI,
reason=reason
@@ -220,7 +224,7 @@
"{pfx}.path=usr/bin "
"{pfx}.reason={reason} "
"{pfx}.type=script type=require\n" +
- self.make_pyver_python_res("2.6", proto_area, reason)).format(**{
+ self.make_pyver_python_res(py_ver_default, proto_area, reason)).format(**{
"pfx":
base.Dependency.DEPEND_DEBUG_PREFIX,
"dummy_fmri":base.Dependency.DUMMY_FMRI,
@@ -516,24 +520,24 @@
"""
python_amd_text = """\
-#!/usr/bin/amd64/python2.6
+#!/usr/bin/amd64/python{0}
import pkg.indexer as indexer
-"""
+""".format(py_ver_default)
python_amd_manf = """\
-file NOHASH group=bin mode=0755 owner=root path=usr/bin/amd64/python2.6-config
-"""
+file NOHASH group=bin mode=0755 owner=root path=usr/bin/amd64/python{0}-config
+""".format(py_ver_default)
python_sparcv9_text = """\
-#!/usr/bin/sparcv9/python2.6
+#!/usr/bin/sparcv9/python{0}
from pkg.misc import EmptyI
-"""
+""".format(py_ver_default)
python_sparcv9_manf = """\
-file NOHASH group=bin mode=0755 owner=root path=usr/bin/sparcv9/python2.6-config
-"""
+file NOHASH group=bin mode=0755 owner=root path=usr/bin/sparcv9/python{0}-config
+""".format(py_ver_default)
py_in_usr_bin_manf = """\
file NOHASH group=bin mode=0755 owner=root path=usr/bin/pkg \
@@ -566,19 +570,19 @@
inst_pkg = """\
open [email protected],5.11-0
-add file tmp/foo mode=0555 owner=root group=bin path=/usr/bin/python2.6
-close"""
+add file tmp/foo mode=0555 owner=root group=bin path=/usr/bin/python{0}
+close""".format(py_ver_default)
multi_deps = """\
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/v-p/pkg/client/indexer.py
-depend fmri=__TBD pkg.debug.depend.file=usr/bin/python2.6 pkg.debug.depend.reason=usr/lib/python2.6/v-p/pkg/client/indexer.py pkg.debug.depend.type=script type=require
-depend fmri=__TBD pkg.debug.depend.file=usr/lib/python2.6/v-p/pkg/misc.py pkg.debug.depend.reason=usr/lib/python2.6/v-p/pkg/client/indexer.py pkg.debug.depend.type=python type=require
-"""
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python{0}/v-p/pkg/client/indexer.py
+depend fmri=__TBD pkg.debug.depend.file=usr/bin/python{0} pkg.debug.depend.reason=usr/lib/python{0}/v-p/pkg/client/indexer.py pkg.debug.depend.type=script type=require
+depend fmri=__TBD pkg.debug.depend.file=usr/lib/python{0}/v-p/pkg/misc.py pkg.debug.depend.reason=usr/lib/python{0}/v-p/pkg/client/indexer.py pkg.debug.depend.type=python type=require
+""".format(py_ver_default)
misc_manf = """\
set name=pkg.fmri value=pkg:/[email protected],5.11-0.117
-file NOHASH group=bin mode=0444 owner=root path=usr/lib/python2.6/v-p/pkg/misc.py
-"""
+file NOHASH group=bin mode=0444 owner=root path=usr/lib/python{0}/v-p/pkg/misc.py
+""".format(py_ver_default)
unsatisfied_manf = """\
set name=pkg.fmri value=pkg:/unsatisfied_manf
@@ -688,7 +692,7 @@
reason=reason
)
- pyver_27_script_full_manf_1 = """\
+ pyver_other_script_full_manf_1 = """\
file NOHASH group=bin mode=0755 owner=root path={reason} {run_path}
depend fmri={dummy_fmri} {pfx}.file=python{bin_ver} {pfx}.path=usr/bin {pfx}.reason={reason} {pfx}.type=script type=require
""".format(
@@ -702,8 +706,8 @@
def pyver_res_full_manf_1(self, ver, proto, reason, include_os=False):
"""Build the full manifest results for the pyver tests."""
- if ver == "2.7":
- tmp = self.pyver_27_script_full_manf_1
+ if ver == py_ver_other:
+ tmp = self.pyver_other_script_full_manf_1
else:
raise RuntimeError("Unexcepted version for "
"pyver_res_full_manf_1 {0}".format(ver))
@@ -713,7 +717,7 @@
pyver_resolve_dep_manf = """
file NOHASH group=bin mode=0444 owner=root path=usr/lib/python{py_ver}/vendor-packages/pkg/indexer.py
file NOHASH group=bin mode=0444 owner=root path=usr/lib/python{py_ver}/vendor-packages/pkg/__init__.py
-file NOHASH group=bin mode=0444 owner=root path=usr/lib/python{py_ver}/lib-tk/pkg/search_storage.py
+file NOHASH group=bin mode=0444 owner=root path=usr/lib/python{py_ver}/lib-dynload/64/pkg/search_storage.py
file NOHASH group=bin mode=0444 owner=root path=usr/lib/python{py_ver}/vendor-packages/pkg/misc.py
file NOHASH group=bin mode=0755 owner=root path=usr/bin/python
"""
@@ -735,12 +739,12 @@
"usr/lib/python{py_ver}/vendor-packages/pkg/" + f + ".py"
for f in files + ["__init__"] if f != "search_storage"
] + ["usr/bin/python",
- "usr/lib/python{py_ver}/lib-tk/pkg/search_storage.py"]
+ "usr/lib/python{py_ver}/lib-dynload/64/pkg/search_storage.py"]
# Find the potential locations an imported python module might
# be found.
- vps = self.get_ver_paths("2.7", proto_area) + \
- ["usr/lib/python2.7/vendor-packages/pkg/client"]
+ vps = self.get_ver_paths(py_ver_other, proto_area) + \
+ ["usr/lib/python{0}/vendor-packages/pkg/client".format(py_ver_other)]
vps = [vp.lstrip("/") + "/pkg/" for vp in vps]
# Produce the expected dependency. The package name will be
@@ -766,12 +770,12 @@
"{pfx}.type=script {pfx}.type=python type=require"
pyver_mismatch_results = """\
-depend fmri={dummy_fmri} {pfx}.file=python2.6 {pfx}.path=usr/bin {pfx}.reason=usr/lib/python2.7/vendor-packages/pkg/client/indexer.py {pfx}.type=script type=require
-""".format(pfx=base.Dependency.DEPEND_DEBUG_PREFIX, dummy_fmri=base.Dependency.DUMMY_FMRI)
+depend fmri={dummy_fmri} {pfx}.file=python{default} {pfx}.path=usr/bin {pfx}.reason=usr/lib/python{other}/vendor-packages/pkg/client/indexer.py {pfx}.type=script type=require
+""".format(default=py_ver_default, other=py_ver_other, pfx=base.Dependency.DEPEND_DEBUG_PREFIX, dummy_fmri=base.Dependency.DUMMY_FMRI)
pyver_mismatch_errs = """
-The file to be installed at usr/lib/python2.7/vendor-packages/pkg/client/indexer.py declares a python version of 2.6. However, the path suggests that the version should be 2.7. The text of the file can be found at {0}/usr/lib/python2.7/vendor-packages/pkg/client/indexer.py
-"""
+The file to be installed at usr/lib/python{0}/vendor-packages/pkg/client/indexer.py declares a python version of {1}. However, the path suggests that the version should be {0}. The text of the file can be found at {{0}}/usr/lib/python{0}/vendor-packages/pkg/client/indexer.py
+""".format(py_ver_other, py_ver_default)
pyver_unspecified_ver_err = """
The file to be installed in usr/bin/pkg does not specify a specific version of python either in its installed path nor in its text. Such a file cannot be analyzed for dependencies since the version of python it will be used with is unknown. The text of the file is here: {0}/usr/bin/pkg.
@@ -1299,7 +1303,8 @@
"""Check that the output is in the format expected."""
tp = self.make_manifest(self.test_manf_1)
- fp = "usr/lib/python2.6/vendor-packages/pkg/client/indexer.py"
+ fp = "usr/lib/python{0}/vendor-packages/pkg/client/indexer.py".format(
+ py_ver_default)
self.pkgdepend_generate("-d {0} {1}".format(
pkg5unittest.g_proto_area, tp), exit=1)
@@ -1456,7 +1461,8 @@
tp = self.make_manifest(self.payload_manf)
self.pkgdepend_generate("-d {0} {1}".format(proto, tp))
self.check_res(self.make_res_payload_1(proto,
- "usr/lib/python2.6/foo/bar.py"), self.output)
+ "usr/lib/python{0}/foo/bar.py".format(py_ver_default)),
+ self.output)
self.check_res("", self.errout)
def test_bug_11829(self):
@@ -2631,7 +2637,8 @@
file NOHASH group=bin mode=0755 owner=root path=etc/file.py \
pkg.depend.runpath=$PKGDEPEND_RUNPATH:$PKGDEPEND_RUNPATH
"""
- self.make_proto_text_file("etc/file.py", "#!/usr/bin/python2.6")
+ self.make_proto_text_file(
+ "etc/file.py", "#!/usr/bin/python{0}".format(py_ver_default))
tp = self.make_manifest(mf)
self.pkgdepend_generate("-d {0} {1}".format(self.test_proto_dir, tp),
exit=1)
@@ -2646,8 +2653,9 @@
path to python are treated as python files which need
dependencies analyzed."""
- self.make_proto_text_file("usr/bin/amd64/python2.6-config",
- self.python_amd_text)
+ self.make_proto_text_file(
+ "usr/bin/amd64/python{0}-config".format(py_ver_default),
+ self.python_amd_text)
mp = self.make_manifest(self.python_amd_manf)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(
mp, [self.test_proto_dir], {}, [], convert=False)
@@ -2656,13 +2664,14 @@
for d in ds:
if d.attrs[DDP + ".type"] == "script":
self.assertEqual(d.attrs[DDP + ".file"],
- ["python2.6"])
+ ["python{0}".format(py_ver_default)])
self.assertEqual(d.attrs[DDP + ".path"],
["usr/bin/amd64"])
continue
self.assertEqual(d.attrs[DDP + ".type"], "python")
- self.make_proto_text_file("usr/bin/sparcv9/python2.6-config",
+ self.make_proto_text_file(
+ "usr/bin/sparcv9/python{0}-config".format(py_ver_default),
self.python_amd_text)
mp = self.make_manifest(self.python_sparcv9_manf)
ds, es, ms, pkg_attrs = dependencies.list_implicit_deps(
@@ -2672,7 +2681,7 @@
for d in ds:
if d.attrs[DDP + ".type"] == "script":
self.assertEqual(d.attrs[DDP + ".file"],
- ["python2.6"])
+ ["python{0}".format(py_ver_default)])
self.assertEqual(d.attrs[DDP + ".path"],
["usr/bin/amd64"])
continue
@@ -2689,8 +2698,8 @@
self.pkgdepend_generate("-d {0} -d {1} -d {2} {3}".format(
self.test_proto_dir,foo_dir, bar_dir, mp), exit=1)
self.assertEqual("Couldn't find "
- "'usr/bin/amd64/python2.6-config' in any of the specified "
- "search directories:\n{0}\n".format("\n".join(
+ "'usr/bin/amd64/python{0}-config' in any of the specified "
+ "search directories:\n{1}\n".format(py_ver_default, "\n".join(
"\t" + d for d in sorted(
[foo_dir, bar_dir, self.test_proto_dir]))),
self.errout)
@@ -2700,18 +2709,20 @@
results in the right set of dependencies."""
# Set up the files for generate.
- fp = "usr/lib/python2.6/vendor-packages/pkg/client/indexer.py"
- self.make_proto_text_file(fp, self.pyver_python_text.format("2.6"))
+ fp = "usr/lib/python{0}/vendor-packages/pkg/client/indexer.py".format(
+ py_ver_default)
+ self.make_proto_text_file(fp, self.pyver_python_text.format(
+ py_ver_default))
mp = self.make_manifest(self.pyver_test_manf_1_non_ex.format(
- py_ver="2.6"))
+ py_ver=py_ver_default))
# Run generate and check the output.
self.pkgdepend_generate("-d {0} {1}".format(
self.test_proto_dir, mp))
self.check_res(
- self.make_pyver_python_res("2.6",
+ self.make_pyver_python_res(py_ver_default,
pkg5unittest.g_proto_area, fp, include_os=True).format(
- bin_ver="2.6"),
+ bin_ver=py_ver_default),
self.output)
self.check_res("", self.errout)
@@ -2765,27 +2776,30 @@
# Test line 1 (X D F) with mismatched versions.
tp = self.make_manifest(self.pyver_test_manf_1.format(
- py_ver="2.7"))
- fp = "usr/lib/python2.7/vendor-packages/pkg/client/indexer.py"
- self.make_proto_text_file(fp, self.pyver_python_text.format("2.6"))
+ py_ver=py_ver_other))
+ fp = "usr/lib/python{0}/vendor-packages/pkg/client/indexer.py".format(
+ py_ver_other)
+ self.make_proto_text_file(fp, self.pyver_python_text.format(
+ py_ver_default))
self.pkgdepend_generate("-d {0} {1}".format(self.test_proto_dir, tp),
exit=1)
self.check_res(self.pyver_mismatch_results +
- self.make_pyver_python_res("2.7", self.test_proto_dir, fp,
- include_os=True).format(bin_ver="2.6"),
+ self.make_pyver_python_res(py_ver_other, self.test_proto_dir, fp,
+ include_os=True).format(bin_ver=py_ver_default),
self.output)
self.check_res(self.pyver_mismatch_errs.format(self.test_proto_dir),
self.errout)
# Test line 2 (X D !F)
tp = self.make_manifest(self.pyver_test_manf_1.format(
- py_ver="2.7"))
- fp = "usr/lib/python2.7/vendor-packages/pkg/client/indexer.py"
+ py_ver=py_ver_other))
+ fp = "usr/lib/python{0}/vendor-packages/pkg/client/indexer.py".format(
+ py_ver_other)
self.make_proto_text_file(fp, self.pyver_python_text.format(""))
self.pkgdepend_generate("-m -d {0} {1}".format(
self.test_proto_dir, tp))
self.check_res(
- self.pyver_res_full_manf_1("2.7", self.test_proto_dir, fp,
+ self.pyver_res_full_manf_1(py_ver_other, self.test_proto_dir, fp,
include_os=True).format(
reason=fp, bin_ver="", run_path=""),
self.output)
@@ -2794,13 +2808,14 @@
# Test line 3 (X !D F)
tp = self.make_manifest(self.py_in_usr_bin_manf)
fp = "usr/bin/pkg"
- self.make_proto_text_file(fp, self.pyver_python_text.format("2.7"))
+ self.make_proto_text_file(fp, self.pyver_python_text.format(
+ py_ver_other))
self.pkgdepend_generate("-m -d {0} {1}".format(
self.test_proto_dir, tp))
self.check_res(
- self.pyver_res_full_manf_1("2.7", self.test_proto_dir, fp,
+ self.pyver_res_full_manf_1(py_ver_other, self.test_proto_dir, fp,
include_os=True).format(
- reason=fp, bin_ver="2.7", run_path=""),
+ reason=fp, bin_ver=py_ver_other, run_path=""),
self.output)
self.check_res("", self.errout)
@@ -2811,7 +2826,7 @@
self.pkgdepend_generate("-m -d {0} {1}".format(
self.test_proto_dir, tp), exit=1)
self.check_res(
- self.pyver_27_script_full_manf_1.format(
+ self.pyver_other_script_full_manf_1.format(
reason=fp, bin_ver="", run_path=""),
self.output)
self.check_res(self.pyver_unspecified_ver_err.format(
@@ -2819,24 +2834,26 @@
# Test line 5 (!X D F)
tp = self.make_manifest(self.pyver_test_manf_1_non_ex.format(
- py_ver="2.7"))
- fp = "usr/lib/python2.7/vendor-packages/pkg/client/indexer.py"
- self.make_proto_text_file(fp, self.pyver_python_text.format("2.6"))
+ py_ver=py_ver_other))
+ fp = "usr/lib/python{0}/vendor-packages/pkg/client/indexer.py".format(
+ py_ver_other)
+ self.make_proto_text_file(fp, self.pyver_python_text.format(py_ver_default))
self.pkgdepend_generate("-d {0} {1}".format(self.test_proto_dir, tp))
self.check_res(
- self.make_pyver_python_res("2.7", self.test_proto_dir, fp,
+ self.make_pyver_python_res(py_ver_other, self.test_proto_dir, fp,
include_os=True),
self.output)
self.check_res("", self.errout)
# Test line 6 (!X D !F)
tp = self.make_manifest(self.pyver_test_manf_1_non_ex.format(
- py_ver="2.7"))
- fp = "usr/lib/python2.7/vendor-packages/pkg/client/indexer.py"
+ py_ver=py_ver_other))
+ fp = "usr/lib/python{0}/vendor-packages/pkg/client/indexer.py".format(
+ py_ver_other)
self.make_proto_text_file(fp, self.pyver_python_text.format(""))
self.pkgdepend_generate("-d {0} {1}".format(self.test_proto_dir, tp))
self.check_res(
- self.make_pyver_python_res("2.7", self.test_proto_dir, fp,
+ self.make_pyver_python_res(py_ver_other, self.test_proto_dir, fp,
include_os=True),
self.output)
self.check_res("", self.errout)
@@ -2844,7 +2861,7 @@
# Test line 7 (!X !D F)
tp = self.make_manifest(self.py_in_usr_bin_manf_non_ex)
fp = "usr/bin/pkg"
- self.make_proto_text_file(fp, self.pyver_python_text.format("2.7"))
+ self.make_proto_text_file(fp, self.pyver_python_text.format(py_ver_other))
self.pkgdepend_generate("-d {0} {1}".format(self.test_proto_dir, tp))
self.check_res("", self.output)
self.check_res("", self.errout)
@@ -2861,20 +2878,18 @@
"""Test that python modules written for a version of python
other than the current system version are analyzed correctly."""
- py_ver = "2.7"
-
# Set up the files for generate.
tp = self.make_manifest(
- self.pyver_test_manf_1.format(py_ver=py_ver))
+ self.pyver_test_manf_1.format(py_ver=py_ver_other))
fp = "usr/lib/python{0}/vendor-packages/pkg/" \
- "client/indexer.py".format(py_ver)
+ "client/indexer.py".format(py_ver_other)
self.make_proto_text_file(fp, self.python_text)
# Run generate and check the output.
self.pkgdepend_generate("-m -d {0} {1}".format(
self.test_proto_dir, tp))
self.check_res(
- self.pyver_res_full_manf_1(py_ver,
+ self.pyver_res_full_manf_1(py_ver_other,
self.test_proto_dir, fp).format(
bin_ver="", reason=fp, run_path=""),
self.output)
@@ -2884,7 +2899,7 @@
# for the resolver to use.
dependency_mp = self.make_manifest(self.output)
provider_mp = self.make_manifest(
- self.pyver_resolve_dep_manf.format(py_ver=py_ver))
+ self.pyver_resolve_dep_manf.format(py_ver=py_ver_other))
# Run resolver and check the output.
self.pkgdepend_resolve(
@@ -2898,7 +2913,7 @@
pkg5unittest.g_proto_area).format(
res_manf=os.path.basename(provider_mp),
pfx=base.Dependency.DEPEND_DEBUG_PREFIX,
- py_ver=py_ver,
+ py_ver=py_ver_other,
reason=fp
), lines)
lines = self.__read_file(provider_res_p)
@@ -2911,16 +2926,16 @@
# Now test that generating dependencies when runpaths
# have been set works.
tp = self.make_manifest(
- self.pyver_test_manf_1_run_path.format(py_ver=py_ver))
+ self.pyver_test_manf_1_run_path.format(py_ver=py_ver_other))
fp = "usr/lib/python{0}/vendor-packages/pkg/" \
- "client/indexer.py".format(py_ver)
+ "client/indexer.py".format(py_ver_other)
self.make_proto_text_file(fp, self.python_text)
# Run generate and check the output.
self.pkgdepend_generate("-m -d {0} {1}".format(
self.test_proto_dir, tp))
self.check_res(
- self.pyver_res_full_manf_1(py_ver,
+ self.pyver_res_full_manf_1(py_ver_other,
self.test_proto_dir, fp).format(
bin_ver="",
reason=fp,
--- a/src/tests/cli/t_pkgdep_resolve.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkgdep_resolve.py Tue Mar 17 18:19:09 2015 -0700
@@ -61,14 +61,14 @@
file NOHASH group=sys mode=0644 owner=root path=var/log/syslog
"""
multi_deps = """\
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/v-p/pkg/client/indexer.py
-depend fmri=__TBD pkg.debug.depend.file=usr/bin/python2.6 pkg.debug.depend.reason=usr/lib/python2.6/v-p/pkg/client/indexer.py pkg.debug.depend.type=script type=require
-depend fmri=__TBD pkg.debug.depend.file=usr/lib/python2.6/v-p/pkg/misc.py pkg.debug.depend.reason=usr/lib/python2.6/v-p/pkg/client/indexer.py pkg.debug.depend.type=python type=require
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/v-p/pkg/client/indexer.py
+depend fmri=__TBD pkg.debug.depend.file=usr/bin/python2.7 pkg.debug.depend.reason=usr/lib/python2.7/v-p/pkg/client/indexer.py pkg.debug.depend.type=script type=require
+depend fmri=__TBD pkg.debug.depend.file=usr/lib/python2.7/v-p/pkg/misc.py pkg.debug.depend.reason=usr/lib/python2.7/v-p/pkg/client/indexer.py pkg.debug.depend.type=python type=require
"""
misc_manf = """\
set name=fmri value=pkg:/[email protected],5.11-0.117
-file NOHASH group=bin mode=0444 owner=root path=usr/lib/python2.6/v-p/pkg/misc.py
+file NOHASH group=bin mode=0444 owner=root path=usr/lib/python2.7/v-p/pkg/misc.py
"""
simp_manf = """\
@@ -181,66 +181,66 @@
"""
multi_file_dep_manf = """\
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/pkg/client/indexer.py
-depend fmri=__TBD pkg.debug.depend.file=search_storage.py pkg.debug.depend.file=search_storage.pyc pkg.debug.depend.file=search_storage/__init__.py pkg.debug.depend.path=usr/lib/python2.6/pkg pkg.debug.depend.path=usr/lib/python2.6/lib-dynload/pkg pkg.debug.depend.path=usr/lib/python2.6/lib-old/pkg pkg.debug.depend.path=usr/lib/python2.6/lib-tk/pkg pkg.debug.depend.path=usr/lib/python2.6/plat-sunos5/pkg pkg.debug.depend.path=usr/lib/python2.6/site-packages/pkg pkg.debug.depend.path=usr/lib/python2.6/vendor-packages/pkg pkg.debug.depend.path=usr/lib/python2.6/vendor-packages/gst-0.10/pkg pkg.debug.depend.path=usr/lib/python2.6/vendor-packages/gtk-2.0/pkg pkg.debug.depend.path=usr/lib/python26.zip/pkg pkg.debug.depend.reason=usr/lib/python2.6/vendor-packages/pkg/client/indexer.py pkg.debug.depend.type=python type=require
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/pkg/client/indexer.py
+depend fmri=__TBD pkg.debug.depend.file=search_storage.py pkg.debug.depend.file=search_storage.pyc pkg.debug.depend.file=search_storage/__init__.py pkg.debug.depend.path=usr/lib/python2.7/pkg pkg.debug.depend.path=usr/lib/python2.7/lib-dynload/pkg pkg.debug.depend.path=usr/lib/python2.7/lib-old/pkg pkg.debug.depend.path=usr/lib/python2.7/lib-tk/pkg pkg.debug.depend.path=usr/lib/python2.7/plat-sunos5/pkg pkg.debug.depend.path=usr/lib/python2.7/site-packages/pkg pkg.debug.depend.path=usr/lib/python2.7/vendor-packages/pkg pkg.debug.depend.path=usr/lib/python2.7/vendor-packages/gst-0.10/pkg pkg.debug.depend.path=usr/lib/python2.7/vendor-packages/gtk-2.0/pkg pkg.debug.depend.path=usr/lib/python27.zip/pkg pkg.debug.depend.reason=usr/lib/python2.7/vendor-packages/pkg/client/indexer.py pkg.debug.depend.type=python type=require
"""
multi_file_dep_fullpath_manf = """\
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/pkg/client/indexer.py
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/pkg/client/indexer.py
depend fmri=__TBD pkg.debug.depend.file=search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-dynload/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-old/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-tk/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/plat-sunos5/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/site-packages/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/gst-0.10/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/gtk-2.0/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python26.zip/pkg/search_storage.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-dynload/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-old/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-tk/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/plat-sunos5/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/site-packages/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/gst-0.10/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/gtk-2.0/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python26.zip/pkg/search_storage.pyc \
- pkg.debug.depend.fullpath=usr/lib/python2.6/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-dynload/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-old/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/lib-tk/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/plat-sunos5/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/site-packages/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/gst-0.10/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python2.6/vendor-packages/gtk-2.0/pkg/search_storage/__init__.py \
- pkg.debug.depend.fullpath=usr/lib/python26.zip/pkg/search_storage/__init__.py \
- pkg.debug.depend.reason=usr/lib/python2.6/vendor-packages/pkg/client/indexer.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-dynload/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-old/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-tk/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/plat-sunos5/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/site-packages/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/gst-0.10/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/gtk-2.0/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python27.zip/pkg/search_storage.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-dynload/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-old/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-tk/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/plat-sunos5/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/site-packages/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/gst-0.10/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/gtk-2.0/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python27.zip/pkg/search_storage.pyc \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-dynload/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-old/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/lib-tk/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/plat-sunos5/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/site-packages/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/gst-0.10/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python2.7/vendor-packages/gtk-2.0/pkg/search_storage/__init__.py \
+ pkg.debug.depend.fullpath=usr/lib/python27.zip/pkg/search_storage/__init__.py \
+ pkg.debug.depend.reason=usr/lib/python2.7/vendor-packages/pkg/client/indexer.py \
pkg.debug.depend.type=python type=require
"""
multi_file_sat_both = """\
set name=fmri value=pkg:/sat_both
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/pkg/search_storage.py
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/pkg/search_storage.pyc
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/pkg/search_storage.py
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/pkg/search_storage.pyc
"""
multi_file_sat_py = """\
set name=fmri value=pkg:/sat_py
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/pkg/search_storage.py
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/lib-tk/pkg/search_storage.py
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/pkg/search_storage.py
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/lib-tk/pkg/search_storage.py
"""
multi_file_sat_pyc = """\
set name=fmri value=pkg:/sat_pyc
-file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.6/vendor-packages/pkg/search_storage.pyc
+file NOHASH group=bin mode=0755 owner=root path=usr/lib/python2.7/vendor-packages/pkg/search_storage.pyc
"""
inst_pkg = """\
open [email protected],5.11-0
-add file tmp/foo mode=0555 owner=root group=bin path=/usr/bin/python2.6
+add file tmp/foo mode=0555 owner=root group=bin path=/usr/bin/python2.7
close"""
var_pkg = """\
@@ -326,7 +326,7 @@
# there's a single variant.arch value set here,
# but no variant.opensolaris.zone values
installed_18045 = """\
-open runtime/[email protected],5.11-0.161
+open runtime/[email protected],5.11-0.161
add set name=variant.foo value=i386
add file tmp/foo group=bin mode=0755 owner=root path=usr/bin/python
close
@@ -342,7 +342,7 @@
# there's a single variant.arch value set here,
# and variant.opensolaris.zone values
installed_18045_reverse = """\
-open runtime/[email protected],5.11-0.161
+open runtime/[email protected],5.11-0.161
add set name=variant.foo value=i386
add set name=variant.opensolaris.zone value=global value=nonglobal
add file tmp/foo group=bin mode=0755 owner=root path=usr/bin/python
@@ -358,7 +358,7 @@
# there's a single variant.arch value set here,
# but no variant.opensolaris.zone values
installed_18045_mixed = """\
-open runtime/[email protected],5.11-0.161
+open runtime/[email protected],5.11-0.161
add set name=variant.foo value=i386
add file tmp/foo group=bin mode=0755 owner=root path=usr/bin/python
close
@@ -804,11 +804,11 @@
if d.attrs["fmri"] == p2_name:
self.assertEqual(
d.attrs["{0}.file".format(self.depend_dp)],
- ["usr/lib/python2.6/v-p/pkg/misc.py"])
+ ["usr/lib/python2.7/v-p/pkg/misc.py"])
elif d.attrs["fmri"] == p3_name:
self.assertEqual(
d.attrs["{0}.file".format(self.depend_dp)],
- ["usr/bin/python2.6"])
+ ["usr/bin/python2.7"])
else:
raise RuntimeError("Got unexpected fmri "
"{0} for in dependency {1}".format(
@@ -829,11 +829,11 @@
if d.attrs["fmri"] == p2_name:
self.assertEqual(
d.attrs["{0}.file".format(self.depend_dp)],
- ["usr/lib/python2.6/v-p/pkg/misc.py"])
+ ["usr/lib/python2.7/v-p/pkg/misc.py"])
elif d.attrs["fmri"] == p3_name:
self.assertEqual(
d.attrs["{0}.file".format(self.depend_dp)],
- ["usr/bin/python2.6"])
+ ["usr/bin/python2.7"])
else:
raise RuntimeError("Got unexpected fmri "
"{0} for in dependency {1}".format(
@@ -844,7 +844,7 @@
self.assertEqual(e.path, m1_path)
self.assertEqual(e.file_dep.attrs[
"{0}.file".format(self.depend_dp)],
- "usr/bin/python2.6")
+ "usr/bin/python2.7")
else:
raise RuntimeError("Unexpected error:{0}".format(e))
@@ -1454,7 +1454,7 @@
self.pkgsend_bulk(self.rurl, self.installed_18045)
self.api_obj.refresh(immediate=True)
- self._api_install(self.api_obj, ["runtime/python26"])
+ self._api_install(self.api_obj, ["runtime/python-27"])
dep_path = self.make_manifest(self.bug_18045_dep)
pkg_deps, errs, unused_fmris, external_deps = \
@@ -1464,12 +1464,12 @@
"errors:\n{0}".format("\n".join([
"{0}".format(e,) for e in errs])))
self.assertEqualDiff(set(), unused_fmris)
- self.assertEqualDiff(set(["runtime/python26"]), external_deps)
+ self.assertEqualDiff(set(["runtime/python-27"]), external_deps)
self.assertEqual(len(pkg_deps), 1)
self.assertEqual(len(pkg_deps[dep_path]), 1)
self.debug("fmri:{0}".format(pkg_deps[dep_path][0].attrs["fmri"]))
self.assert_(pkg_deps[dep_path][0].attrs["fmri"].startswith(
- "pkg:/runtime/[email protected]"))
+ "pkg:/runtime/[email protected]"))
def test_bug_18045_reverse(self):
"""Test that when a package with variants has a file dependency
@@ -1478,7 +1478,7 @@
self.pkgsend_bulk(self.rurl, self.installed_18045_reverse)
self.api_obj.refresh(immediate=True)
- self._api_install(self.api_obj, ["runtime/python26"])
+ self._api_install(self.api_obj, ["runtime/python-27"])
dep_path = self.make_manifest(self.bug_18045_dep_reverse)
pkg_deps, errs, unused_fmris, external_deps = \
@@ -1488,12 +1488,12 @@
"errors:\n{0}".format("\n".join([
"{0}".format(e,) for e in errs])))
self.assertEqualDiff(set(), unused_fmris)
- self.assertEqualDiff(set(["runtime/python26"]), external_deps)
+ self.assertEqualDiff(set(["runtime/python-27"]), external_deps)
self.assertEqual(len(pkg_deps), 1)
self.assertEqual(len(pkg_deps[dep_path]), 1)
self.debug("fmri:{0}".format(pkg_deps[dep_path][0].attrs["fmri"]))
self.assert_(pkg_deps[dep_path][0].attrs["fmri"].startswith(
- "pkg:/runtime/[email protected]"))
+ "pkg:/runtime/[email protected]"))
def test_bug_18045_mixed(self):
"""Test that when a package with variants has a file dependency
@@ -1502,7 +1502,7 @@
self.pkgsend_bulk(self.rurl, self.installed_18045_mixed)
self.api_obj.refresh(immediate=True)
- self._api_install(self.api_obj, ["runtime/python26"])
+ self._api_install(self.api_obj, ["runtime/python-27"])
dep_path = self.make_manifest(self.bug_18045_dep_mixed)
pkg_deps, errs, unused_fmris, external_deps = \
@@ -1512,12 +1512,12 @@
"errors:\n{0}".format("\n".join([
"{0}".format(e,) for e in errs])))
self.assertEqualDiff(set(), unused_fmris)
- self.assertEqualDiff(set(["runtime/python26"]), external_deps)
+ self.assertEqualDiff(set(["runtime/python-27"]), external_deps)
self.assertEqual(len(pkg_deps), 1)
self.assertEqual(len(pkg_deps[dep_path]), 1)
self.debug("fmri:{0}".format(pkg_deps[dep_path][0].attrs["fmri"]))
self.assert_(pkg_deps[dep_path][0].attrs["fmri"].startswith(
- "pkg:/runtime/[email protected]"))
+ "pkg:/runtime/[email protected]"))
def test_bug_18077(self):
"""Test that a package with manually annotated group,
--- a/src/tests/cli/t_pkgmogrify.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkgmogrify.py Tue Mar 17 18:19:09 2015 -0700
@@ -226,10 +226,10 @@
c = self.__countMatches(regex, path)
- self.failIf(count == c == 0,
+ self.assertFalse(count == c == 0,
"No matches for '{0}' found".format(regex))
if count > 0:
- self.failUnless(c == count,
+ self.assertTrue(c == count,
"{0} matches for '{1}' found, {2} expected".format(
c, regex, count))
@@ -378,8 +378,8 @@
output=no_output, args="-P {0}".format(no_print))
# Make sure neither output nor print file was created.
- self.failIf(os.access(no_output, os.F_OK))
- self.failIf(os.access(no_print, os.F_OK))
+ self.assertFalse(os.access(no_output, os.F_OK))
+ self.assertFalse(os.access(no_print, os.F_OK))
# Trigger an exit transform with a specific exit code.
self.pkgmogrify([self.transforms["add bobcat"],
@@ -387,8 +387,8 @@
output=no_output, args="-P {0}".format(no_print), exit=7)
# Make sure neither output nor print file was created.
- self.failIf(os.access(no_output, os.F_OK))
- self.failIf(os.access(no_print, os.F_OK))
+ self.assertFalse(os.access(no_output, os.F_OK))
+ self.assertFalse(os.access(no_print, os.F_OK))
# Trigger an exit transform with a specific exit code and
# message.
--- a/src/tests/cli/t_pkgsign.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/cli/t_pkgsign.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/interactive/runprintengine.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/interactive/runprintengine.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/interactive/runprogress.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/interactive/runprogress.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/perf/actionbench.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/perf/actionbench.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/perf/fmribench.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/perf/fmribench.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/perf/manbench.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/perf/manbench.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/perf/membench.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/perf/membench.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/pkg5testenv.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/pkg5testenv.py Tue Mar 17 18:19:09 2015 -0700
@@ -87,7 +87,7 @@
pkg_path = os.path.realpath(pkg_path)
proto_area = os.path.realpath(proto_area)
- pkgs = os.path.join(pkg_path, "usr/lib/python2.6/vendor-packages")
+ pkgs = os.path.join(pkg_path, "usr/lib/python2.7/vendor-packages")
bins = os.path.join(pkg_path, "usr/bin")
sys.path.insert(1, pkgs)
--- a/src/tests/pkg5unittest.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/pkg5unittest.py Tue Mar 17 18:19:09 2015 -0700
@@ -1074,7 +1074,7 @@
list_attrs = ["baseline_failures", "errors", "failures", "skips",
"timing"]
num_attrs = ["mismatches", "num_successes", "testsRun"]
-
+
def __init__(self, res):
self.errors = [(str(test), err) for test, err in res.errors]
self.failures = [(str(test), err) for test, err in res.failures]
@@ -1126,7 +1126,7 @@
v += getattr(o, n)
setattr(self, n, v)
-
+
class _Pkg5TestResult(unittest._TextTestResult):
baseline = None
machsep = "|"
@@ -1503,7 +1503,7 @@
mod = l[0]
c = l[1].split(".")[0]
return mod, c
-
+
def q_makeResult(s, o, b, bail_on_fail, show_on_expected_fail, a, cov):
"""Construct a test result for use in the parallel test suite."""
@@ -1511,7 +1511,7 @@
show_on_expected_fail=show_on_expected_fail, archive_dir=a)
res.coverage = cov
return res
-
+
def q_run(inq, outq, i, o, baseline_filepath, bail_on_fail,
show_on_expected_fail, a, cov, port, suite_name):
"""Function used to run the test suite in parallel.
@@ -3084,7 +3084,7 @@
def validate_html_file(self, fname, exit=0, comment="",
options="-utf8 -quiet", drop_prop_attrs=False):
""" Run a html file specified by fname through a html validator
- (tidy). The drop_prop_attrs parameter can be used to ignore
+ (tidy). The drop_prop_attrs parameter can be used to ignore
proprietary attributes which would otherwise make tidy fail.
"""
if drop_prop_attrs:
@@ -3800,7 +3800,7 @@
"https.conf")
with open(self.https_conf_path, "wb") as fh:
fh.write(self.https_conf.format(**conf_dict))
-
+
ac = ApacheController(self.https_conf_path,
self.https_port, self.common_config_dir, https=True,
testcase=self)
@@ -3832,7 +3832,7 @@
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
-# Change this to Listen on specific IP addresses as shown below to
+# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
Listen 0.0.0.0:{https_port}
@@ -3847,7 +3847,7 @@
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
-# have to place corresponding `LoadModule' lines within the appropriate
+# have to place corresponding `LoadModule' lines within the appropriate
# (32-bit or 64-bit module) /etc/apache2/2.2/conf.d/modules-*.load file so that
# the directives contained in it are actually available _before_ they are used.
#
@@ -3861,7 +3861,7 @@
<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
-# httpd as root initially and it will switch.
+# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
@@ -3903,10 +3903,10 @@
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
-# directory (and its subdirectories).
+# directory (and its subdirectories).
#
-# First, we configure the "default" to be a very restrictive set of
-# features.
+# First, we configure the "default" to be a very restrictive set of
+# features.
#
<Directory />
Options None
@@ -3935,8 +3935,8 @@
</IfModule>
#
-# The following lines prevent .htaccess and .htpasswd files from being
-# viewed by Web clients.
+# The following lines prevent .htaccess and .htpasswd files from being
+# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
@@ -4578,8 +4578,11 @@
try:
# Ping the versions URL, rather than the default /
# so that we don't initialize the BUI code yet.
- urllib2.urlopen(urlparse.urljoin(self.url,
- "versions/0"))
+ repourl = urlparse.urljoin(self.url, "versions/0")
+ # Disable SSL peer verification, we just want to check
+ # if the depot is running.
+ urllib2.urlopen(repourl,
+ context=ssl._create_unverified_context())
except urllib2.HTTPError as e:
if e.code == httplib.FORBIDDEN:
return True
--- a/src/tests/ro_data/signing_certs/generate_certs.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/ro_data/signing_certs/generate_certs.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/tests/run.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/tests/run.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6 -u
+#!/usr/bin/python2.7 -u
#
# CDDL HEADER START
#
--- a/src/util/apache2/depot/depot_httpd.conf.mako Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/apache2/depot/depot_httpd.conf.mako Tue Mar 17 18:19:09 2015 -0700
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -81,7 +81,7 @@
LoadModule rewrite_module libexec/64/mod_rewrite.so
LoadModule headers_module libexec/64/mod_headers.so
LoadModule env_module libexec/64/mod_env.so
-LoadModule wsgi_module libexec/64/mod_wsgi-2.6.so
+LoadModule wsgi_module libexec/64/mod_wsgi-2.7.so
LoadModule cache_module libexec/64/mod_cache.so
LoadModule disk_cache_module libexec/64/mod_disk_cache.so
LoadModule deflate_module libexec/64/mod_deflate.so
@@ -101,9 +101,9 @@
test_proto = os.environ.get("PKG5_TEST_PROTO", None)
if test_proto:
context.write("""
-WSGIDaemonProcess pkgdepot processes=1 threads=21 user=pkg5srv group=pkg5srv display-name=pkg5_depot inactivity-timeout=300 python-path=%s/usr/lib/python2.6
-SetEnv PKG5_TEST_PROTO %s
-""" % (test_proto, test_proto))
+WSGIDaemonProcess pkgdepot processes=1 threads=21 user=pkg5srv group=pkg5srv display-name=pkg5_depot inactivity-timeout=300 python-path={0}/usr/lib/python2.7
+SetEnv PKG5_TEST_PROTO {1}
+""".format(test_proto, test_proto))
else:
context.write("""
WSGIDaemonProcess pkgdepot processes=1 threads=21 user=pkg5srv group=pkg5srv display-name=pkg5_depot inactivity-timeout=300
@@ -158,8 +158,8 @@
servername = context.get("host")
serverport = context.get("port")
if ":" not in servername:
- context.write("ServerName %(host)s:%(port)s\n" %
- {"host": servername, "port": serverport})
+ context.write("ServerName {host}:{port}\n".format(
+ host=servername, port=serverport))
%>
#
@@ -342,13 +342,13 @@
if ssl_cert_file_path and ssl_key_file_path:
context.write("""
# DNS domain name of the server
-ServerName %s
+ServerName {0}
# enable SSL
SSLEngine On
# Location of the server certificate and key.
-""" % context.get("host", "localhost"))
- context.write("SSLCertificateFile %s\n" % ssl_cert_file_path)
- context.write("SSLCertificateKeyFile %s\n" % ssl_key_file_path)
+""".format(context.get("host", "localhost")))
+ context.write("SSLCertificateFile {0}\n".format(ssl_cert_file_path))
+ context.write("SSLCertificateKeyFile {0}\n".format(ssl_key_file_path))
context.write("""
# Intermediate CA certificate file. Required if your server certificate
# is not signed by a top-level CA directly but an intermediate authority.
@@ -358,8 +358,8 @@
ssl_cert_chain_file_path = context.get("ssl_cert_chain_file",
"")
if ssl_cert_chain_file_path:
- context.write("SSLCertificateChainFile %s\n" %
- ssl_cert_chain_file_path)
+ context.write("SSLCertificateChainFile {0}\n".format(
+ ssl_cert_chain_file_path))
else:
context.write("# SSLCertificateChainFile /cert_path\n")
%>
@@ -378,18 +378,18 @@
(repo_path, repo_prefix.rstrip("/"), writable_root))
for repo_path, repo_prefix, writable_root in path_info:
context.write(
- "SetEnv PKG5_REPOSITORY_%(repo_prefix)s %(repo_path)s\n" %
- locals())
+ "SetEnv PKG5_REPOSITORY_{repo_prefix} {repo_path}\n".format(
+ **locals()))
if writable_root:
context.write(
- "SetEnv PKG5_WRITABLE_ROOT_%(repo_prefix)s "
- "%(writable_root)s\n" % locals())
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s/[/]?$ "
- "%(root)s/depot/%(repo_prefix)s/ [NE,PT]\n" %
- locals())
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s/([a-z][a-z])[/]?$ "
- "%(root)s/depot/%(repo_prefix)s/$1 [NE,PT]\n" %
- locals())
+ "SetEnv PKG5_WRITABLE_ROOT_{repo_prefix} "
+ "{writable_root}\n".format(**locals()))
+ context.write("RewriteRule ^/{root}{repo_prefix}/[/]?$ "
+ "{root}/depot/{repo_prefix}/ [NE,PT]\n".format(
+ **locals()))
+ context.write("RewriteRule ^/{root}{repo_prefix}/([a-z][a-z])[/]?$ "
+ "{root}/depot/{repo_prefix}/$1 [NE,PT]\n".format(
+ **locals()))
%>
% for pub, repo_path, repo_prefix, writable_root in pubs:
% if int(cache_size) > 0:
@@ -403,36 +403,36 @@
#
root = context.get("sroot")
# search responses
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/search/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/search/$1 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/search/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/search/$1 [NE,PT]\n".format(
+ **locals()))
# admin responses
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/admin/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/admin/$1 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/admin/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/admin/$1 [NE,PT]\n".format(
+ **locals()))
# info responses
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/info/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/info/$1 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/info/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/info/$1 [NE,PT]\n".format(
+ **locals()))
# p5i responses
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/p5i/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/p5i/$1 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/p5i/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/p5i/$1 [NE,PT]\n".format(
+ **locals()))
# Deal with languages - any two letter language code.
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/([a-z][a-z])/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/$1/$2 [NE,PT]\n" %
- locals())
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/([a-z][a-z])$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/$1/ [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/([a-z][a-z])/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/$1/$2 [NE,PT]\n".format(
+ **locals()))
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/([a-z][a-z])$ "
+ "{root}/depot/{repo_prefix}{pub}/$1/ [NE,PT]\n".format(
+ **locals()))
# Deal with just the publisher
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s[/]?$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/ [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}[/]?$ "
+ "{root}/depot/{repo_prefix}{pub}/ [NE,PT]\n".format(
+ **locals()))
# redirect themes requests into the CherryPy code
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s%(pub)s/_themes/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/_themes/$1 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}{pub}/_themes/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/_themes/$1 [NE,PT]\n".format(
+ **locals()))
%>
% endfor pub
RewriteRule ^${sroot}/_themes/(.*)$ ${sroot}/depot/_themes/$1 [NE,PT]
@@ -445,34 +445,34 @@
# default publisher set in the repository.
#
root = context.get("sroot")
- context.write("# Map the default publishers for %(repo_path)s to "
- "%(pub)s\n" % locals())
+ context.write("# Map the default publishers for {repo_path} to "
+ "{pub}\n".format(**locals()))
if "pub" != None:
# search
- context.write("RewriteRule ^/%(root)s%(repo_prefix)ssearch/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/search/$1 [NE,PT]\n"
- % locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}search/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/search/$1 [NE,PT]\n"
+ .format(**locals()))
# admin
- context.write("RewriteRule ^/%(root)s%(repo_prefix)sadmin/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/admin/$1 [NE,PT]\n"
- % locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}admin/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/admin/$1 [NE,PT]\n"
+ .format(**locals()))
# info
- context.write("RewriteRule ^/%(root)s%(repo_prefix)sinfo/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/info/$1 [NE,PT]\n"
- % locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}info/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/info/$1 [NE,PT]\n"
+ .format(**locals()))
# p5i
- context.write("RewriteRule ^/%(root)s%(repo_prefix)sp5i/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/p5i/$1 [NE,PT]\n"
- % locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}p5i/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/p5i/$1 [NE,PT]\n"
+ .format(**locals()))
# Deal with languages - any two-letter language code.
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s([a-z][a-z])/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/$1/$2 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}([a-z][a-z])/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/$1/$2 [NE,PT]\n".format(
+ **locals()))
# redirect themes requests into the CherryPy code
- context.write("RewriteRule ^/%(root)s%(repo_prefix)s_themes/(.*)$ "
- "%(root)s/depot/%(repo_prefix)s%(pub)s/_themes/$1 [NE,PT]\n" %
- locals())
+ context.write("RewriteRule ^/{root}{repo_prefix}_themes/(.*)$ "
+ "{root}/depot/{repo_prefix}{pub}/_themes/$1 [NE,PT]\n".format(
+ **locals()))
%>
% endfor pub
--- a/src/util/apache2/depot/depot_index.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/apache2/depot/depot_index.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/apache2/sysrepo/sysrepo_httpd.conf.mako Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/apache2/sysrepo/sysrepo_httpd.conf.mako Tue Mar 17 18:19:09 2015 -0700
@@ -59,7 +59,7 @@
LoadModule alias_module libexec/64/mod_alias.so
LoadModule rewrite_module libexec/64/mod_rewrite.so
LoadModule env_module libexec/64/mod_env.so
-LoadModule wsgi_module libexec/64/mod_wsgi-2.6.so
+LoadModule wsgi_module libexec/64/mod_wsgi-2.7.so
# We only alias a specific script, not all files in ${sysrepo_template_dir}
WSGIScriptAlias /wsgi_p5p ${sysrepo_template_dir}/sysrepo_p5p.py
@@ -285,7 +285,7 @@
<%
if proxy:
context.write(
- "ProxyRemote %(uri)s %(proxy)s\n" % locals()
+ "ProxyRemote {uri} {proxy}\n".format(**locals())
)
%>
% endfor pub
@@ -325,7 +325,7 @@
CacheDisable /syspub
<%
for p in sorted(set(v[0] for l in uri_pub_map.values() for v in l )):
- context.write("CacheDisable /%s/catalog\n" % p)
+ context.write("CacheDisable /{0}/catalog\n".format(p))
%>
</IfModule>
@@ -370,8 +370,8 @@
% if uri.startswith("https:"):
<%
no_https = uri.replace("https:", "http:")
- context.write("RewriteRule ^proxy:%(no_https)s/(.*)$ "
- "%(uri)s/$1 [P,NE]" % locals())
+ context.write("RewriteRule ^proxy:{no_https}/(.*)$ "
+ "{uri}/$1 [P,NE]".format(**locals()))
%>
% elif uri.startswith("file:"):
<%doc>
@@ -381,21 +381,21 @@
<%
# File and p5p-based repositories get our static
# versions and publisher responses
- context.write("RewriteRule ^/%(pub)s/%(hash)s/versions/0 "
- "%%{DOCUMENT_ROOT}/versions/0/index.html [L,NE]\n" % locals())
- context.write("RewriteRule ^/%(pub)s/%(hash)s/publisher/0 "
- "%%{DOCUMENT_ROOT}/%(pub)s/%(hash)s/publisher/0/index.html [L,NE]\n" % locals())
+ context.write("RewriteRule ^/{pub}/{hash}/versions/0 "
+ "%{{DOCUMENT_ROOT}}/versions/0/index.html [L,NE]\n".format(**locals()))
+ context.write("RewriteRule ^/{pub}/{hash}/publisher/0 "
+ "%{{DOCUMENT_ROOT}}/{pub}/{hash}/publisher/0/index.html [L,NE]\n".format(**locals()))
# A p5p archive repository
if utype == "file":
- repo_path = "/%s" % uri.replace("file:", "").lstrip("/")
- context.write("# %s %s\n" % (uri, hash))
+ repo_path = "/{0}".format(uri.replace("file:", "").lstrip("/"))
+ context.write("# %s %s\n".format(uri, hash))
# We 'passthrough' (PT), letting our
# WSGIScriptAlias pick up the request from here.
- context.write("RewriteRule /%(pub)s/%(hash)s/(.*) "
- "/wsgi_p5p?pub=%(pub)s&hash=%(hash)s&path=$1 [NE,PT]\n" %
- locals())
- context.write("SetEnv %(hash)s %(repo_path)s\n" %
- locals())
+ context.write("RewriteRule /{pub}/{hash}/(.*) "
+ "/wsgi_p5p?pub={pub}&hash={hash}&path=$1 [NE,PT]\n".format(
+ **locals()))
+ context.write("SetEnv {hash} {repo_path}\n".format(
+ **locals()))
continue
%><%doc>
# We have a file-based repository
@@ -404,9 +404,9 @@
# the URL instead.
</%doc>
<% context.write(
- "RewriteRule ^/%(pub)s/%(hash)s/catalog/1/(.*)$ "
- "/%(pub)s/%(hash)s/publisher/%(pub)s/catalog/$1 [NE,PT]" %
- locals())
+ "RewriteRule ^/{pub}/{hash}/catalog/1/(.*)$ "
+ "/{pub}/{hash}/publisher/{pub}/catalog/$1 [NE,PT]".format(
+ **locals()))
%><%doc>
# file responses are a little tricky - we need to index
# the first two characters of the filename and use that
@@ -417,9 +417,9 @@
# gets rewritten as:
# http://localhost:15000/pkg5-nightly/abcdef/publisher/pkg5-nightly/file/87/87ad645695abb22b2959f73d22022c5cffeccb13
</%doc>
-<% context.write("RewriteRule ^/%(pub)s/%(hash)s/file/1/(..)(.*)$ "
- "/%(pub)s/%(hash)s/publisher/%(pub)s/file/$1/$1$2 [NE,PT]\n"
- % locals())
+<% context.write("RewriteRule ^/{pub}/{hash}/file/1/(..)(.*)$ "
+ "/{pub}/{hash}/publisher/{pub}/file/$1/$1$2 [NE,PT]\n"
+ .format(**locals()))
%><%doc>
# We need to use %THE_REQUEST here to get the undecoded
# URI from mod_rewrite. Hang on to your lunch.
@@ -438,19 +438,19 @@
# which we eventually rewrite as:
# -> '/pkg5-nightly/abcdef/publisher/pkg5-nightly/pkg/package%2Fsysrepo/0.5.11%2C5.11-0.159%3A20110308T011843Z'
</%doc><%
- context.write("RewriteRule ^/%(pub)s/%(hash)s/manifest/0/.*$ "
- "%%{THE_REQUEST} [NE,C]\n" % locals())
+ context.write("RewriteRule ^/{pub}/{hash}/manifest/0/.*$ "
+ "%{{THE_REQUEST}} [NE,C]\n".format(**locals()))
context.write("RewriteRule ^GET\ "
- "/%(pub)s/%(hash)s/manifest/0/([^@]+)@([^\ ]+)(\ HTTP/1.1)$ "
- "/%(pub)s/%(hash)s/publisher/%(pub)s/pkg/$1/$2 [NE,PT,C]\n"
- % locals())
- context.write("RewriteRule ^/%(pub)s/%(hash)s/(.*)$ %%{DOCUMENT_ROOT}/%(pub)s/%(hash)s/$1 [NE,L]"
- % locals())
+ "/{pub}/{hash}/manifest/0/([^@]+)@([^\ ]+)(\ HTTP/1.1)$ "
+ "/{pub}/{hash}/publisher/{pub}/pkg/$1/$2 [NE,PT,C]\n"
+ .format(**locals()))
+ context.write("RewriteRule ^/{pub}/{hash}/(.*)$ %{{DOCUMENT_ROOT}}/{pub}/{hash}/$1 [NE,L]"
+ .format(**locals()))
%>
% else:
-<% context.write("RewriteRule ^proxy:%(uri)s/(.*)$ "
- "%(uri)s/$1 [NE,P]" % locals())
+<% context.write("RewriteRule ^proxy:{uri}/(.*)$ "
+ "{uri}/$1 [NE,P]".format(**locals()))
%>
% endif
% endfor pub
@@ -463,13 +463,13 @@
</%doc>
% if uri.startswith("file:") and utype == "dir":
<%
- repo_path = "/%s" % uri.replace("file:", "").lstrip("/")
- context.write("# a file repository alias to serve %(uri)s content.\n"
- "<Directory \"%(repo_path)s\">\n"
+ repo_path = "/{0}".format(uri.replace("file:", "").lstrip("/"))
+ context.write("# a file repository alias to serve {uri} content.\n"
+ "<Directory \"{repo_path}\">\n"
" AllowOverride None\n"
" Order allow,deny\n"
" Allow from 127.0.0.1\n"
- "</Directory>\n" % locals())
+ "</Directory>\n".format(**locals()))
%>
% if cache_dir != None:
CacheDisable /${pub}/${hash}/catalog
@@ -489,7 +489,7 @@
%>
% for uri in reversed(sorted(uri_pub_map.keys())):
% if uri.startswith("http"):
-<% context.write("ProxyPass / %s retry=0" % uri) %>
+<% context.write("ProxyPass / {0} retry=0".format(uri)) %>
% endif
% endfor uri
--- a/src/util/apache2/sysrepo/sysrepo_p5p.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/apache2/sysrepo/sysrepo_p5p.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/publish/pkgdiff.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/pkgdiff.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
@@ -359,7 +359,7 @@
def product(*args, **kwds):
# product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
# product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111
- # from python 2.6 itertools
+ # from python 2.7 itertools
pools = map(tuple, args) * kwds.get('repeat', 1)
result = [[]]
for pool in pools:
--- a/src/util/publish/pkgfmt.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/pkgfmt.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/publish/pkglint.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/pkglint.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/publish/pkgmerge.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/pkgmerge.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/publish/pkgmogrify.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/pkgmogrify.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/publish/pkgsurf.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/pkgsurf.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/publish/update_file_layout.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/publish/update_file_layout.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/util/qual-simulator/Makefile Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/qual-simulator/Makefile Tue Mar 17 18:19:09 2015 -0700
@@ -19,11 +19,11 @@
# CDDL HEADER END
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+#
run: stats.py
- python2.6 scenario.py
+ python2.7 scenario.py
stats.py:
cp ../../modules/client/transport/stats.py .
--- a/src/util/qual-simulator/scenario.py Thu Mar 12 11:17:36 2015 -0700
+++ b/src/util/qual-simulator/scenario.py Tue Mar 17 18:19:09 2015 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.6
+#!/usr/bin/python2.7
#
# CDDL HEADER START
#
--- a/src/zoneproxy/Makefile.constants Thu Mar 12 11:17:36 2015 -0700
+++ b/src/zoneproxy/Makefile.constants Tue Mar 17 18:19:09 2015 -0700
@@ -19,10 +19,10 @@
# CDDL HEADER END
#
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
-INSTALL = /usr/bin/python2.6 ../../setup.py installfile
+INSTALL = /usr/bin/python2.7 ../../setup.py installfile
LINT = lint
MKDIR = mkdir -p
PROTO_AREA:sh = echo $(hg root)/proto/root_$(uname -p)