From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VnMFv-0003jJ-BZ for mharc-grub-devel@gnu.org; Mon, 02 Dec 2013 00:41:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnMFo-0003j9-FT for grub-devel@gnu.org; Mon, 02 Dec 2013 00:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnMFj-0006xs-2K for grub-devel@gnu.org; Mon, 02 Dec 2013 00:41:08 -0500 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:50750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnMFi-0006xo-NQ for grub-devel@gnu.org; Mon, 02 Dec 2013 00:41:02 -0500 Received: by mail-ea0-f176.google.com with SMTP id h14so8571552eaj.35 for ; Sun, 01 Dec 2013 21:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=YhROmZu/qkscyyVP3+yDuDwfcgEfO76Vm2LjCrvS7gw=; b=VptERGzhz2+83bQOnbr2z8SpPpFp1MmxJ7NDygFcXnuZrf/S+6pWH1XfPY5t+FodRQ blB1iTLEZ1gop+H76lNab1ZreLeaxPZCiXXFD701qoGVEdUqUgIRbgRiDIyeCd0Zp+ia gz60yX6frh19Q7HXDdcCVNvjE6KrfOAa4gxEZrzMWE4ZMSJgvCN2d7gIM4nz++sHLSN+ droVIK131dMzlcgN0kQX9BXeHqZe+cKeUSwKImsORWn1/TD69Qy7vcW2L/7iIDO4PsOw dFMS/43CnTDCivuMCqJbw8tZ9x889IB22iw/WXfXvjaU85PXmlR6RxIyP7GdOrD6Gsii Bl5g== X-Received: by 10.14.119.136 with SMTP id n8mr158509eeh.82.1385962861882; Sun, 01 Dec 2013 21:41:01 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id 4sm54835440eed.14.2013.12.01.21.41.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Dec 2013 21:41:00 -0800 (PST) Message-ID: <529C1D6A.4070600@gmail.com> Date: Mon, 02 Dec 2013 06:40:58 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Fix grub-shell to avoid breaking "make distcheck" References: <20131129141213.GD16321@riva.ucam.org> In-Reply-To: <20131129141213.GD16321@riva.ucam.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2LECAQRUXXRNHXQABIDIX" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::230 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 05:41:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2LECAQRUXXRNHXQABIDIX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 29.11.2013 15:12, Colin Watson wrote: > Copying the themes directory in grub-shell isn't > parallel-test-friendly and breaks on the second test when the source > directory is read-only (as in "make distcheck"). Instead, add a > --themes-directory option to grub-mkrescue et al, and use it in > grub-shell. I agree with the patch but I'm unsure whether --themes-idrectory has to be a hidden option or appear in --help. > --- > ChangeLog | 8 ++++++++ > include/grub/util/install.h | 4 ++++ > tests/util/grub-shell.in | 5 +++-- > util/grub-install-common.c | 20 ++++++++++++++++++-- > 4 files changed, 33 insertions(+), 4 deletions(-) >=20 > diff --git a/ChangeLog b/ChangeLog > index ad83563..7b55a7a 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,5 +1,13 @@ > 2013-11-29 Colin Watson > =20 > + Copying the themes directory in grub-shell isn't > + parallel-test-friendly and breaks on the second test when the source > + directory is read-only (as in "make distcheck"). Instead, add a > + --themes-directory option to grub-mkrescue et al, and use it in > + grub-shell. > + > +2013-11-29 Colin Watson > + > * docs/grub-dev.texi (Font Metrics): Exclude @image command from DVI > builds, since we don't have an EPS version of font_char_metrics.png. > Add leading dot to image extension per the Texinfo documentation. > diff --git a/include/grub/util/install.h b/include/grub/util/install.h > index 5cb33fc..891d170 100644 > --- a/include/grub/util/install.h > +++ b/include/grub/util/install.h > @@ -50,6 +50,9 @@ > { "locale-directory", GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY, \ > N_("DIR"), 0, \ > N_("use translations under DIR [default=3D%s]"), 1 }, \ > + { "themes-directory", GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY, \ > + N_("DIR"), 0, \ > + N_("use themes under DIR [default=3D%s]"), 1 }, \ > { "grub-mkimage", GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE, \ > "FILE", OPTION_HIDDEN, 0, 1 }, \ > /* TRANSLATORS: "embed" is a verb (command description). "*/ \ > @@ -106,6 +109,7 @@ enum grub_install_options { > GRUB_INSTALL_OPTIONS_INSTALL_COMPRESS, > GRUB_INSTALL_OPTIONS_DIRECTORY2, > GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY, > + GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY, > GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE > }; > =20 > diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in > index 5f20b64..d9a5253 100644 > --- a/tests/util/grub-shell.in > +++ b/tests/util/grub-shell.in > @@ -347,9 +347,10 @@ if test -z "$debug"; then > fi > =20 > if [ x$boot !=3D xnet ] && [ x$boot !=3D xemu ]; then > - cp -R "@srcdir@/themes" "@builddir@" > pkgdatadir=3D"@builddir@" "@builddir@/grub-mkrescue" "--output=3D$= {isofile}" "--override-directory=3D${builddir}/grub-core" \ > - --rom-directory=3D"${rom_directory}" $mkimage_extra_arg ${mkrescue_ar= gs} \ > + --rom-directory=3D"${rom_directory}" \ > + --themes-directory=3D"@srcdir@/themes" \ > + $mkimage_extra_arg ${mkrescue_args} \ > "/boot/grub/grub.cfg=3D${cfgfile}" "/boot/grub/testcase.cfg=3D${sourc= e}" \ > ${files} >/dev/null 2>&1 > fi > diff --git a/util/grub-install-common.c b/util/grub-install-common.c > index 91b558e..3204bc4 100644 > --- a/util/grub-install-common.c > +++ b/util/grub-install-common.c > @@ -60,6 +60,8 @@ grub_install_help_filter (int key, const char *text, > return xasprintf(text, grub_util_get_pkglibdir ()); =20 > case GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY: > return xasprintf(text, grub_util_get_localedir ()); > + case GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY: > + return grub_util_path_concat (2, grub_util_get_pkgdatadir (), "t= hemes"); > default: > return (char *) text; > } > @@ -220,6 +222,7 @@ struct install_list install_fonts =3D { 1, 0, 0, 0 = }; > struct install_list install_themes =3D { 1, 0, 0, 0 }; > char *grub_install_source_directory =3D NULL; > char *grub_install_locale_directory =3D NULL; > +char *grub_install_themes_directory =3D NULL; > =20 > void > grub_install_push_module (const char *val) > @@ -320,6 +323,10 @@ grub_install_parse (int key, char *arg) > free (grub_install_locale_directory); > grub_install_locale_directory =3D xstrdup (arg); > return 1; > + case GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY: > + free (grub_install_themes_directory); > + grub_install_themes_directory =3D xstrdup (arg); > + return 1; > case GRUB_INSTALL_OPTIONS_INSTALL_MODULES: > handle_install_list (&install_modules, arg, 0); > return 1; > @@ -666,6 +673,7 @@ grub_install_copy_files (const char *src, > { > char *dst_platform, *dst_locale, *dst_fonts; > const char *pkgdatadir =3D grub_util_get_pkgdatadir (); > + char *themes_dir; > =20 > { > char *platform; > @@ -780,14 +788,20 @@ grub_install_copy_files (const char *src, > install_themes.entries[1] =3D NULL; > } > =20 > + if (grub_install_themes_directory) > + themes_dir =3D xstrdup (grub_install_themes_directory); > + else > + themes_dir =3D grub_util_path_concat (2, grub_util_get_pkgdatadir = (), > + "themes"); > + > for (i =3D 0; i < install_themes.n_entries; i++) > { > - char *srcf =3D grub_util_path_concat (4, pkgdatadir, "themes", > + char *srcf =3D grub_util_path_concat (3, themes_dir, > install_themes.entries[i], > "theme.txt"); > if (grub_util_is_regular (srcf)) > { > - char *srcd =3D grub_util_path_concat (3, pkgdatadir, "themes", > + char *srcd =3D grub_util_path_concat (2, themes_dir, > install_themes.entries[i]); > char *dstd =3D grub_util_path_concat (3, dst, "themes", > install_themes.entries[i]); > @@ -799,6 +813,8 @@ grub_install_copy_files (const char *src, > free (srcf); > } > =20 > + free (themes_dir); > + > if (install_fonts.is_default) > { > install_fonts.is_default =3D 0; >=20 ------enig2LECAQRUXXRNHXQABIDIX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKcHWoACgkQmBXlbbo5nOuFzAD/YgOas/TC0+Cx+HgeeHeHCm7W rb7aZYetq444g5vXFNEA/jTanmeEHJbNtpKEG1eOjmUP6OceDMXLDRYo0M8/50ul =lbpi -----END PGP SIGNATURE----- ------enig2LECAQRUXXRNHXQABIDIX--