SHA256
1
0
forked from pool/supermin
supermin/001-Improved-debugging-of-the-supermin-if-newer-calculation.patch
Charles Arnold 4a80d0a52d - Update to version 5.3.3
* initrd: Support ztd-compressed modules
  * pacman: Recognise Artix, an Arch derivative
  * Add a separate variable to store link flags, and use that to
    supply
  * Add appropriate globs for arm based kernels. The file names end
    in -arm64 but the architecture is named aarch64.
  * Add support for OCaml 5.0
  * Add LFS support for fts functions
  * Numerous bug fixes
- Upstream bug fixes and features
  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
- Dropped initrd_support_ztd-compressed_modules.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=84
2024-01-04 20:05:17 +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