[pacman-dev] [PATCH] Readd some symlink checking in file conflict code

Xavier shiningxc at gmail.com
Fri Jul 17 09:10:16 EDT 2009


On Fri, Jul 25, 2008 at 2:11 PM, Nagy Gabor<ngaba at bibl.u-szeged.hu> wrote:
>> > If you want to restore our old negligent "eye-candy" behaviour, you
>> > can do the following (pseudo-code):
>> > if(isdir(local_conflicting_stuff) &&
>> > alpm_list_find_str(oldpkg->files,local_conflicting_stuff) {
>> >        continue; /*no conflict*/
>> > }
>> >
>>
>> I would say go ahead with the current code for the 3.2 release. If it
>> turns out to be really problematic, we can always use the above code
>> for 3.2.1.
>> (again, it is a matter of choosing which case is more important
>> between fileconflict003 and fileconflict004)
>>
>
> I might have not clear, I also vote for this (I just said above, that
> forget that ugly i-node hack part.) I tell you why:
> The current 3.2 code is _safer_. With the old one, we had a failing
> fileconflict005.py pactest (maybe we should put it to git), which is
> problematic, because your installed package will be broken.
> Currently the code is "too safe", this is the problem, but this causes
> just "annoyance" and can be fixed with -Sf.
>

I am not sure what to do.
It seems the situation of fileconflict004 happens regularly, see for example :
http://www.archlinux.org/news/444/
And I believe there were also other cases since 3.2 was released.

So maybe we should implement the pseudo-code that Nagy proposed above.
I have a simple patch locally which works.

Then fileconflict005 fails, but this is probably a less common
situation. And pacman will just fail to detect the file conflict, and
skip the extraction of a file or a symlink (because a non-empty
directory exists).
Though, I don't understand why pacman shows an error in case of a
file, and nothing (only a debug message) in case of a symlink (case of
fileconflict005). So I would suggest displaying an error in case of a
symlink as well, to have an output as follows:

checking package integrity...
checking for file conflicts...
upgrading pkg1...
error: extract: skipping symlink extraction of test
error: problem occurred while upgrading pkg1


More information about the pacman-dev mailing list