From: Nikos Skalkotos Date: Thu, 10 Oct 2013 09:55:33 +0000 (+0300) Subject: Merge branch 'master' into debian-precise X-Git-Tag: debian/0.5.3-1precise~1 X-Git-Url: https://code.grnet.gr/git/snf-image-creator/commitdiff_plain/69b4acee41be4a8d1695c0a9fa9a3cafdd12615a?hp=b9d5b28d5f9a00244b87907afacca8b34304801e Merge branch 'master' into debian-precise --- diff --git a/ChangeLog b/ChangeLog index 67b0dc2..8739be1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-10-09, v0.5.3 + * Fix a bug in snf-mkimage expert mode were the program could crash if + the image did not have any image properties + +2013-09-09, v0.5.2 + * Fix some errors in the ci scripts + 2013-08-23, v0.5.1 * Allow more characters in the cloud name * Fix various bugs diff --git a/ci/autopkg_debian.sh b/ci/autopkg_debian.sh index 8a46c14..70eecdd 100755 --- a/ci/autopkg_debian.sh +++ b/ci/autopkg_debian.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh set -e PACKAGES_DIR=$1 diff --git a/ci/pylint.sh b/ci/pylint.sh index a200be1..fa4dae5 100755 --- a/ci/pylint.sh +++ b/ci/pylint.sh @@ -1,3 +1,3 @@ -!/bin/sh +#!/bin/sh pylint image_creator diff --git a/docs/conf.py b/docs/conf.py index 8392d22..5521dad 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,9 +50,9 @@ copyright = u'2012, 2013 GRNET S.A. All rights reserved' # built documents. # # The short X.Y version. -version = '0.5.1' +version = '0.5.3' # The full version, including alpha/beta/rc tags. -release = '0.5.1' +release = '0.5.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/usage.rst b/docs/usage.rst index 5dd73d4..fc99172 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -239,8 +239,8 @@ for more information). Creating a new image ==================== -Suppose you want to create a new Ubuntu server image. Download the installation -disk from the Internet: +Suppose your host system is a Debian Wheezy and you want to create a new Ubuntu +server image. Download the installation disk from the Internet: .. code-block:: console @@ -272,7 +272,9 @@ And install the Ubuntu system on this file: use LVM partitions. They are not supported by snf-image-creator. You will be able to boot your installed OS and make any changes you want -(e.g. install openssh-server) using the following command:: +(e.g. install openssh-server) using the following command: + +.. code-block:: console $ sudo kvm -m 1G -boot c -drive file=ubuntu.raw,format=raw,cache=none,if=virtio diff --git a/image_creator/dialog_menu.py b/image_creator/dialog_menu.py index 351f0b9..25fcb6c 100644 --- a/image_creator/dialog_menu.py +++ b/image_creator/dialog_menu.py @@ -488,6 +488,15 @@ def add_property(session): return True +def show_properties_help(session): + """Show help for image properties""" + d = session['dialog'] + + help_file = get_help_file("image_properties") + assert os.path.exists(help_file) + d.textbox(help_file, title="Image Properties", width=70, height=40) + + def modify_properties(session): """Modify an existing image property""" d = session['dialog'] @@ -497,6 +506,19 @@ def modify_properties(session): for (key, val) in session['metadata'].items(): choices.append((str(key), str(val))) + if len(choices) == 0: + code = d.yesno( + "No image properties are available. " + "Would you like to add a new one?", width=WIDTH, help_button=1) + if code == d.DIALOG_OK: + if not add_property(session): + return True + elif code == d.DIALOG_CANCEL: + return True + elif code == d.DIALOG_HELP: + show_properties_help(session) + continue + (code, choice) = d.menu( "In this menu you can edit existing image properties or add new " "ones. Be careful! Most properties have special meaning and " @@ -526,9 +548,7 @@ def modify_properties(session): elif code == d.DIALOG_EXTRA: add_property(session) elif code == 'help': - help_file = get_help_file("image_properties") - assert os.path.exists(help_file) - d.textbox(help_file, title="Image Properties", width=70, height=40) + show_properties_help(session) def delete_properties(session): @@ -539,6 +559,11 @@ def delete_properties(session): for (key, val) in session['metadata'].items(): choices.append((key, "%s" % val, 0)) + if len(choices) == 0: + d.msgbox("No available images properties to delete!", + width=SMALL_WIDTH) + return True + (code, to_delete) = d.checklist("Choose which properties to delete:", choices=choices, width=WIDTH) to_delete = map(lambda x: x.strip('"'), to_delete) # needed for OpenSUSE diff --git a/image_creator/version.py b/image_creator/version.py index 59db0cb..351ff30 100644 --- a/image_creator/version.py +++ b/image_creator/version.py @@ -1,7 +1,8 @@ -__version__ = "0.5.1" -__version_info__ = ['0', '5', '1'] + +__version__ = "0.5.3" __version_vcs_info__ = { - 'branch': 'hotfix-0.5.1', - 'revid': 'b25b422', - 'revno': 393} -__version_user_info__ = "skalkoto@darkstar.admin.grnet.gr" + 'branch': 'hotfix-0.5.3', + 'revid': 'dc0ecb2', + 'revno': 402} +__version_user_email__ = "skalkoto@grnet.gr" +__version_user_name__ = "Nikos Skalkotos" diff --git a/version b/version index 4b9fcbe..be14282 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.5.1 +0.5.3