Răsfoiți Sursa

fix(bundler): debian package `Installed-Size` value (#1735)

Lucas Fernandes Nogueira 4 ani în urmă
părinte
comite
8e0d4f666c

+ 5 - 0
.changes/bundle-deb-installed-size.md

@@ -0,0 +1,5 @@
+---
+"tauri-bundler": patch
+---
+
+Fixes the `Installed-Size` value on the debian package.

+ 6 - 1
tooling/bundler/src/bundle/linux/debian.rs

@@ -255,7 +255,12 @@ fn generate_control_file(
   )?;
   writeln!(&mut file, "Version: {}", settings.version_string())?;
   writeln!(&mut file, "Architecture: {}", arch)?;
-  writeln!(&mut file, "Installed-Size: {}", total_dir_size(data_dir)?)?;
+  // Installed-Size must be divided by 1024, see https://www.debian.org/doc/debian-policy/ch-controlfields.html#installed-size
+  writeln!(
+    &mut file,
+    "Installed-Size: {}",
+    total_dir_size(data_dir)? / 1024
+  )?;
   let authors = settings
     .authors_comma_separated()
     .unwrap_or_else(String::new);