Skip to content
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

meson: drop broken split-usr handling #696

Closed
wants to merge 1 commit into from

Conversation

thesamesam
Copy link
Contributor

@thesamesam thesamesam commented Mar 25, 2024

meson: drop broken split-usr handling

Two issues here:

  • The 'split-usr' meson option wasn't doing anything, it tried to check
    if /bin was a symlink, but nothing acted on this information.

  • The actual rootprefix default was decided based on whether /bin was a symlink
    which is flaky if e.g. building on a merged-usr system for use on a non-merged-usr
    system.

People can set -Drootprefix=/usr if they wish.

There's no real advantage to installing to /usr over / as the compat. symlinks
are really here to stay. If someone really does care about this, they can bring
it back and do it properly, but it doesn't seem worth it to me at all.

Bug: https://bugs.gentoo.org/927776
Fixes: cc0037e
Fixes: f2362cc

@eli-schwartz
Copy link

There's no real advantage to installing to /usr over / as the compat. symlinks are really here to stay. If someone really does care about this, they can bring it back and do it properly, but it doesn't seem worth it to me at all.

It is required for non-Gentoo package managers on distros that only support one or the other of split-usr/ merged-usr, and have chosen merged-usr.

Symlinks may be here to stay, but not all package managers perform install-time resolution of symlinks when calculating whether or not the package queued for installation has conflicts with existing files on disk e.g. owned by another package. In such a scenario, you will easily find yourself installing files to /sbin/* and having them conflict another "file", the /sbin symlink.

It's therefore correct to always refer to the file by its canonical portable name, but when copying files over to DESTDIR a bit more care is needed.

This isn't an issue when directly installing without a staged DESTDIR, and it isn't a problem if you work around the problem by mving files around after running meson install.

@thesamesam
Copy link
Contributor Author

thesamesam commented Mar 25, 2024

That's a fair point. But for such cases, they can set -Drootprefix, I think. I have no idea how well that option works, but this PR doesn't make that worse either other than making them set it.

meson.build Outdated Show resolved Hide resolved
Copy link
Contributor

@floppym floppym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the logic simpler without really losing any functionality, so it makes sense to me.

meson.build Outdated Show resolved Hide resolved
Two issues here:

* The 'split-usr' meson option wasn't doing anything, it tried to check
  if /bin was a symlink, but nothing acted on this information.

* The actual rootprefix default was decided based on whether /bin was a symlink
  which is flaky if e.g. building on a merged-usr system for use on a non-merged-usr
  system.

People can set -Drootprefix=/usr if they wish.

There's no real advantage to installing to /usr over / as the compat. symlinks
are really here to stay. If someone really does care about this, they can bring
it back and do it properly, but it doesn't seem worth it to me at all.

Bug: https://bugs.gentoo.org/927776
Fixes: cc0037e
Fixes: f2362cc
@williamh williamh closed this in 12e1e88 Mar 25, 2024
@thesamesam thesamesam deleted the meson-split-usr branch March 25, 2024 19:13
williamh pushed a commit that referenced this pull request Mar 25, 2024
Two issues here:

* The 'split-usr' meson option wasn't doing anything, it tried to check
  if /bin was a symlink, but nothing acted on this information.

* The actual rootprefix default was decided based on whether /bin was a symlink
  which is flaky if e.g. building on a merged-usr system for use on a non-merged-usr
  system.

People can set -Drootprefix=/usr if they wish.

There's no real advantage to installing to /usr over / as the compat. symlinks
are really here to stay. If someone really does care about this, they can bring
it back and do it properly, but it doesn't seem worth it to me at all.

Bug: https://bugs.gentoo.org/927776
Fixes: cc0037e
Fixes: f2362cc
Fixes: #696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants