Merge branch 'master' into debian-precise
authorNikos Skalkotos <skalkoto@grnet.gr>
Thu, 10 Oct 2013 09:55:33 +0000 (12:55 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Thu, 10 Oct 2013 09:55:33 +0000 (12:55 +0300)
ChangeLog
ci/autopkg_debian.sh
ci/pylint.sh
docs/conf.py
docs/usage.rst
image_creator/dialog_menu.py
image_creator/version.py
version

index 67b0dc2..8739be1 100644 (file)
--- 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
index 8a46c14..70eecdd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/bin/sh
 set -e
 
 PACKAGES_DIR=$1
index a200be1..fa4dae5 100755 (executable)
@@ -1,3 +1,3 @@
-!/bin/sh
+#!/bin/sh
 
 pylint image_creator
index 8392d22..5521dad 100644 (file)
@@ -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.
index 5dd73d4..fc99172 100644 (file)
@@ -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
 
index 351f0b9..25fcb6c 100644 (file)
@@ -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
index 59db0cb..351ff30 100644 (file)
@@ -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 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.5.1
+0.5.3