Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 354893 - mergeme() -> stat.S_ISREG() rewrite
Summary: mergeme() -> stat.S_ISREG() rewrite
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 17:05 UTC by Jonas Bernoulli
Modified: 2022-07-28 04:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
rebased onto master (0001-cleanup-real-file-part-of-mergeme.patch,5.19 KB, patch)
2011-02-14 17:09 UTC, Jonas Bernoulli
Details | Diff
rebases patch, fix typo, behave like old code (0001-cleanup-real-file-part-of-mergeme.patch,5.15 KB, patch)
2011-04-11 10:11 UTC, Jonas Bernoulli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Bernoulli 2011-02-14 17:05:01 UTC
The original code is unnecessarily complicated. I believe my cleanup preserves functionality (one exception below) and is much easier to read.

I have proposed this patch a long time ago in #275237 (which was about a different issue but in the same section of the code). In that thread you said that I would rebase and submit again - here we go.

You also mentioned that you found a bug in the patch - I don't see it, what is it?

The one thing that changes with my patch is that it does only abort when an attempt to replace a directory with a file is made if the file/dir is config protected, otherwise it silently replaces the directory.

Reproducible: Always
Comment 1 Jonas Bernoulli 2011-02-14 17:09:54 UTC
Created attachment 262495 [details, diff]
rebased onto master
Comment 2 Jonas Bernoulli 2011-04-11 10:11:24 UTC
Created attachment 269457 [details, diff]
rebases patch, fix typo, behave like old code

rebased onto master again

This also fixes a typo and more importantly it now behave like the original code when a directory on the livefs blocks the merge of a regular file. Previously it did ignore that conflict if that path was not config-protected (and then failed elsewhere).
Comment 3 Jonas Bernoulli 2011-04-11 10:12:36 UTC
In other words it should now be functionally identical to the code it replaces. But prettier.