On 05/03/2011 10:51 AM, James Antill wrote:
> On Tue, 2011-05-03 at 10:22 -0400, [email protected] wrote:
>> 2) Changes the order that files are passed to the external merge tool.
>> When I merge rpm changes, I generally merge left to right. So, when
>> merging an ".rpmnew", left contains the ".rpmnew" and right contains
>> the final file. When merging an ".rpmsave", left contains
>> the .rpmsave, and right contains the final file. In all cases, final
>> file (i.e. new) is on the right and "old" file is on the left. I think
>> this makes more sense than the current order.
>
> One of us is confused, I think. It's very common to use "diff old new"
> and I think that's what you want (and it might be what the original
> author wanted too) but we get:
>
> config_noreplace
> local_file = (old) /etc/foo.conf
> pkg_file = (new) /etc/foo.conf.rpmnew
> final_file = local_file
> other_file = pkg_file
>
> config_replace
> local_file = (old) /etc/foo.conf.rpmsave
> pkg_file = (new) /etc/foo.conf
> final_file = pkg_file
> other_file = local_file
>
> ...so what we want is:
>
> diff local_file pkg_file
For config_replace, I agree that we want:
diff local_file pkg_file
so that the "new" file /etc/foo.conf is on the right.
However, for config_noreplace in my opinion we want:
diff pkg_file local_file
so that the file /etc/foo.conf is *still* on the right. In this case,
it is the meaning of "new" where there is perhaps some confusion --
the way I am interpreting "new" is that the file on the right is the
"new" file *from this point forward* i.e. the file into which changes
have to get merged. The file on the left is the "old" .rpmsave file in
which local changes are available for merging.
If you agree with my logic above, then you can simplify the above to doing
diff other_file final_file
in both cases (which is what the patch does).
Cheers,
Raman
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel