[Libguestfs] [supermin PATCH] rebuild the output it when SUPERMIN_KERNEL or SUPERMIN_MODULES are defined
Pino Toscano
ptoscano at redhat.com
Mon Mar 4 12:17:26 UTC 2019
On Monday, 4 March 2019 12:18:58 CET Masayoshi Mizuma wrote:
> SUPERMIN_KERNEL and SUPERMIN_MODULES don't work to guestfish.
>
> Since guestfish sets --if-newer parameter to supermin, so the environment
> variables are not used under the following conditions.
> - the output directory exists and,
> - the dates of both input files and package database are
> older than the output
>
> To solve that, rebuild the output it when SUPERMIN_KERNEL or
> SUPERMIN_MODULES are defined even if --if-newer is set.
>
> Signed-off-by: Masayoshi Mizuma <msys.mizuma at gmail.com>
> ---
This approach switches from one side of the situation
(= SUPERMIN_KERNEL and SUPERMIN_MODULES are not taken into account by
--if-newer) to the very opposite side (= setting them always rebuild
the appliance). I do not think this is a good idea, since the current
situation is easy to workaround (`rm -rf $(guestfish get-cachedir)`),
while using a different kernel will always rebuild the appliance after
this change (and thus slow every run down).
What is the goal here? Make sure that --if-newer actually rebuilds an
appliance when changing the values of SUPERMIN_KERNEL and
SUPERMIN_MODULES (even setting/unsetting them)?
I agree that supermin ought to do better in --if-newer checks: for
example, removing any of the files of a ext2 appliance (e.g. "root",
or "kernel") will not make --if-newer rebuild the appliance.
Maybe a better idea could be to record files/timestamps for appliances,
so supermin can easily check what's missing/older.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190304/9890e380/attachment.sig>
More information about the Libguestfs
mailing list