[Rpm-maint] Remove not used RPMGI_TSADD and RPMGI_TSORDER.

Rakesh Pandit rakesh.pandit at gmail.com
Thu Jun 25 07:13:29 UTC 2009


2009/6/3 Panu Matilainen wrote:
> On Fri, 24 Apr 2009, Rakesh Pandit wrote:
>
[..]
>> - { "transaction", 'T', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
>> &giFlags, (RPMGI_TSADD|RPMGI_TSORDER),
>> + { "transaction", 'T', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, 0,
>>        N_("create transaction set"), NULL},
>> - { "noorder", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &giFlags,
>> RPMGI_TSORDER,
>> + { "noorder", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, 0,
>>        N_("do not order transaction set"), NULL},
>
> If we're to remove these, then remove the popt options for them too,
> entirely. This actually points out another flaw: the --noorder query option
> clobbers the install option of same name now that install, erase, query etc
> are all lumped into same binary again. No wonder I've had this feeling
> --noorder has been broken for some time...
>
> The "use case" for --transaction is that it gives a way to easily see how a
> transaction would be ordered for a given package set. Nice for debugging
> ordering issues but worth the hackery ... I dunno.
>

So, I have removed transaction and kept order as it is for now. Will
hack on it to fix the ordering on "real tansaction" some time.

> Just for giggles, attached is a patch that eliminates the
> rpmtsAddInstallElement() "save header" hack and makes the gi "transaction"
> behave more like a real transaction does: load headers from package files as
> we walk the transaction set. It's slower of course due to opening every
> package twice, but runs in half the memory and with current HEAD it runs
> roughly in half the time of any released version anyway thanks to other
> improvements.
>

Thanks, indeed :) Will hack a bit more on it.

[..]
>> typedef enum rpmgiFlags_e {
>>    RPMGI_NONE          = 0,
>> -    RPMGI_TSADD                = (1 << 0),
>> -    RPMGI_TSORDER      = (1 << 1),
>> -    RPMGI_NOGLOB       = (1 << 2),
>> -    RPMGI_NOMANIFEST   = (1 << 3),
>> -    RPMGI_NOHEADER     = (1 << 4)
>> +    RPMGI_NOGLOB       = (1 << 0),
>> +    RPMGI_NOMANIFEST   = (1 << 1),
>> +    RPMGI_NOHEADER     = (1 << 2)
>
>       ^^^^^^^^^^^^^^
>
> Btw there's a pointless flag if I ever saw any: for a piece of machinery
> thats supposed to be used for walking over rpm headers, I cant think of a
> case where it would make sense not to load the headers.
>

This has been removed. All of it's uses where useless except one place
where it was used to different between installed packages and binary
files. Certainly name NOHEADER is not apt for that purpose. So, I have
renamed it to RPMGI_NOBINFILE and used that for queries to
differentiate in rpmgiLoadReadHeader.

Updated: http://rakesh.fedorapeople.org/rpm/0001-Remove-not-used-RPMGI_TSADD-RPMGI_TSORDER-RPMGI_N.patch

--
Regards,
Rakesh Pandit


More information about the Rpm-maint mailing list