commit:     cfd9f3f0404505fcff8bdd960f4f938290636a94
Author:     Fabio Rossi <rossi.f <AT> inwind <DOT> it>
AuthorDate: Sun Dec 13 18:24:28 2015 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 20:00:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfd9f3f0

vmware-bundle.eclass: skip empty files

Required for >=app-emulation/vmware-workstation-12.

 eclass/vmware-bundle.eclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eclass/vmware-bundle.eclass b/eclass/vmware-bundle.eclass
index 6a897bb..41f4696 100644
--- a/eclass/vmware-bundle.eclass
+++ b/eclass/vmware-bundle.eclass
@@ -75,8 +75,10 @@ vmware-bundle_extract-component() {
                                echo -n '.'
                                file_path="${dest}/${file_path}"
                                mkdir -p "$(dirname "${file_path}")" || die
-                               tail 
-c+$((offset+component_dataOffset+file_offset+1)) "${component}" 2> /dev/null |
-                                       head -c$((file_compressedSize)) | gzip 
-cd > "${file_path}" || die
+                               if [[ ${file_compressedSize} -gt 0 ]] ; then
+                                       tail 
-c+$((offset+component_dataOffset+file_offset+1)) "${component}" 2> /dev/null |
+                                               head -c$((file_compressedSize)) 
| gzip -cd > "${file_path}" || die
+                               fi
                        fi
                done
        echo

Reply via email to