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
1=== modified file 'utah/config.py'
2--- utah/config.py 2012-12-10 13:01:20 +0000
3+++ utah/config.py 2012-12-10 16:36:23 +0000
4@@ -107,6 +107,8 @@
5 nfsconfigfile=os.path.join('/', 'etc', 'exports'),
6 # Default options for NFS shares
7 nfsoptions='*(ro,async,no_root_squash,no_subtree_check)',
8+ # Directory where utah client and other needed packages reside
9+ packagedir=os.path.join('/', 'usr', 'share', 'utah'),
10 # Time to wait between power off and power on for physical systems
11 powertimeout=15,
12 # Default preseed
13
14=== modified file 'utah/provisioning/provisioning.py'
15--- utah/provisioning/provisioning.py 2012-12-06 16:30:34 +0000
16+++ utah/provisioning/provisioning.py 2012-12-10 16:36:23 +0000
17@@ -349,7 +349,7 @@
18 raise UTAHProvisioningException("UTAH package isn't installed")
19
20 basename = ('utah-' + deb + '_' + utah_version + '_all.deb')
21- debpath = os.path.join('/usr', 'share', 'utah', basename)
22+ debpath = os.path.join(config.packagedir, basename)
23 debpath = os.path.normpath(debpath)
24 if not os.path.isfile(debpath):
25 raise UTAHProvisioningException('UTAH {deb} binary package file '
26@@ -364,7 +364,7 @@
27 Return the path of the .deb file for the python-jsonschema installed
28 as part of the main package.
29 """
30- debpath = os.path.join('/usr', 'share', 'utah')
31+ debpath = config.packagedir
32 deb_file_glob = os.path.join(debpath, 'python-jsonschema_*_all.deb')
33 deb_files = glob(deb_file_glob)
34 if not deb_files:

Subscribers

People subscribed via source and target branches