SHA256
1
0
forked from pool/supermin
supermin/001-Improved-debugging-of-the-supermin-if-newer-calculation.patch
Charles Arnold 37af610807 - Update to version 5.3.4 (jsc#PED-6305)
* Add support for OCaml 5
  * Add kylinsecos support
  * rpm: Detect dnf5 and omit missing options
  * ocamlc: Use -output-complete-exe instead of -custom
  * Fix kernel filtering for aarch64 architecture
  * Uncompress kernel on RISC-V
- Drop patches contained in new tarball
  001-Improved-debugging-of-the-supermin-if-newer-calculation.patch
  002-Fix-if-newer-copy-kernel.patch
  003-Fix-kernel-filtering-for-aarch64-architecture.patch
  004-Use-output-complete-exe-instead-of-custom.patch
  005-Only-supply-output-complete-exe-to-final-link.patch
  006-Rename-function-file-kernel.patch
  007-Uncompress-kernel-on-RISC-V.patch
  008-Fix-link-to-renamed-kernel-documentation.patch
  009-New-mailing-list-email-address.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=90
2024-07-10 21:39:40 +00:00

48 lines
1.8 KiB
Diff

Subject: src: Improved debugging of the supermin if-newer calculation
From: Richard W.M. Jones rjones@redhat.com Mon Jun 12 12:51:56 2023 +0100
Date: Mon Jun 12 12:57:32 2023 +0100:
Git: 8dd37da1b5979842b0db44b44655eeaf621f7ac9
Also I expanded the code to make it easier to read. There is no
change to the calculation intended.
--- a/src/supermin.ml
+++ b/src/supermin.ml
@@ -239,10 +239,33 @@ appliance automatically.
try
let outputs = Mode_build.get_outputs args inputs in
let outputs = List.map ((//) outputdir) outputs in
- let odates = List.map (fun d -> (lstat d).st_mtime) (outputdir :: outputs) in
- let idates = List.map (fun d -> (lstat d).st_mtime) inputs in
+ let outputs = outputdir :: outputs in
+ let odates = List.map (fun f -> (lstat f).st_mtime) outputs in
+ if debug >= 2 then (
+ List.iter (
+ fun f ->
+ printf "supermin: if-newer: output %s => %.2f\n"
+ f (lstat f).st_mtime
+ ) outputs;
+ );
+ let idates = List.map (fun f -> (lstat f).st_mtime) inputs in
+ if debug >= 2 then (
+ List.iter (
+ fun f ->
+ printf "supermin: if-newer: input %s => %.2f\n"
+ f (lstat f).st_mtime
+ ) inputs;
+ );
let pdate = (get_package_handler ()).ph_get_package_database_mtime () in
- if List.for_all (fun idate -> List.for_all (fun odate -> idate < odate) odates) (pdate :: idates) then (
+ if debug >= 2 then (
+ printf "supermin: if-newer: package database date: %.2f\n" pdate;
+ );
+ let older =
+ List.for_all (
+ fun idate ->
+ List.for_all (fun odate -> idate < odate) odates
+ ) (pdate :: idates) in
+ if older then (
if debug >= 1 then
printf "supermin: if-newer: output does not need rebuilding\n%!";
exit 0