summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Fenn <fennm@deshawresearch.com>2014-11-06 14:05:42 -0500
committerMichael Fenn <fennm@deshawresearch.com>2014-11-06 15:06:34 -0500
commitdccd33a479c0ff14d90d2939534f91964e1a393c (patch)
tree3ddbe3b32f0f1b00ce78d9194df7e3b98c9a1f1e
parent84ba7561d9450d05b0dd99b69c16437b29100704 (diff)
downloadbcfg2-dccd33a479c0ff14d90d2939534f91964e1a393c.tar.gz
bcfg2-dccd33a479c0ff14d90d2939534f91964e1a393c.tar.bz2
bcfg2-dccd33a479c0ff14d90d2939534f91964e1a393c.zip
SYSV: change instances of simplename to simplefile
This is to better match the schema since simplefile already exists. The previous simplename attribute would fail validation. Since pkgmgr already helpfully constructs url for you if simplefile exists, the tool no longer needs to do the concatenation itself. Given the low usage rate of SYSV.py and that the original functionality was introduced in a late 1.3 release, changing the name w/o providing backwards compatiblity seems reasonable.
-rw-r--r--doc/client/tools.txt4
-rw-r--r--src/lib/Bcfg2/Client/Tools/SYSV.py11
2 files changed, 7 insertions, 8 deletions
diff --git a/doc/client/tools.txt b/doc/client/tools.txt
index ce8732454..26841ab11 100644
--- a/doc/client/tools.txt
+++ b/doc/client/tools.txt
@@ -158,14 +158,14 @@ Handles `System V Packaging <http://docs.oracle.com/cd/E19683-01/806-7008/index.
.. note::
- If the Packages specified in the PackageList are datastream format packages distributed via HTTP, you must specify a simplename attribute. Such packages will be downloaded and installed from a local path.
+ If the Packages specified in the PackageList are datastream format packages distributed via HTTP, you must specify a simplefile attribute. Such packages will be downloaded and installed from a local path.
datastream format over HTTP:
.. code-block:: xml
<PackageList url='http://install/packages' type='sysv' priority='0'>
- <Package name='SCbcfg2' version='1.3.4' simplename='bcfg-1.3.4-1' />
+ <Package name='SCbcfg2' version='1.3.4' simplefile='bcfg-1.3.4-1' />
</PackageList>
File system format over NFS or local path:
diff --git a/src/lib/Bcfg2/Client/Tools/SYSV.py b/src/lib/Bcfg2/Client/Tools/SYSV.py
index a29b49efa..27c3d3785 100644
--- a/src/lib/Bcfg2/Client/Tools/SYSV.py
+++ b/src/lib/Bcfg2/Client/Tools/SYSV.py
@@ -52,18 +52,17 @@ class SYSV(Bcfg2.Client.Tools.PkgTool):
self.origpkgtool = self.pkgtool
def pkgmogrify(self, packages):
- """ Take a list of pkg objects, check for a 'simplename' attribute.
+ """ Take a list of pkg objects, check for a 'simplefile' attribute.
If present, insert a _sysv_pkg_path attribute to the package and
download the datastream format SYSV package to a temporary file.
"""
for pkg in packages:
- if pkg.get('simplename'):
+ if pkg.get('simplefile'):
tmpfile = tempfile.NamedTemporaryFile()
self.tmpfiles.append(tmpfile)
- self.logger.info("Downloading %s%s to %s" % (pkg.get('url'),
- pkg.get('simplename'), tmpfile.name))
- urlretrieve("%s/%s" % (pkg.get('url'), pkg.get('simplename')),
- tmpfile.name)
+ self.logger.info("Downloading %s to %s" % (pkg.get('url'),
+ tmpfile.name))
+ urlretrieve(pkg.get('url'), tmpfile.name)
pkg.set('_sysv_pkg_path', tmpfile.name)
def _get_package_command(self, packages):