Merge lp:~nuclearbob/utah/internal-jsonschema into lp:utah
Proposed by
Max Brustkern
Status: | Merged |
---|---|
Merged at revision: | 699 |
Proposed branch: | lp:~nuclearbob/utah/internal-jsonschema |
Merge into: | lp:utah |
Diff against target: |
147 lines (+73/-22) 4 files modified
debian/control (+1/-1) debian/utah.postinst (+12/-0) debian/utah.prerm (+19/-0) utah/provisioning/provisioning.py (+41/-21) |
To merge this branch: | bzr merge lp:~nuclearbob/utah/internal-jsonschema |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Javier Collado (community) | Needs Fixing | ||
Review via email:
|
Description of the change
To address https:/
To post a comment you must log in.
I don't really like much the idea of downloading the jsonschema package from the PPA when the server is installed. However, it's true that it makes things easier when the VM has connection problems. What happens when the machine where the server is installed has connection problems is something I haven't tested.
Anyway, I have some suggestions:
- Drop code to add the PPA to the client in the latecommand (isn't going to be used after all)
- Update "debian/control" for "utah-client" to have "python-jsonschema (> 0.2)". This will prevent the client from being installed when the expected package version isn't available.
- Replace `os.listdir`:
for myfile in os.listdir( debpath) : startswith( 'python- jsonschema_ ') and
myfile. endswith( '_all.deb' )): join(debpath, myfile) normpath( debpath) isfile( debpath) : gException( 'python- jsonschema package file '
'not found in {path}\n'
.format( path=debpath) )
if (myfile.
debpath = os.path.
break
debpath = os.path.
if not os.path.
raise UTAHProvisionin
return debpath
with `glob.glob` :
from glob import glob
deb_file_glob = os.path. join(debpath, 'python- jsonschema_ *_all.deb' ) gException( 'python- jsonschema package file '
'not found in {path}\n'
.format( path=debpath) )
deb_files = glob(deb_file_glob)
if not deb_files:
raise UTAHProvisionin
deb_file = deb_files[0]
return deb_file