Summary: | sys-apps/gawk: eselect awk if unset | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christoph Junghans (RETIRED) <junghans> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 418473 | ||
Attachments: |
patch for gawk-4.0.1.ebuild
patch for gawk-4.0.1.ebuild patch for gawk-4.0.1.ebuild patch for gawk-4.0.1.ebuild |
Description
Christoph Junghans (RETIRED)
![]() Comment on attachment 318172 [details, diff]
patch for gawk-4.0.1.ebuild
not interested in moving gawk at this time out of /bin
Created attachment 318270 [details, diff] patch for gawk-4.0.1.ebuild (In reply to comment #1) > not interested in moving gawk at this time out of /bin Ok, let's wait with the /usr/bin move. What about the rest of the patch? have it check for eselect existing first: type eselect >&/dev/null && eselect awk update ifunset gawk really shouldn't be requiring eselect, but we don't have the DEPEND system to support this yet (In reply to comment #3) > gawk really shouldn't be requiring eselect, but we don't have the DEPEND > system to support this yet That make sense. How about a build-in replacement for eselect-awk: pkg_postinst() { #symlink creation here as the links do not belong to gawk, but to any awk if has_version eselect && has_version eselect-awk ; then eselect awk update ifunset else for l in /bin/awk /usr/bin/awk /usr/share/man/man1/awk.1 ; do [[ ! -e ${EROOT}$l ]] && dosym ${l##*/} $l done fi } pkg_postrm() { has_version eselect && has_version eselect-awk && eselect awk update ifunset } (In reply to comment #4) > #symlink creation here as the links do not belong to gawk, but to any awk space between "#" and "symlink" > for l in /bin/awk /usr/bin/awk /usr/share/man/man1/awk.1 ; do local l > [[ ! -e ${EROOT}$l ]] && dosym ${l##*/} $l i don't think dosym works in pkg_* funcs. you'll need to use `ln -s` and $EROOT Created attachment 322214 [details, diff] patch for gawk-4.0.1.ebuild (In reply to comment #5) > space between "#" and "symlink" > local l > i don't think dosym works in pkg_* funcs. you'll need to use `ln -s` and > $EROOT Done. (In reply to comment #0) > 2.) move gawk binary back to /usr/bin as baselayout-2 does not depend on awk > being in /bin anymore. (@openrc: please comment if needed) OpenRC does not use awk, so from our pov there is no reason for it to be on /; it should be moved to /usr. (In reply to comment #1) > not interested in moving gawk at this time out of /bin Why? does something else use it in early boot? (In reply to comment #6) the has_version checks should include a CATEGORY in the packages (In reply to comment #7) baselayout-1 used it for the longest time, and awk scripts can be specified in shebangs (#!/bin/awk), and i see no need to change right now. nothing needs it. Created attachment 322378 [details, diff] patch for gawk-4.0.1.ebuild (In reply to comment #8) > (In reply to comment #6) > > the has_version checks should include a CATEGORY in the packages Done > (In reply to comment #7) > > baselayout-1 used it for the longest time, and awk scripts can be specified > in shebangs (#!/bin/awk), and i see no need to change right now. nothing > needs it. Could be done with a symlink as well ln -s ../usr/bin/gawk ${EROOT}bin/awk The advantage would be that we can get rid of the whole "if use userland_GNU" block. The only thing, which would go missing is /bin/gawk, /bin/awk is still there and gets created by eselect-awk as well. (In reply to comment #9) ok, add this with gawk-4.0.1-r1 and let's see what blows up (In reply to comment #10) > (In reply to comment #9) > > ok, add this with gawk-4.0.1-r1 and let's see what blows up Added unkeyworded. Re-added keywords, let's sse what blows up. |