Deb.pm : do not die if the uncompress fails
authorMichael Schroeder <mls@suse.de>
Fri, 2 Mar 2018 14:35:05 +0000 (15:35 +0100)
committerjingui.ren <jingui.ren@samsung.com>
Fri, 25 Jan 2019 06:33:58 +0000 (14:33 +0800)
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;
 }