On Mon, Mar 04, 2019 at 01:17:26PM +0100, Pino Toscano wrote:
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(a)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).
Thanks. I didn't know the workaround.
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)?
Yes, that is my goal.
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.
It's great idea, thanks!
I'll try to implement that.
- Masa