Deb.pm : do not die if the uncompress fails 80/197880/1
authorMichael Schroeder <mls@suse.de>
Fri, 2 Mar 2018 14:35:05 +0000 (15:35 +0100)
committerYonghee Han <onstudy@samsung.com>
Thu, 17 Jan 2019 01:40:41 +0000 (10:40 +0900)
Change-Id: Idbf112c9ca7a4b99e3c42203bf3e08321d05da36

Build/Deb.pm

index 7955cf6..3d72088 100644 (file)
@@ -196,7 +196,10 @@ sub uncompress {
   close(TMP);
   $data = '';
   1 while sysread(TMP2, $data, 1024, length($data)) > 0;
-  close(TMP2) || die("$tool error\n");
+  if (!close(TMP2)) {
+    warn("$tool error: $?\n");
+    return undef;
+  }
   return $data;
 }