with -samples the ebuilds try to rm(1) non-extant files and the die. the ||die after the calls to rm(1) should be deleted. or perhaps it should rm -f? the ebuilds are unusable as is.
Thank you for the report. We need to have all information at hand before ticket assignment. That is why I ask you to * attach the logs and * paste the emerge info as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
It used to be rm -rf, I was specifically told not to do that. I'll look into this ASAP.
deleting the rm calls got it to succeed. in any case, there should not be any need to die in those cases. some sort of ||echo ... or the like should be ok if an || is required.
In my eyes the '|| die' here has achieved its purpose and spotted a fault in the ebuild.
^^ this. also you should use || die even with rm -f, but also should avoid -f is possible. while -f makes rm return 0 on non-existent files, it's still possible to catch other type of errors (permission, general filesystem errors and some other)
It seems "rm or die" fails on some unimportant folders like MOH folders. May be "or die" is too strong condition in this case.
Frankly, the || die here directed me at a slightly bigger issue. The rm -r's with USE=sample just removed 90% of make samples anyway ... so switched to just calling the correct target that installs that which remains behind. Needed some coaxing with extra arguments to make since the build system uses some internal macro's, and make samples just happen to have the right defaults to this macro whereas mak install-configs bombs out due to no defaults. Personally I consider this a bug to upstream's implementation but that's not an argument I'll manage to pass. Should have a PR in less than 30 minutes up, just going through final testing on my side. And a heads up: based on the above I'm going to remove USE=samples on the next version, and configs will be installed by default, if you really don't want that, use INSTALL_MASK="/etc/asterisk/*" in make.conf, or applicable environment.
eliminating the samples use flag is extremely harmful. it is /imperative/ that an an asterisk upgrade leave /etc/asterisk untouched. doing otherwise will break many systems. portage may not change existing files w/o etc-update, but it will insert fils which should not exist at all. the samples should only go under /usr/share/doc. never in /etc. the use flag MUST NOT be removed.
also, any such change MUST be announced to *everyone* before they encounter the new ebuild, so that they can prepare. a note in bug is insufficient.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ac41e02f79acc131daf0d305adac6b703de91ef commit 3ac41e02f79acc131daf0d305adac6b703de91ef Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2020-04-19 19:40:25 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-04-21 08:17:21 +0000 net-misc/asterisk: fix USE=-samples. Note: USE=samples only really install default configs into /etc/asterisk, as such, IUSE=samples is going away on the next bump, so default configs will be installed. Use INSTALL_MASK to prevent this if you don't want this: INSTALL_MASK=/etc/asterisk/* in make.conf Closes: https://bugs.gentoo.org/717450 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/15416 Signed-off-by: Joonas Niilola <juippis@gentoo.org> net-misc/asterisk/asterisk-13.32.0-r1.ebuild | 10 +--------- net-misc/asterisk/asterisk-16.9.0.ebuild | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-)