app-portage/eclass-manpages: Do not include system paths in manpages
authorMichał Górny <mgorny@gentoo.org>
Tue, 14 Mar 2017 15:54:43 +0000 (16:54 +0100)
committerMichał Górny <mgorny@gentoo.org>
Tue, 21 Mar 2017 18:22:43 +0000 (19:22 +0100)
Replace the system paths in generated manpages with just the eclass
filename. This avoids depending on any particular system layout.

app-portage/eclass-manpages/files/eclass-to-manpage.awk
app-portage/eclass-manpages/files/eclass-to-manpage.sh

index 02eb4c82581042d70427cb9dce65983a140abedf..0b65162c04ec206f474c3f74b52956c4547fc237 100644 (file)
@@ -370,7 +370,7 @@ function handle_footer() {
        print ".SH \"REPORTING BUGS\""
        print reporting_bugs
        print ".SH \"FILES\""
-       print ".BR " eclassdir "/" eclass
+       print ".BR " eclass
        print ".SH \"SEE ALSO\""
        print ".BR ebuild (5)"
        print pre_text(gensub("@ECLASS@", eclass, 1, vcs_url))
@@ -381,9 +381,6 @@ function handle_footer() {
 #
 BEGIN {
        state = "header"
-       if (ECLASSDIR == "")
-               ECLASSDIR = "/usr/portage/eclass"
-       eclassdir = ECLASSDIR
        reporting_bugs = "Please report bugs via http://bugs.gentoo.org/"
        vcs_url = "https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@"
 }
index 186a712e8065189c29e7adfad089a01befbc604c..5f389390d60ee6c1e30126f0aa6e443703c5454b 100755 (executable)
@@ -25,7 +25,6 @@ ret=0
 for e in "$@" ; do
        set -- \
        ${AWK} \
-               -vECLASSDIR="${ECLASSDIR}" \
                -f "${FILESDIR}"/eclass-to-manpage.awk \
                ${e}
        if [[ ${AWK} == "gawk" ]] ; then