X-Git-Url: https://code.grnet.gr/git/snf-image-creator/blobdiff_plain/486ea6e0b4d9f42ca9823c6104f392b8469ef14a..fba0968870e13efbe1926fa43363aa56efd79ee4:/image_creator/os_type/ubuntu.py?ds=sidebyside diff --git a/image_creator/os_type/ubuntu.py b/image_creator/os_type/ubuntu.py index 3546648..6a048e5 100644 --- a/image_creator/os_type/ubuntu.py +++ b/image_creator/os_type/ubuntu.py @@ -1,16 +1,49 @@ -from image_creator.os_type.linux import Linux +# Copyright 2012 GRNET S.A. All rights reserved. +# +# Redistribution and use in source and binary forms, with or +# without modification, are permitted provided that the following +# conditions are met: +# +# 1. Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# 2. Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and +# documentation are those of the authors and should not be +# interpreted as representing official policies, either expressed +# or implied, of GRNET S.A. + +from image_creator.os_type.linux import Linux, sysprep class Ubuntu(Linux): - def get_metadata(self): - meta = super(Ubuntu, self).get_metadata() + def __init__(self, rootdev, ghandler, output): + super(Ubuntu, self).__init__(rootdev, ghandler, output) + apps = self.g.inspect_list_applications(self.root) for app in apps: if app['app_name'] == 'kubuntu-desktop': - meta['OS'] = 'kubuntu' - meta['description'] = \ - meta['description'].replace('Ubuntu', 'Kubuntu') + self.meta['OS'] = 'kubuntu' + descr = self.meta['DESCRIPTION'].replace('Ubuntu', 'Kubuntu') + self.meta['DESCRIPTION'] = descr break - return meta # vim: set sta sts=4 shiftwidth=4 sw=4 et ai :