X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fplugins%2Frwpkgmgr%2Frift%2Ftasklets%2Frwpkgmgr%2Fdownloader%2Fcopy.py;fp=rwlaunchpad%2Fplugins%2Frwpkgmgr%2Frift%2Ftasklets%2Frwpkgmgr%2Fdownloader%2Fcopy.py;h=c64a3f597257c9545bab951ba5323cab9fd06eba;hb=a098b5d74a528a270d262c0428aba8a0c39992a2;hp=c296c91d4603465fe9d76c343184afc59333d798;hpb=4d9ba7d4cb29b14eba43cf0fc9d258e0690a622e;p=osm%2FSO.git diff --git a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/copy.py b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/copy.py index c296c91d..c64a3f59 100644 --- a/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/copy.py +++ b/rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/copy.py @@ -33,6 +33,8 @@ from gi.repository import ( RwPkgMgmtYang ) +import rift.package.icon as icon + class PackageCopyError(Exception): pass @@ -136,6 +138,19 @@ class PackageFileCopier: format(src=src_path, dest=self.dest_copy_path)) shutil.copytree(src_path, self.dest_copy_path) + # If there are icon files, also need to copy them in UI location + if os.path.exists(os.path.join(src_path, "icons")): + src_icon_path = os.path.join( + icon.PackageIconExtractor.DEFAULT_INSTALL_DIR, + self.package_type, + self.src_package_id) + dest_icon_path = os.path.join( + os.path.dirname(src_icon_path), + self.dest_package_id) + + self.log.debug("Copying UI icon location from {} to {}".format(src_icon_path, + dest_icon_path)) + shutil.copytree(src_icon_path, dest_icon_path) def _create_descriptor_file(self): """ Update descriptor file for the newly copied descriptor catalog.