)]}'
{"bin/disk-image-create":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"964aeae99adc65c306764a56c45616e9c45d63e6","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"# Check for required tools early on"},{"line_number":164,"context_line":"for X in ${!IMAGE_TYPES[@]}; do"},{"line_number":165,"context_line":"    case \"${IMAGE_TYPES[$X]}\" in"},{"line_number":166,"context_line":"        qcow2)"},{"line_number":167,"context_line":"            if [ -z \"$(which qemu-img)\" ]; then"},{"line_number":168,"context_line":"                echo \"qcow2 output format specified but qemu-img executable not found.\""}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da9b358b_cdd3ba37","line":165,"updated":"2015-03-30 21:07:28.000000000","message":"You could just iterate over the array values and make the case statement a little simpler. But this is functional.","commit_id":"222fb22982694c2c2cc378966d70dd93d81db44b"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"ca7c87d3ec31db5bf012dc89ab92d6bff6d1bec9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    echo"},{"line_number":82,"context_line":"    echo \"NOTE: If using the VHD output format you need to have a patched version of vhd-util installed for the image\""},{"line_number":83,"context_line":"    echo \"      to be bootable. The patch is available here: https://github.com/emonty/vhd-util/blob/master/debian/patches/citrix\""},{"line_number":84,"context_line":"    echo \"      and a PPA with the patched tool is available here: https://launchpad.net/~openstack-ci-core/+archive/ubuntu/vhd-util\""},{"line_number":85,"context_line":"    echo"},{"line_number":86,"context_line":"    echo \"Examples:\""},{"line_number":87,"context_line":"    if [ \"$IS_RAMDISK\" \u003d\u003d \"0\" ]; then"}],"source_content_type":"application/x-shellscript","patch_set":14,"id":"7aaa499b_7f7219e7","line":84,"updated":"2015-04-13 17:29:56.000000000","message":"I am a little concerned at the length of these lines. Perhaps we could put the URLs on their own lines, indented? #notaminusone","commit_id":"5b7bae8803b89e2b92cf115e67962a047fe401eb"}],"lib/img-functions":[{"author":{"_account_id":6449,"name":"Chris Jones","email":"cmsj@tenshu.net","username":"cmsj"},"change_message_id":"cb4388c98d600211e5998b214d12bf9b8460670e","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        OUT_IMAGE_PATH\u003d$1-new"},{"line_number":123,"context_line":"    elif [ \"$IMAGE_TYPE\" \u003d\u003d \"vhd\" ]; then"},{"line_number":124,"context_line":"        vhd-util convert -s 0 -t 1 -i $TMP_IMAGE_PATH -o $1-new"},{"line_number":125,"context_line":"        vhd-util convert -s 1 -t 2 -i $TMP_IMAGE_PATH -o $1-new"},{"line_number":126,"context_line":"    else"},{"line_number":127,"context_line":"        echo \"Invalid image type for compress_and_save. Must be qcow2 or vhd.\""},{"line_number":128,"context_line":"        false"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"9a80dd14_de2eaf42","line":125,"updated":"2015-03-06 17:58:25.000000000","message":"Shouldn\u0027t these be converting $TMP_IMAGE_PATH to an intermediate file in the first command, then from the intermediate file to $1-new in the second command?","commit_id":"2ed57f8e69afd6f8c2ec2601942cd5296634d773"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"fbf37ca944c479cd8f4c118fddef25f27475b574","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"},{"line_number":126,"context_line":"        rm $1-intermediate"},{"line_number":127,"context_line":"    else"},{"line_number":128,"context_line":"        echo \"Invalid image type for compress_and_save. Must be qcow2 or vhd.\""},{"line_number":129,"context_line":"        false"},{"line_number":130,"context_line":"    fi"},{"line_number":131,"context_line":"    finish_image $1"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"9a80dd14_73bbe7e4","line":128,"updated":"2015-03-20 23:24:47.000000000","message":"I think you can take out \"for compress_and_save\". This is a message for the user, who doesn\u0027t know what that means.","commit_id":"87178b57396663b0ed922ade1755bc3cc5b54640"},{"author":{"_account_id":12320,"name":"Pino Toscano","email":"ptoscano@redhat.com","username":"ptoscano"},"change_message_id":"1bdda33de0c5e1d216359fd90dc28731c5049c19","unresolved":false,"context_lines":[{"line_number":110,"context_line":"function compress_and_save_image () {"},{"line_number":111,"context_line":"    # Recreate our image to throw away unnecessary data"},{"line_number":112,"context_line":"    test $IMAGE_TYPE !\u003d qcow2 \u0026\u0026 COMPRESS_IMAGE\u003d\"\""},{"line_number":113,"context_line":"    if [ \"$IMAGE_TYPE\" \u003d\u003d \"qcow2\" ]; then"},{"line_number":114,"context_line":"        if [ -n \"$QEMU_IMG_OPTIONS\" ]; then"},{"line_number":115,"context_line":"            EXTRA_OPTIONS\u003d\"-o $QEMU_IMG_OPTIONS\""},{"line_number":116,"context_line":"        else"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"1a6ced46_efd7bfbd","line":113,"updated":"2015-03-23 10:06:03.000000000","message":"What about a swtich case, like\n\n case \"${IMAGE_TYPE}\" in\n    qcow2) ...\n    vhd) ...\n esac\n\nas already done in disk-image-create in this change request?","commit_id":"f96bdf336925ecc7f3f33e3e00ea7f13fc349e42"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"9b74795b5d06ee36d12aa5063ad5b5586f475aa5","unresolved":false,"context_lines":[{"line_number":110,"context_line":"function compress_and_save_image () {"},{"line_number":111,"context_line":"    # Recreate our image to throw away unnecessary data"},{"line_number":112,"context_line":"    test $IMAGE_TYPE !\u003d qcow2 \u0026\u0026 COMPRESS_IMAGE\u003d\"\""},{"line_number":113,"context_line":"    if [ \"$IMAGE_TYPE\" \u003d\u003d \"qcow2\" ]; then"},{"line_number":114,"context_line":"        if [ -n \"$QEMU_IMG_OPTIONS\" ]; then"},{"line_number":115,"context_line":"            EXTRA_OPTIONS\u003d\"-o $QEMU_IMG_OPTIONS\""},{"line_number":116,"context_line":"        else"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"1a6ced46_ac73ec4b","line":113,"in_reply_to":"1a6ced46_efd7bfbd","updated":"2015-03-24 01:36:37.000000000","message":"Yep, thats fine, if I do another iteration (past 6 since I just uploaded that) ill implement this.","commit_id":"f96bdf336925ecc7f3f33e3e00ea7f13fc349e42"},{"author":{"_account_id":12320,"name":"Pino Toscano","email":"ptoscano@redhat.com","username":"ptoscano"},"change_message_id":"747a111ad7dd286322c4cd5f8b190e656bbbe576","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    if [ \"$IMAGE_TYPE\" \u003d \"raw\" ]; then"},{"line_number":119,"context_line":"        mv $TMP_IMAGE_PATH $1-new"},{"line_number":120,"context_line":"    elif [ \"$IMAGE_TYPE\" \u003d\u003d \"vhd\" ]; then"},{"line_number":121,"context_line":"        set -x"},{"line_number":122,"context_line":"        cp $TMP_IMAGE_PATH $1-intermediate"},{"line_number":123,"context_line":"        vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate"},{"line_number":124,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da9b358b_7bd7baed","line":121,"updated":"2015-03-31 08:38:00.000000000","message":"Why set -x here...","commit_id":"222fb22982694c2c2cc378966d70dd93d81db44b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"964aeae99adc65c306764a56c45616e9c45d63e6","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    elif [ \"$IMAGE_TYPE\" \u003d\u003d \"vhd\" ]; then"},{"line_number":121,"context_line":"        set -x"},{"line_number":122,"context_line":"        cp $TMP_IMAGE_PATH $1-intermediate"},{"line_number":123,"context_line":"        vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate"},{"line_number":124,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"},{"line_number":125,"context_line":"        rm $1-intermediate.bak"},{"line_number":126,"context_line":"        OUT_IMAGE_PATH\u003d$1-new"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da9b358b_6db02ef5","line":123,"updated":"2015-03-30 21:07:28.000000000","message":"Why not set -i to $TMP_IMAGE_PATH and skip the above copy? Also will -i foo -o foo work when both input and output are the same location?\n\n-1 for this comment but not the other.","commit_id":"222fb22982694c2c2cc378966d70dd93d81db44b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"7e865888951e9176b6ed187741b93edcd47ff619","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    elif [ \"$IMAGE_TYPE\" \u003d\u003d \"vhd\" ]; then"},{"line_number":121,"context_line":"        set -x"},{"line_number":122,"context_line":"        cp $TMP_IMAGE_PATH $1-intermediate"},{"line_number":123,"context_line":"        vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate"},{"line_number":124,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"},{"line_number":125,"context_line":"        rm $1-intermediate.bak"},{"line_number":126,"context_line":"        OUT_IMAGE_PATH\u003d$1-new"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da9b358b_88dda044","line":123,"in_reply_to":"da9b358b_6db02ef5","updated":"2015-03-30 21:36:47.000000000","message":"I am told that vhd-util appears to do the correct thing here hence the rm $1-intermediate.bak below.\n\nI have asked that we use different inputs and outputs if it avoids the creation of a .bak file that needs deleting and add a comment below if it does not. That way we can understand where this random .bak file is coming from.","commit_id":"222fb22982694c2c2cc378966d70dd93d81db44b"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"f86cb72e97bc0a38a7a00ad7c750502869795245","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    elif [ \"$IMAGE_TYPE\" \u003d\u003d \"vhd\" ]; then"},{"line_number":121,"context_line":"        set -x"},{"line_number":122,"context_line":"        cp $TMP_IMAGE_PATH $1-intermediate"},{"line_number":123,"context_line":"        vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate"},{"line_number":124,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"},{"line_number":125,"context_line":"        rm $1-intermediate.bak"},{"line_number":126,"context_line":"        OUT_IMAGE_PATH\u003d$1-new"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"baa041b7_bb8699b7","line":123,"in_reply_to":"da9b358b_88dda044","updated":"2015-04-01 21:37:56.000000000","message":"The following command creates a .bak regardless of the input and output being same or different.","commit_id":"222fb22982694c2c2cc378966d70dd93d81db44b"},{"author":{"_account_id":12320,"name":"Pino Toscano","email":"ptoscano@redhat.com","username":"ptoscano"},"change_message_id":"747a111ad7dd286322c4cd5f8b190e656bbbe576","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"},{"line_number":125,"context_line":"        rm $1-intermediate.bak"},{"line_number":126,"context_line":"        OUT_IMAGE_PATH\u003d$1-new"},{"line_number":127,"context_line":"        set -x"},{"line_number":128,"context_line":"    else"},{"line_number":129,"context_line":"        echo \"Converting image using qemu-img convert\""},{"line_number":130,"context_line":"        qemu-img convert ${COMPRESS_IMAGE:+-c} -f raw $TMP_IMAGE_PATH -O $IMAGE_TYPE $EXTRA_OPTIONS $1-new"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da9b358b_1bff8e68","line":127,"updated":"2015-03-31 08:38:00.000000000","message":"... and set -x here too?","commit_id":"222fb22982694c2c2cc378966d70dd93d81db44b"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"2ff1a156ebcd677b4e031a6c53975732b5b4689d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new"},{"line_number":124,"context_line":"        # The previous command creates a .bak file"},{"line_number":125,"context_line":"        rm $1-intermediate.bak"},{"line_number":126,"context_line":"        OUT_IMAGE_PATH\u003d$1-new"},{"line_number":127,"context_line":"    else"},{"line_number":128,"context_line":"        echo \"Converting image using qemu-img convert\""},{"line_number":129,"context_line":"        qemu-img convert ${COMPRESS_IMAGE:+-c} -f raw $TMP_IMAGE_PATH -O $IMAGE_TYPE $EXTRA_OPTIONS $1-new"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"7aaa499b_96914455","line":126,"updated":"2015-04-13 23:19:03.000000000","message":"I don\u0027t think we actually need to set OUT_IMAGE_PATH here since it\u0027s set outside of this if statement below for all the image types.","commit_id":"5b7bae8803b89e2b92cf115e67962a047fe401eb"}]}
