~smoser/+junk/xinstall

« back to all changes in this revision

Viewing changes to files/installer

  • Committer: Scott Moser
  • Date: 2013-04-25 00:51:52 UTC
  • Revision ID: smoser@ubuntu.com-20130425005152-ib2vyrtsk9xvxmpc
files/installer: loosen input match to find root tarballs, catch error

the implementation in maas was passing urls where the root
tarball was named 'root.tar.gz' (not {name}-root.tar.gz).
And thus was getting read as a uec image tarball.

This also catches a missing error condition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
                        { error "failed file of $out"; return 1; }
375
375
                case "${src##*/}@$out" in
376
376
                        *@*QEMU\ QCOW*) format="qcow-disk";;
377
 
                        *-root.tar.gz@*gzip\ compressed*) format="tar-rootfs";;
 
377
                        *root.tar.gz@*gzip\ compressed*) format="tar-rootfs";;
378
378
                        *.tar.gz@*gzip\ compressed*) format="tar-uec-image";;
379
379
                        *) 
380
380
                                error "cannot determine format of ${src} [${out}]"
392
392
 
393
393
        local rootpart="${target}1"
394
394
        mount_callback "$rootpart" "${TEMP_D}/mp" finalize_target \
395
 
                "${TEMP_D}/mp" "$target" "$selections" "$apt_proxy"
 
395
                "${TEMP_D}/mp" "$target" "$selections" "$apt_proxy" ||
 
396
                { error "failed to mount '${rootpart}' -> ${TEMP_D}/mp"; return 1; }
396
397
 
397
398
        if [ -n "$finished_url" ]; then
398
399
                debug 1 "marking finished via $finished_url"