merging a binary openrc pkg where hostname/rc.conf files has been PKG_INSTALL_MASK:ed prints errors: sed: can't read /var/tmp/qmerge/sys-apps/openrc-0.42.1-r1/image///etc/conf.d/hostname: No such file or directory sed: can't read /var/tmp/qmerge/sys-apps/openrc-0.42.1-r1/image///etc/rc.conf: No such file or directory During postinst there is this error msg: cp: '//lib/rc' and '//lib/rc' are the same file This is on a 32 bits ppc machine I think openrc should not even try doing the above cp cmd.
(In reply to Joakim Tjernlund from comment #0) [...] > During postinst there is this error msg: > cp: '//lib/rc' and '//lib/rc' are the same file > > This is on a 32 bits ppc machine I think openrc should not even > try doing the above cp cmd. Do you still get this with portage? Haven't tried yet, but rather than openrc's ebuild (which doesn't do this cp if the directory exists), I suspect it's a qmerge issue. Maybe related to different variable handling, this // notably implies EROOT=/ when it should be EROOT= with EAPI-7.
(In reply to Ionen Wolkens from comment #1) > Haven't tried yet, but rather than openrc's ebuild (which doesn't do this cp > if the directory exists), [...] Scratch the last bit, you're right, basically it seem to skip checking if $(get_libdir) == lib Not that I get these sed errors merging a binary package of openrc with portage still.
(In reply to Ionen Wolkens from comment #2) > (In reply to Ionen Wolkens from comment #1) > > Haven't tried yet, but rather than openrc's ebuild (which doesn't do this cp > > if the directory exists), [...] > Scratch the last bit, you're right, basically it seem to skip checking if > $(get_libdir) == lib > > Not that I get these sed errors merging a binary package of openrc with > portage still. You only get them if you also have PKG_INSTALL_MASK:ed /etc/conf.d/hostname and /etc/rc.conf so these files are excluded from the bin pkg.
(In reply to Joakim Tjernlund from comment #3) > You only get them if you also have PKG_INSTALL_MASK:ed /etc/conf.d/hostname > and > /etc/rc.conf so these files are excluded from the bin pkg. Oh okay, I get it now (hadn't realized what PKG_ really did). It'd be hard to consider every PKG_INSTALL_MASK situations, and it's a scarcely used feature from what I can tell. If anything it'd make sense for the ebuild to do '|| die' if still in "pre"inst when these unexpected things happen. Any reason even using that for small config files? Inclusion in binpkgs seem trivial. Either way, the cp command without proper checks does kind of bother me, will see what maintainer(s) think. That qmerge does EROOT=/ in eapi-7 (when some ebuilds do check like [[ $EROOT ]] expecting it means not /) also bothers me, but it's unrelated to this.
ping?
I haven't formed an opinion one way or another on this yet. I'm not sure how I feel about dying in postinst (the cp is in postinst, not preinst), so the package is already installed at this point.
For the postinst cp it'd more about not running it when it's not needed (aka get_libdir == lib), but ultimately the error is benign and is just something that give the wrong impression something might've went wrong.
(In reply to Ionen Wolkens from comment #7) > For the postinst cp it'd more about not running it when it's not needed (aka > get_libdir == lib), but ultimately the error is benign and is just something > that give the wrong impression something might've went wrong. Exactly, it is just the msgs that look scary. It is working correctly. For the sed errors, test if there is file first and then run sed on them.
I figure this patch fixes the first 2 errors: # set_config <file> <option name> <yes value> <no value> test # a value of "#" will just comment out the option set_config() { local file="${ED}/$1" var=$2 val com + [[ -e "${file}" ]] || return # Skip if no file eval "${@:5}" && val=$3 || val=$4 [[ ${val} == "#" ]] && com="#" && val='\2' sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" } The last cp: '//lib/rc' and '//lib/rc' are the same file error I am not sure how solve as I don't quite get what you are trying to do in the fist place.
(In reply to William Hubbs from comment #6) > I haven't formed an opinion one way or another on this yet. > I'm not sure how I feel about dying in postinst (the cp is in postinst, > not preinst), so the package is already installed at this point. Ping?
(In reply to William Hubbs from comment #6) > I haven't formed an opinion one way or another on this yet. > I'm not sure how I feel about dying in postinst (the cp is in postinst, > not preinst), so the package is already installed at this point. Ping ? You are not dying in postinst, you are just creating a scary msg as cp cannot copy a dir to itself.