I share my PORTDIR and DISTDIR between linux and freebsd. The tree is on linux/reiserfs and mounted ro under freebsd. Curiously the ro-reiserfs has freebsd's flags: ls -ol shows uchg (see man chflags). Ebuilds calling doman, dobin etc. run INSTALL(1). The BSD version says that by default it preserves all file flags. In my case the uchg. Later portage runs chown on files in ${D} which is not permitted because of uchg-flag set. possible solution would be in case of BSD running "install -f 0 ...". Or someone telling me how to mount reiserfs without flags.
Does "chflags -R nouchg $PORTDIR" not solve this?
(In reply to comment #1) > Does "chflags -R nouchg $PORTDIR" not solve this? No I don't think, because $PORTDIR is "ro" (reiserfs/linux), but haven't tried yet, will try it.
> possible solution would be in case of BSD running "install -f 0 ...". Or correction: INSTALL(1) does not support -f <number> as discribe in CHFLAGS(1). For me the uchg flag should be removed and "install -f nouchg ..." works. effected are all ebuilds that make use of {doman,dobin,doins,doexe,???} in src_install with files from ${FILESDIR}. examples: sys-devel/binutils-config, app-shells/bash...
(In reply to comment #1) > Does "chflags -R nouchg $PORTDIR" not solve this? doesn't help (operation not permitted), because $PORTDIR is a read only filesystem.
I'm afraid there's little we can do about this; skipping over flags during do* commands is probably not a good idea as we might need to keep them when installing files from tarballs that have their flags set.
(In reply to comment #5) > I'm afraid there's little we can do about this; skipping over flags during do* > commands is probably not a good idea as we might need to keep them when > installing files from tarballs that have their flags set. understood. Working on my problem implies a solution for distinguishing between wanted and unwanted flags (for safety measure etc). An indicator may be if arguments of do{man,bin,ins,exe,doc,html} match ${FILESDIR}. Then any flag set is mostly unwanted.
Created attachment 123765 [details] install wrapper this script is a wrapper around /usr/bin/install. It devides all source files into those from ${FILESDIR} with uchg-flag and others. For files with uchg-flag it runs /usr/bin/install with "-f nouchg" option added. For others it does alter nothing. It can work as a general wrapper for /usr/bin/install but would slow down "make install" etc. It should be at least replace install-calls from all do*.
Created attachment 123767 [details] install wrapper bugfix: accidentally used find ... -f instead of find ... -flags ... casing files with uchg to be skipped (not installed).
should have been fixed long ago, and we shouldnt be installing with nouschg anymore anyway