[PATCH 0/4] Replace virFileMakePath*() with g_mkdir_with_parents()

Michal Privoznik mprivozn at redhat.com
Thu Mar 4 19:52:56 UTC 2021


On 3/4/21 6:08 PM, Ján Tomko wrote:
> On a Monday in 2021, Michal Privoznik wrote:
>> While reading through glib manual I've noticed there's
>> g_mkdir_with_parents() which does the same as our virFileMakePath() and
>> virFileMakePathWithMode().
>>
>> Michal Prívozník (4):
>>  virfile: Replace virFileMakePathHelper() with g_mkdir_with_parents()
> 
> This patch would make sense separately if the conversion had to be
> spread out over months, like we did with VIR_ALLOC. But since you delete
> the functions anyway in 4/4, consider squashing 1/4 and 4/4 together.

Frankly, sometimes I can't tell anymore what change is small enough to 
be contained in one patch (even though it may accommodate two semantic 
changes), and when it is big enough that it should be split into two 
patches. Especially if one patched makes no sense without the other.

I've done some backports onto v4.5.0 and for instance even though we 
tried to break glib rewrite into as small semantic changes as possible:

a) there were still a lot of conflicts,
b) I've ended up rewriting half of the code by hand anyway.

If easy backports are the goal we try to make changes as small as 
possible, maybe it's time we re-evaluate that. I say we rip off the band 
aid and move on.

> 
>>  lib: Replace virFileMakePathWithMode() with g_mkdir_with_parents()
>>  lib: Replace virFileMakePath() with g_mkdir_with_parents()
>>  util: Drop virFileMakePath() and virFileMakePathWithMode()
>>
> 
> Reviewed-by: Ján Tomko <jtomko at redhat.com>

Pushed, thanks.

Michal




More information about the libvir-list mailing list