From: sinhan Date: Mon, 15 May 2017 15:50:25 +0000 (+0000) Subject: RIFT 16526 Copy the icon image also to the UI logos location for UI update. X-Git-Tag: v2.0.1~11^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d19def3ddc2bed6863dce7fa03b5c52f1dca2d91;p=osm%2FSO.git RIFT 16526 Copy the icon image also to the UI logos location for UI update. Signed-off-by: sinhan --- diff --git a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/proxy/filesystem.py b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/proxy/filesystem.py index 2acfed1b..7111092f 100644 --- a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/proxy/filesystem.py +++ b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/proxy/filesystem.py @@ -22,6 +22,7 @@ import os import rift.package.store as store import rift.package.package +import rift.package.icon as icon from .base import AbstractPackageManagerProxy @@ -101,8 +102,15 @@ class FileSystemProxy(AbstractPackageManagerProxy): path = store._get_package_dir(package_id) dest_file = os.path.join(path, package.prefix, package_path) + # Insert (by copy) the file in the package location. For icons, + # insert also in UI location for UI to pickup try: package.insert_file(new_file, dest_file, package_path, mode=mode) + + if package_file_type == 'icons': + icon_extract = icon.PackageIconExtractor(self.log) + icon_extract.extract_icons(package) + except rift.package.package.PackageAppendError as e: self.log.exception(e) return False