summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/add_binary_plugin.py5
-rw-r--r--morphlib/plugins/artifact_inspection_plugin.py7
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py5
-rw-r--r--morphlib/plugins/build_plugin.py3
-rw-r--r--morphlib/plugins/cross-bootstrap_plugin.py13
-rw-r--r--morphlib/plugins/deploy_plugin.py3
-rw-r--r--morphlib/plugins/distbuild_plugin.py4
-rw-r--r--morphlib/plugins/expand_repo_plugin.py5
-rw-r--r--morphlib/plugins/gc_plugin.py5
-rw-r--r--morphlib/plugins/graphing_plugin.py5
-rw-r--r--morphlib/plugins/list_artifacts_plugin.py6
-rw-r--r--morphlib/plugins/print_architecture_plugin.py5
-rw-r--r--morphlib/plugins/push_pull_plugin.py5
-rw-r--r--morphlib/plugins/show_dependencies_plugin.py5
-rw-r--r--morphlib/plugins/trovectl_plugin.py5
15 files changed, 33 insertions, 48 deletions
diff --git a/morphlib/plugins/add_binary_plugin.py b/morphlib/plugins/add_binary_plugin.py
index dee1d9c4..45edae4c 100644
--- a/morphlib/plugins/add_binary_plugin.py
+++ b/morphlib/plugins/add_binary_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2014 Codethink Limited
+# Copyright (C) 2014-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/artifact_inspection_plugin.py b/morphlib/plugins/artifact_inspection_plugin.py
index 2d1fe979..b16f393c 100644
--- a/morphlib/plugins/artifact_inspection_plugin.py
+++ b/morphlib/plugins/artifact_inspection_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2014 Codethink Limited
+# Copyright (C) 2012-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
@@ -163,7 +162,7 @@ class VersionGuesser(object):
version = guesser.guess_version(repo, ref, tree)
if version:
break
- except cliapp.AppException, err:
+ except cliapp.AppException as err:
self.app.status(msg='%(repo)s: Failed to list files in %(ref)s',
repo=repo, ref=ref, chatty=True)
return version
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index 76da9736..08589ea6 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012,2013,2014 Codethink Limited
+# Copyright (C) 2012-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py
index e9290b8d..2cc395fc 100644
--- a/morphlib/plugins/build_plugin.py
+++ b/morphlib/plugins/build_plugin.py
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py
index 2b5c8911..79609cb5 100644
--- a/morphlib/plugins/cross-bootstrap_plugin.py
+++ b/morphlib/plugins/cross-bootstrap_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014 Codethink Limited
+# Copyright (C) 2013-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
import logging
@@ -66,7 +65,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase):
self.unpack_sources(fs_root)
self.write_build_script(fs_root)
self.create_tarball(handle, fs_root, system_name)
- except BaseException, e:
+ except BaseException as e:
logging.error(traceback.format_exc())
self.app.status(msg='Error while building bootstrap image',
error=True)
@@ -85,7 +84,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase):
with cache.get(chunk_artifact) as chunk_file:
try:
morphlib.bins.unpack_binary_from_file(chunk_file, dest)
- except BaseException, e:
+ except BaseException as e:
self.app.status(
msg='Error unpacking binary chunk %(name)s',
name=chunk_artifact.name,
@@ -111,7 +110,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase):
chunk_script = os.path.join(path, 'src', 'build-%s' % name)
with morphlib.savefile.SaveFile(chunk_script, 'w') as f:
self.write_chunk_build_script(s, f)
- os.chmod(chunk_script, 0777)
+ os.chmod(chunk_script, 0o777)
def write_build_script(self, path):
'''Output a script to run build on the bootstrap target'''
@@ -136,7 +135,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase):
f.write('if [ -e /sbin/ldconfig ]; then /sbin/ldconfig; fi\n')
f.write(driver_footer)
- os.chmod(driver_script, 0777)
+ os.chmod(driver_script, 0o777)
def write_chunk_build_script(self, source, f):
m = source.morphology
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index 6d506a21..7635a7b4 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import json
diff --git a/morphlib/plugins/distbuild_plugin.py b/morphlib/plugins/distbuild_plugin.py
index a7d69472..ac3957f3 100644
--- a/morphlib/plugins/distbuild_plugin.py
+++ b/morphlib/plugins/distbuild_plugin.py
@@ -12,8 +12,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA..
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
@@ -180,7 +179,6 @@ class ControllerDaemon(cliapp.Plugin):
self.app.settings.string(
['initiator-step-output-dir'],
'write build output to files in DIR',
- default='.',
group=group_distbuild)
self.app.settings.string(
diff --git a/morphlib/plugins/expand_repo_plugin.py b/morphlib/plugins/expand_repo_plugin.py
index 721287ca..bbee891d 100644
--- a/morphlib/plugins/expand_repo_plugin.py
+++ b/morphlib/plugins/expand_repo_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2013,2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/gc_plugin.py b/morphlib/plugins/gc_plugin.py
index 68f386eb..71522b04 100644
--- a/morphlib/plugins/gc_plugin.py
+++ b/morphlib/plugins/gc_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014 Codethink Limited
+# Copyright (C) 2013-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
diff --git a/morphlib/plugins/graphing_plugin.py b/morphlib/plugins/graphing_plugin.py
index 57166e51..0db63ffc 100644
--- a/morphlib/plugins/graphing_plugin.py
+++ b/morphlib/plugins/graphing_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012, 2013 Codethink Limited
+# Copyright (C) 2012, 2013,2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/list_artifacts_plugin.py b/morphlib/plugins/list_artifacts_plugin.py
index 53056bad..b7a5e080 100644
--- a/morphlib/plugins/list_artifacts_plugin.py
+++ b/morphlib/plugins/list_artifacts_plugin.py
@@ -10,13 +10,13 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
# This plugin is used as part of the Baserock automated release process.
#
# See: <http://wiki.baserock.org/guides/release-process> for more information.
+from __future__ import print_function
import cliapp
import morphlib
@@ -68,7 +68,7 @@ class ListArtifactsPlugin(cliapp.Plugin):
artifact_files.update(system_artifact_files)
for artifact_file in sorted(artifact_files):
- print artifact_file
+ print(artifact_file)
def list_artifacts_for_system(self, repo, ref, system_filename):
'''List all artifact files in the build graph of a single system.'''
diff --git a/morphlib/plugins/print_architecture_plugin.py b/morphlib/plugins/print_architecture_plugin.py
index 08f500d0..264334d9 100644
--- a/morphlib/plugins/print_architecture_plugin.py
+++ b/morphlib/plugins/print_architecture_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Codethink Limited
+# Copyright (C) 2013,2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/push_pull_plugin.py b/morphlib/plugins/push_pull_plugin.py
index ddc9a8af..8546e2bf 100644
--- a/morphlib/plugins/push_pull_plugin.py
+++ b/morphlib/plugins/push_pull_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2014 Codethink Limited
+# Copyright (C) 2014-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
import logging
diff --git a/morphlib/plugins/show_dependencies_plugin.py b/morphlib/plugins/show_dependencies_plugin.py
index e70f6bfb..ee96cb40 100644
--- a/morphlib/plugins/show_dependencies_plugin.py
+++ b/morphlib/plugins/show_dependencies_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2014 Codethink Limited
+# Copyright (C) 2012-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp
diff --git a/morphlib/plugins/trovectl_plugin.py b/morphlib/plugins/trovectl_plugin.py
index 80f3b4cf..ea780b65 100644
--- a/morphlib/plugins/trovectl_plugin.py
+++ b/morphlib/plugins/trovectl_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Codethink Limited
+# Copyright (C) 2013,2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,8 +10,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
import cliapp