Merge lp:~nuclearbob/utah/packagedir into lp:utah

Proposed by Max Brustkern
Status: Merged
Approved by: Javier Collado
Approved revision: 777
Merged at revision: 781
Proposed branch: lp:~nuclearbob/utah/packagedir
Merge into: lp:utah
Diff against target: 34 lines (+4/-2)
2 files modified
utah/config.py (+2/-0)
utah/provisioning/provisioning.py (+2/-2)
To merge this branch: bzr merge lp:~nuclearbob/utah/packagedir
Reviewer Review Type Date Requested Status
Javier Collado (community) Approve
Review via email: mp+139027@code.launchpad.net

Description of the change

This change adds a packagedir config option that can be used to pull the client and supporting packages from a different directory. It's useful for testing on a system without altering the installed version there. I've tested it as part of such a test.

To post a comment you must log in.
Revision history for this message
Javier Collado (javier.collado) wrote :

I think it's a good idea. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'utah/config.py'
--- utah/config.py 2012-12-10 13:01:20 +0000
+++ utah/config.py 2012-12-10 16:36:23 +0000
@@ -107,6 +107,8 @@
107 nfsconfigfile=os.path.join('/', 'etc', 'exports'),107 nfsconfigfile=os.path.join('/', 'etc', 'exports'),
108 # Default options for NFS shares108 # Default options for NFS shares
109 nfsoptions='*(ro,async,no_root_squash,no_subtree_check)',109 nfsoptions='*(ro,async,no_root_squash,no_subtree_check)',
110 # Directory where utah client and other needed packages reside
111 packagedir=os.path.join('/', 'usr', 'share', 'utah'),
110 # Time to wait between power off and power on for physical systems112 # Time to wait between power off and power on for physical systems
111 powertimeout=15,113 powertimeout=15,
112 # Default preseed114 # Default preseed
113115
=== modified file 'utah/provisioning/provisioning.py'
--- utah/provisioning/provisioning.py 2012-12-06 16:30:34 +0000
+++ utah/provisioning/provisioning.py 2012-12-10 16:36:23 +0000
@@ -349,7 +349,7 @@
349 raise UTAHProvisioningException("UTAH package isn't installed")349 raise UTAHProvisioningException("UTAH package isn't installed")
350350
351 basename = ('utah-' + deb + '_' + utah_version + '_all.deb')351 basename = ('utah-' + deb + '_' + utah_version + '_all.deb')
352 debpath = os.path.join('/usr', 'share', 'utah', basename)352 debpath = os.path.join(config.packagedir, basename)
353 debpath = os.path.normpath(debpath)353 debpath = os.path.normpath(debpath)
354 if not os.path.isfile(debpath):354 if not os.path.isfile(debpath):
355 raise UTAHProvisioningException('UTAH {deb} binary package file '355 raise UTAHProvisioningException('UTAH {deb} binary package file '
@@ -364,7 +364,7 @@
364 Return the path of the .deb file for the python-jsonschema installed364 Return the path of the .deb file for the python-jsonschema installed
365 as part of the main package.365 as part of the main package.
366 """366 """
367 debpath = os.path.join('/usr', 'share', 'utah')367 debpath = config.packagedir
368 deb_file_glob = os.path.join(debpath, 'python-jsonschema_*_all.deb')368 deb_file_glob = os.path.join(debpath, 'python-jsonschema_*_all.deb')
369 deb_files = glob(deb_file_glob)369 deb_files = glob(deb_file_glob)
370 if not deb_files:370 if not deb_files:

Subscribers

People subscribed via source and target branches