-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ltoize hijacks user patch mechanism #105
Comments
I believe this is a misunderstanding. Emerge will create directories and symlink as needed, but if existing patches are already present in those directories or there are other subdirectories, only the relevant directories and files will be symlinked. This behaviour is consistent on removal as well. I have a number of user patches which are not relevant to LTO that coexist fine with ltoize, for example. |
To be clear, the only restriction is that your user patch cannot be named with the same filename as an LTO patch in this repository. By convention, we use |
etc-update showed me /etc/portage/patches/dev-libs as being replaced by a symlink. I already had a patch for dev-libs/weston in there. As I understand you, portage should have accepted the existing dev-libs directory and created symlinks for the three wayland versions in there. I'm using portage-2.3.24. |
Yes, that's what it does for me at least. It only symlinks the things that don't already exist. I'm on the latest portage. |
Tried again with portage-2.3.28 and got the same result. After the merge:
And in etc-update:
The content of dev-libs is an empty patch file inside "weston": /etc/portage/patches/dev-libs/weston/lol.patch |
What happens if you allow it to proceed? |
You mean etc-update? It fails to do anything and just repeats the prompt, i.e. asks me again to replace, delete the update or merge (just like with any other file). But that was with stable portage. (I just realized that etc-update is part of the portage package.) I'll try again with ~amd64 portage. |
Just checked that portage-2.3.28 etc-update works the same and yes it does. The only option that makes etc-update not get stuck in a menu loop is |
Good to know. The nice thing about user patches is that we don't need to fork ebuilds in this repo and keep things in sync constantly. Unfortunately, the user patching mechanism isn't really extensible, so the symlink solution was chosen as a compromise. It would be nice to have a portage plugin to do this, but my time is very limited at the moment. Perhaps it would be best, for now, to mandate that out of tree LTO patches be either a) upstreamed or b) forked here until the issue is resolved upstream. |
I believe we know what the right thing™ is. But I don't feel the pressure to act now as I was able to remove the one conflicting patch directory and things just work™ now. |
An alternative: replicate the user patches functionality with |
LTO patches are now applied directly from lto-overlay, using functionality replicated directly from portage. /etc/patches is now left untouched by LTOize, and a script, 41-lto-patch.sh, is symlinked into your portage bashrc.d. You can experiment with your own LTO patches in /etc/patches as usual. Please consider submitting them upstream if you make working ones. Also, with this change, we no longer need to increment the version number with LTOize whenever new patches come in. Address #105 Signed-off-by: Shane Peelar <[email protected]>
LTO patches are now applied directly from lto-overlay, using functionality replicated directly from portage. /etc/patches is now left untouched by LTOize, and a script, 41-lto-patch.sh, is symlinked into your portage bashrc.d. You can experiment with your own LTO patches in /etc/patches as usual. Please consider submitting them upstream if you make working ones. Also, with this change, we no longer need to increment the version number with LTOize whenever new patches come in. Address #105 Signed-off-by: Shane Peelar <[email protected]>
OK -- |
Thanks, that should do the trick! |
Due to the symlinks put in place by ltoize no further user patches can be created for any of the 626 packages in dev-libs, dev-qt and www-client. Ideally the patches files themselves would be symlinked instead of parent directories.
The text was updated successfully, but these errors were encountered: