From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] grub-mkconfig: use $pkgdatadir in scripts
Date: Wed, 29 Apr 2015 15:29:26 +0200 [thread overview]
Message-ID: <5540DCB6.8010702@gmail.com> (raw)
In-Reply-To: <1429635515-6734-1-git-send-email-arvidjaar@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5527 bytes --]
Go ahead
On 21.04.2015 18:58, Andrei Borzenkov wrote:
> Otherwise scripts will source wrong grub-mkconfig_lib.
>
> ---
> util/grub-mkconfig.in | 3 +++
> util/grub.d/00_header.in | 2 +-
> util/grub.d/10_hurd.in | 2 +-
> util/grub.d/10_illumos.in | 2 +-
> util/grub.d/10_kfreebsd.in | 2 +-
> util/grub.d/10_linux.in | 2 +-
> util/grub.d/10_netbsd.in | 2 +-
> util/grub.d/10_windows.in | 2 +-
> util/grub.d/10_xnu.in | 2 +-
> util/grub.d/20_linux_xen.in | 2 +-
> util/grub.d/30_os-prober.in | 2 +-
> 11 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
> index d1fae49..3183744 100644
> --- a/util/grub-mkconfig.in
> +++ b/util/grub-mkconfig.in
> @@ -33,6 +33,9 @@ datadir="@datadir@"
> if [ "x$pkgdatadir" = x ]; then
> pkgdatadir="${datadir}/@PACKAGE@"
> fi
> +# export it for scripts
> +export pkgdatadir
> +
> grub_cfg=""
> grub_mkconfig_dir="${sysconfdir}"/grub.d
>
> diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
> index ce2ec81..93a9023 100644
> --- a/util/grub.d/00_header.in
> +++ b/util/grub.d/00_header.in
> @@ -25,7 +25,7 @@ grub_lang=`echo $LANG | cut -d . -f 1`
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> # Do this as early as possible, since other commands might depend on it.
> # (e.g. the `loadfont' command might need lvm or raid modules)
> diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
> index 29b4554..59a9a48 100644
> --- a/util/grub.d/10_hurd.in
> +++ b/util/grub.d/10_hurd.in
> @@ -24,7 +24,7 @@ datarootdir="@datarootdir@"
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> CLASS="--class gnu --class os"
>
> diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in
> index 0de616e..a133e1b 100644
> --- a/util/grub.d/10_illumos.in
> +++ b/util/grub.d/10_illumos.in
> @@ -20,7 +20,7 @@ set -e
> prefix="@prefix@"
> exec_prefix="@exec_prefix@"
> datarootdir="@datarootdir@"
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
> diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
> index 65f6c32..9d8e8fd 100644
> --- a/util/grub.d/10_kfreebsd.in
> +++ b/util/grub.d/10_kfreebsd.in
> @@ -20,7 +20,7 @@ set -e
> prefix="@prefix@"
> exec_prefix="@exec_prefix@"
> datarootdir="@datarootdir@"
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
> diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
> index a2a84dc..859b608 100644
> --- a/util/grub.d/10_linux.in
> +++ b/util/grub.d/10_linux.in
> @@ -21,7 +21,7 @@ prefix="@prefix@"
> exec_prefix="@exec_prefix@"
> datarootdir="@datarootdir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
> diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
> index 9988a42..874f599 100644
> --- a/util/grub.d/10_netbsd.in
> +++ b/util/grub.d/10_netbsd.in
> @@ -20,7 +20,7 @@ set -e
> prefix="@prefix@"
> exec_prefix="@exec_prefix@"
> datarootdir="@datarootdir@"
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
> diff --git a/util/grub.d/10_windows.in b/util/grub.d/10_windows.in
> index 48bd955..554c561 100644
> --- a/util/grub.d/10_windows.in
> +++ b/util/grub.d/10_windows.in
> @@ -24,7 +24,7 @@ datarootdir="@datarootdir@"
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> case "`uname 2>/dev/null`" in
> CYGWIN*) ;;
> diff --git a/util/grub.d/10_xnu.in b/util/grub.d/10_xnu.in
> index 4270385..51ee2f4 100644
> --- a/util/grub.d/10_xnu.in
> +++ b/util/grub.d/10_xnu.in
> @@ -24,7 +24,7 @@ datarootdir="@datarootdir@"
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> osx_entry() {
> if [ x$2 = x32 ]; then
> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
> index de34c8d..f532fb9 100644
> --- a/util/grub.d/20_linux_xen.in
> +++ b/util/grub.d/20_linux_xen.in
> @@ -21,7 +21,7 @@ prefix="@prefix@"
> exec_prefix="@exec_prefix@"
> datarootdir="@datarootdir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
> diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
> index 4ee6015..5fc4f0c 100644
> --- a/util/grub.d/30_os-prober.in
> +++ b/util/grub.d/30_os-prober.in
> @@ -24,7 +24,7 @@ datarootdir="@datarootdir@"
> export TEXTDOMAIN=@PACKAGE@
> export TEXTDOMAINDIR="@localedir@"
>
> -. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
> +. "$pkgdatadir/grub-mkconfig_lib"
>
> if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
> exit 0
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
prev parent reply other threads:[~2015-04-29 13:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 16:58 [PATCH] grub-mkconfig: use $pkgdatadir in scripts Andrei Borzenkov
2015-04-29 13:29 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5540DCB6.8010702@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.