File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
test/jdk/tools/jpackage/helpers/jdk/jpackage/test Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,17 @@ static long getInstalledPackageSizeKB(JPackageCommand cmd) {
229229 final Path packageFile = cmd .outputBundle ();
230230 switch (cmd .packageType ()) {
231231 case LINUX_DEB :
232- return Long .parseLong (getDebBundleProperty (packageFile ,
232+ Long estimate = Long .parseLong (getDebBundleProperty (packageFile ,
233233 "Installed-Size" ));
234+ if (estimate == 0L ) {
235+ // if the estimate in KB is 0, check if it is really empty
236+ // or just < 1KB as with AppImagePackageTest.testEmpty()
237+ if (getPackageFiles (cmd ).count () > 01L ) {
238+ // there is something there so round up to 1 KB
239+ estimate = 01L ;
240+ }
241+ }
242+ return estimate ;
234243
235244 case LINUX_RPM :
236245 String size = getRpmBundleProperty (packageFile , "Size" );
You can’t perform that action at this time.
0 commit comments