Merge lp:~gandelman-a/ubuntu/oneiric/cobbler/lp850892 into lp:ubuntu/oneiric/cobbler
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 48 | ||||
Proposed branch: | lp:~gandelman-a/ubuntu/oneiric/cobbler/lp850892 | ||||
Merge into: | lp:ubuntu/oneiric/cobbler | ||||
Diff against target: |
98 lines (+46/-7) 2 files modified
debian/changelog (+8/-0) debian/cobbler-ubuntu-import (+38/-7) |
||||
To merge this branch: | bzr merge lp:~gandelman-a/ubuntu/oneiric/cobbler/lp850892 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+75650@code.launchpad.net |
Description of the change
Adds some functionality to be used by orchestra-
--update-check: Compares the md5 checksum of the local ISO with what is on the mirror, as reported in the corresponding server-side MD5SUMS file (ie, http://
--remove: If they exist, removes the ISO and/or corresponding cobbler profile from the server in preparation of a resync. Removing the profile is necessary as cobbler will not re-import the ISO if the profile name already exists and does not offer the ability to update a profile/
For a look at how it can be used on the Orchestra side, see: lp:~gandelman-a/ubuntu/oneiric/orchestra/lp850892 Remove
Overall this looks good. Some minor nit picks:
- if (cobbler distro list | grep -qs " $rel-$arch"); then
you dont' need a subshell there. Ie, no reason for the "()"
- md5sum_ local=` md5sum $ISO_DIR/$iso | awk '{ print $1 }'` local=$ (md5sum "$ISO_DIR/$iso") && md5sum_ local=" ${md5sum_ local% *}" && [ -n "${md5sum_local}" || fail "failed to checksum"
does not check for failure. maybe try:
md5sum_
- md5sum_remote=`cat $TEMP_D/MD5SUMS | grep '\./netboot/ mini.iso' | awk '{ print $1 }'` remote= $(awk '$2 == "./netboot/ mini.iso" { print $1 }) && [ -n "$md5sum_remote" ] || fail "failed to get remote sum"
that is a "pointless use of cat"
try:
md5sum_
- probably should exit with a known exit value if "out of date" ratehr than just using "fail"
100 + [ $md5sum_local != $md5sum_remote ] && exit 0
101 + error "$ISO_DIR/$iso up to date."
102 + exit 3
- did you think about trying to fix bug 850880 also ?
I like the use of the MD5SUMS file, that might help us. I'd say you can just check the -updates first, and if its not there, try the release pocket.