I stumbled upon the app-portage/prefix-toolkit ebuilds after a user asked a question and stumbled upon something a bit concerning. The ebuild tries to unpack itself(!) (https://gitweb.gentoo.org/repo/gentoo.git/tree/app-portage/prefix-toolkit/prefix-toolkit-9.ebuild?id=bc7c993287441e2cd6386eb0b63bc7caa992198c#n46) (There's also the use of non-standard ${EBUILD} variable). Most of the ebuild is taken up by the files it tries to "unpack" and these should be in files/ or downloaded via SRC_URI.
Despite being small, my own suggestion would be to give this its own repo and do normal tarball releases, the ebuild would just install that. Be easier to track changes and give room to add more to this in the future as-needed.
I think we can safely say this practise better is avoided these days. Moving these scripts into a git-repo somewhere and basing releases on that sounds like a much cleaner and understandable approach.
For the record, the EBUILD variable is documented by PMS as reserved for the package manager. Ebuilds must not use it: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-13700012.3.17
(In reply to Fabian Groffen from comment #2) > I think we can safely say this practise better is avoided these days. > > Moving these scripts into a git-repo somewhere and basing releases on that > sounds like a much cleaner and understandable approach. Ping. Will someone do this please?
I'll take a look.
(In reply to Sam James from comment #5) > I'll take a look. I've tried my best at a faithful conversion at https://gitweb.gentoo.org/proj/prefix/prefix-toolkit.git/ with the ebuilds, extracted contents from them, and original commit authorship & messages (w/ cherry-picked reference to ::gentoo commits). There's also a 'naive-conversion' branch with just me doing the extraction.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a828978763bf24ad1e4e5326788db90fbc00879 commit 8a828978763bf24ad1e4e5326788db90fbc00879 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-05-26 06:18:30 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-26 06:18:30 +0000 app-portage/prefix-toolkit: drop crime-against-ebuild (don't self-extract files) I've tried my best at a faithful conversion at https://gitweb.gentoo.org/proj/prefix/prefix-toolkit.git/ with the ebuilds, extracted contents from them, and original commit authorship & messages (w/ cherry-picked reference to ::gentoo commits). There's also a 'naive-conversion' branch with just me doing the extraction. Closes: https://bugs.gentoo.org/866962 Signed-off-by: Sam James <sam@gentoo.org> app-portage/prefix-toolkit/Manifest | 1 + app-portage/prefix-toolkit/prefix-toolkit-9.ebuild | 25 +++------------------- 2 files changed, 4 insertions(+), 22 deletions(-)
Hi Sam, thanks for working on this. I was about to drop this package though, as I don't think there's anything in here we can support or need.
(In reply to Fabian Groffen from comment #8) > Hi Sam, thanks for working on this. I was about to drop this package > though, as I don't think there's anything in here we can support or need. o :) Feel free to drop it, I think it was worth doing the repo conversion anyway just for the historical side, so please go ahead!
update I forgot prefix-toolkit contains startprefix, so this ebuild cannot be dropped. So, thanks for taking care of the conversion!
I didn't do such a good job, apparently I didn't actually remove the crap at the end? I thought I had, so maybe I cocked up git add -p. Fixing..
commit 3649618556827b046d29993e9ce32ebb52be9a60 Author: Sam James <sam@gentoo.org> Date: Sat May 27 10:28:27 2023 +0100 app-portage/prefix-toolkit: cleanup remnants Cloess: https://bugs.gentoo.org/866962 Fixes: 40925478f0552e5e63c325232b9e66e143540af3 Fixes: 8a828978763bf24ad1e4e5326788db90fbc00879 Signed-off-by: Sam James <sam@gentoo.org> Thanks & done!