[Rpm-maint] [PATCH] Move vsflags calculation from rpmInstall and rpmErase to rpmSetVSFlags

Panu Matilainen pmatilai at redhat.com
Tue Feb 10 08:10:55 UTC 2009


On Mon, 19 Jan 2009, Rakesh Pandit wrote:

> This patch moves vsflags calculations from rpmInstall and rpmErase to
> new local function rpmSetVSFlags
>
> Comments and suggestions  ?
>
> Link: http://rakesh.fedorapeople.org/misc/0001--Move-vsflags-calculation-from-rpmInstall-and-rpmEra.patch
> -- 
> rakesh
>
> diff --git a/lib/rpminstall.c b/lib/rpminstall.c
> index 72b9858..7e72458 100644
> --- a/lib/rpminstall.c
> +++ b/lib/rpminstall.c
> @@ -71,6 +71,25 @@ static void printHash(const rpm_loff_t amount,
> const rpm_loff_t total)
>     }
> }
>
> +rpmVSFlags rpmSetVSFlags(struct rpmInstallArguments_s * ia)

Should be static - but ok your later patch changes it that way.

> +{
> +    rpmVSFlags vsflags;
> +
> +    if (ia->cliInterfaceFlags & (RPMCLI_UPGRADE | RPMCLI_ERASE))
> +	vsflags = rpmExpandNumeric("%{?_vsflags_erase}");
> +    else
> +	vsflags = rpmExpandNumeric("%{?_vsflags_install}");

Nothing wrong here, just a side note: having separate _vsflags_erase and 
_vsflags_install is pretty much meaningless, _vsflags_erase gets used for 
practically everything. What might be somewhat useful is having different 
verify flags used for rpmdb and package files (you probably "trust" the 
rpmdb contents so might want to skip signature checks on rpmdb headers 
but for external packages you always want full checks) in the same 
operation, but the vsflags can't express that as it is.


 	- Panu -


More information about the Rpm-maint mailing list