Repository navigation
meson: fix symlink creation when sbin is symlink to bin - #8319
Conversation
|
Uh, isn't this a bit too magic? Shouldn't this be something the package manager deals with? Or alternatively, should this be handled like the split-usr stuff? i.e. we maintain a split-bin boolean, and only if true we distuingish between bin and sbin? |
|
I like that this works "automagically", and users don't have to remember to set yet another setting. We could make this overrideable though. What about a new |
Do we have "auto" for split-usr? I am pretty sure we should support automagic behaviour as much or as little as for split-usr... |
|
I'd make |
|
I'm pretty sure this is broken for cross compiling. It checks if /sbin on the build machine is a symlink to /bin, right? This may be different from the target I'm building for. |
Also move the status from "features" to the paths section. This is more of an anti-feature.
Follow-up for ba7f4ae. By default, we detect if the real root has a separate /usr/sbin directory, but this can be overrides with -Dsplit-bin=true|false. The check assumes that /usr/sbin is split if it is not a symlink, so it'll return a false negative with some more complicated setups. But that's OK, in those cases this should be configured explicitly. This will copy the structure of the directories in the root file system to $DESTDIR. If a directory is a directory in $DESTDIR but a symlink in the root file system, this script will fail. This means that it's not possible to reuse a $DESTDIR from between ba7f4ae and this patch.
54fbbd2 to
157baa8
Compare
|
Updated. |
| split_bin = run_command('test', '-L', '/usr/sbin').returncode() != 0 | ||
| else | ||
| split_bin = get_option('split-bin') == 'true' | ||
| endif |
There was a problem hiding this comment.
i figure sooner or later it would have sense to also define HAVE_SPLIT_BIN or so as c macro, so that we can adjust search paths depending on thus, and drop sbin where it is redundant.
Follow-up for ba7f4ae.
This will copy the structure of the directories in the root file system to
$DESTDIR. If a directory is a directory in $DESTDIR but a symlink in the root
file system, this script will fail. This means that it's not possible to reuse
a $DESTDIR from between ba7f4ae and this patch.