* [PATCH] Unbreak help2man invocations
@ 2012-02-10 12:11 Grégoire Sutre
2012-02-10 15:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 3+ messages in thread
From: Grégoire Sutre @ 2012-02-10 12:11 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
Following Vladimir's suggestion on IRC, the attached patch fixes
bug http://savannah.gnu.org/bugs/?35452.
Grégoire
p.s. The patch uses @PACKAGE_TARNAME@ instead of @PACKAGE@ in the
name of the directory that grub-mkconfig_lib is sourced from, to
preserve the definition of pkgdatadir that was in grub-mkconfig.in.
But I guess that those two are always equal for GRUB.
[-- Attachment #2: ChangeLog.source-grub-mkconfig_lib --]
[-- Type: text/plain, Size: 646 bytes --]
2012-02-10 Grégoire Sutre <gregoire.sutre@gmail.com>
Source grub-mkconfig_lib from the build directory at build time.
Suggested by: Vladimir Serbinenko.
* gentpl.py (manpage): Set pkgdatadir to $(builddir) on help2man call.
* util/grub-install.in: Define pkgdatadir if not already set, and source
grub-mkconfig_lib from there.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
[-- Attachment #3: patch-source-grub-mkconfig_lib.diff --]
[-- Type: text/x-patch, Size: 7053 bytes --]
=== modified file 'gentpl.py'
--- gentpl.py 2011-12-24 14:09:26 +0000
+++ gentpl.py 2012-02-10 11:34:46 +0000
@@ -465,7 +465,7 @@ def manpage():
r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
r += rule("[+ name +].[+ mansection +]", "[+ name +]", """
chmod a+x [+ name +]
-PATH=$(builddir):$$PATH $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
+PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
""")
r += gvar_add("CLEANFILES", "[+ name +].[+ mansection +]")
r += "endif\n"
=== modified file 'util/grub-install.in'
--- util/grub-install.in 2012-02-08 18:26:01 +0000
+++ util/grub-install.in 2012-02-10 11:40:34 +0000
@@ -34,6 +34,9 @@ platform=@platform@
host_os=@host_os@
pkglibdir="${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
localedir="@datadir@/locale"
self="`basename $0`"
@@ -77,7 +80,7 @@ else
disk_module=native
fi
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-kbdcomp.in'
--- util/grub-kbdcomp.in 2012-02-05 10:23:47 +0000
+++ util/grub-kbdcomp.in 2012-02-10 11:40:14 +0000
@@ -7,12 +7,15 @@ exec_prefix="@exec_prefix@"
bindir="@bindir@"
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
grub_mklayout="${bindir}/`echo grub-mklayout | sed ${transform}`"
ckbcomp_options=""
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
self=`basename $0`
=== modified file 'util/grub-mkconfig.in'
--- util/grub-mkconfig.in 2012-02-08 18:26:01 +0000
+++ util/grub-mkconfig.in 2012-02-10 11:39:54 +0000
@@ -31,7 +31,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
host_os=@host_os@
datadir="@datadir@"
-pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
grub_cfg=""
grub_mkconfig_dir="${sysconfdir}"/grub.d
@@ -42,7 +44,7 @@ grub_script_check="${bindir}/`echo grub-
GRUB_PREFIX=`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
@@ -95,8 +97,6 @@ do
esac
done
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
-
if [ "x$EUID" = "x" ] ; then
EUID=`id -u`
fi
=== modified file 'util/grub-mknetdir.in'
--- util/grub-mknetdir.in 2012-02-08 19:27:46 +0000
+++ util/grub-mknetdir.in 2012-02-10 11:39:45 +0000
@@ -30,6 +30,9 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
host_os=@host_os@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -52,7 +55,7 @@ efi32_dir="${libdir}/$(echo ${PACKAGE_TA
efi64_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi"
itanium_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/ia64-efi"
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-mkrescue.in'
--- util/grub-mkrescue.in 2012-02-08 18:26:01 +0000
+++ util/grub-mkrescue.in 2012-02-10 11:40:03 +0000
@@ -30,6 +30,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
self=`basename $0`
@@ -46,7 +49,7 @@ grub_mkimage="${bindir}/`echo grub-mkima
xorriso=xorriso
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-mkstandalone.in'
--- util/grub-mkstandalone.in 2012-02-09 13:45:56 +0000
+++ util/grub-mkstandalone.in 2012-02-10 11:39:29 +0000
@@ -31,6 +31,9 @@ PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -40,7 +43,7 @@ format=
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
source=
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-reboot.in'
--- util/grub-reboot.in 2012-02-03 20:30:05 +0000
+++ util/grub-reboot.in 2012-02-10 11:40:22 +0000
@@ -26,6 +26,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -34,7 +37,7 @@ rootdir=
bootdir=
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-set-default.in'
--- util/grub-set-default.in 2012-02-03 20:30:05 +0000
+++ util/grub-set-default.in 2012-02-10 11:40:27 +0000
@@ -26,6 +26,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -34,7 +37,7 @@ rootdir=
bootdir=
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/powerpc/ieee1275/grub-mkrescue.in'
--- util/powerpc/ieee1275/grub-mkrescue.in 2012-02-08 18:26:01 +0000
+++ util/powerpc/ieee1275/grub-mkrescue.in 2012-02-10 11:39:39 +0000
@@ -32,12 +32,15 @@ platform=@platform@
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Unbreak help2man invocations
2012-02-10 12:11 [PATCH] Unbreak help2man invocations Grégoire Sutre
@ 2012-02-10 15:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 17:38 ` Grégoire Sutre
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-02-10 15:51 UTC (permalink / raw)
To: grub-devel
On 10.02.2012 13:11, Grégoire Sutre wrote:
> Following Vladimir's suggestion on IRC, the attached patch fixes
> bug http://savannah.gnu.org/bugs/?35452.
>
Go ahead.
> Grégoire
>
> p.s. The patch uses @PACKAGE_TARNAME@ instead of @PACKAGE@ in the
> name of the directory that grub-mkconfig_lib is sourced from, to
> preserve the definition of pkgdatadir that was in grub-mkconfig.in.
> But I guess that those two are always equal for GRUB.
@PACKAGE_TARNAME@ is more appropriate in this case but they are both
equal in GRUB.
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Unbreak help2man invocations
2012-02-10 15:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-02-10 17:38 ` Grégoire Sutre
0 siblings, 0 replies; 3+ messages in thread
From: Grégoire Sutre @ 2012-02-10 17:38 UTC (permalink / raw)
To: The development of GNU GRUB
On 02/10/2012 04:51 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 10.02.2012 13:11, Grégoire Sutre wrote:
>> Following Vladimir's suggestion on IRC, the attached patch fixes
>> bug http://savannah.gnu.org/bugs/?35452.
>>
> Go ahead.
I've committed the patch and closed the bug report.
Grégoire
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-10 17:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 12:11 [PATCH] Unbreak help2man invocations Grégoire Sutre
2012-02-10 15:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 17:38 ` Grégoire Sutre
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.