Created attachment 454580 [details, diff] pkg_preinst: drop nano symlink for the /bin -> /usr/bin symlink In Prefix we have the /bin -> /usr/bin symlink, causing nano to install an invalid symlink (fails to merge in Cygwin). What about this diff for 2.7.1 and 9999? Thanks!
i don't think that'll work ... it's relying on non-deterministic behavior that the binary nano is merged after the symlink. how critical is this ? i'd like to land the USE=sep-usr support and nano could just leverage that.
nm, i misread your patch -- it would work as is i also don't think USE=sep-usr would help -- while it's related, it's not exactly the same thing i'm not keen on this sort of hackery in the pkg_* phases. imo, the src_install should be set up the same way as it'll end up in $ROOT. should we consider a USE=merged-usr flag ?
Ok, keeping in prefix overlay until we find some generic solution: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=40a0c3040793c2f7190bfa4ae9bfd28ab6063676
Created attachment 454890 [details, diff] no symlink for prefix when PREFIX_DISABLE_USR_SPLIT=yes My intent to not rely on PREFIX_DISABLE_USR_SPLIT in arbitrary ebuilds failed: It turns out that pkg_preinst is too late for collision check these days(?), and re-emerging has a collision with (unowned!) usr/bin/nano.
Would it be possible to detect /usr and / map onto the same filesystem via df or something instead of relying on our secrit bootstrap-set env-var in make.conf?
Checking the filesystem would be necessary on the target machine. Unless I'm missing something, the first phase there is pkg_preinst(), which is run after content collection and collision protection nowadays, so I fail to see a chance to modify pkg content after src_install(). What do I miss here?
I was wrong. It indeed doesn't help anything.
@haubi: should we reverse the expression? PREFIX_DISABLE_USR_SPLIT is nowhere set in the profiles or via bootstrap, is it? Currently, nano just ends up being installed as dead symlink. Would it be possible to cp or hardlink the binary manually instead (and ignore messages like ln: failed to create hard link 'tmp/usr/x': File exists, cp: 'tmp/x' and 'tmp/usr/x' are the same file)?
Ah, PREFIX_DISABLE_USR_SPLIT is exported from within bootstrap-prefix.sh, but ends up as PREFIX_DISABLE_GEN_USR_LDSCRIPT=yes in make.conf. What about 'use !prefix-guest' (true for main and rap) around the symlink creation?
I can live with that, we can also use the LDSCRIPT one. At this point it is broken for most (all?) Prefix installs (and it went without noticing for a long while), so whatever we do we better fix it soon. Just assuming prefix == no-usr-split works for me. Omitting the symlink in prefix works for me too, since we have /bin in PATH.
Created attachment 476240 [details, diff] no symlink for USE=prefix-guest, always has merged /usr https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e64eba9aa5cef49debcaaa7e0704b6fdd0e2146f Note: prefix-guest is in IUSE_IMPLICIT.
this seems fixed with split-usr USE-flag these days