[Rpm-maint] [PATCH] re-factoring rpmInstall & rpmErase - merging common code & removing redundancy
Rakesh Pandit
rakesh.pandit at gmail.com
Tue Feb 10 17:48:54 UTC 2009
2009/2/10 Panu Matilainen wrote:
> On Thu, 15 Jan 2009, Rakesh Pandit wrote:
[..]
>>
>> - Merge rpmInstallInterfaceFlags_e and rpmEraseInterfaceFlags_e to
>> rpmCliInterfaceFlags_e.
>> - Renamed (UN)?INSTALL_* to RPMCLI_* and all corresponding changes in
>> different interface related files.
>
> As we've talked (outside list), finding a good name for these things seems
> to be almost the hardest part here, silly as it is. The problem with "cli"
> for these flags is that it's *too* generic.
>
> How about just merge rpmInstallInterfaceFlags_e and rpmEraseInterfaceFlags_e
> to rpmInstallFlags_e? Obviously erasing isn't installing, but it's at least
> in the ballpark.
>
Very much right.
Fixed.
>>
>> Second patch[2]:
>>
>> - Merged installInterfaceFlags and eraseInterfaceFlags into
>> cliInterfaceFlags.
>
> ..and the same here, if we just follow what query verify etc do here, just
> call it 'rpmcliInstallFlags'.
>
>> - Moved transaction part from rpmInstall and rpmErase to
>> rpmCliTransaction.
>
> I'd suggest leaving rpmCliTransaction() static for now, just to have the
> freedom of changing it's arguments if that becomes necessary later on. As
> long as rpmqv.c is using rpmInstall() and rpmErase(), rpmCliTransaction()
> doesn't need exporting.
>
Yes. Fixed.
> Oh and rpmcliTransaction() (vs rpmCli...) would be more in line with the
> other cli-related things like rpmcliQuery(), doesn't of course matter if
> static.
>
Yes, to keep consistency. Fixed.
>> Third patch [3]:
>>
>> -Remove stopinstall variable and moved rpmcliPackagesTotal to correct
>> place.
>> -Changes in rpmInstallSource for getting reused in install mode and
>> removed
>
> Looks ok to me.
Updated first two. All three are here:
http://rakesh.fedorapeople.org/misc/rpm/0001--Merge-rpmInstallInterfaceFlags_e-and-rpmEraseInterf.patch
http://rakesh.fedorapeople.org/misc/rpm/0002--Merged-installInterfaceFlags-and-eraseInterfaceFlag.patch
http://rakesh.fedorapeople.org/misc/rpm/0003--Remove-stopinstall-variable-and-moved-rpmcliPackage.patch
--
Regards,
Rakesh Pandit
More information about the Rpm-maint
mailing list