From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 1/5] gnome2-utils.eclass: phase out emktemp
Date: Thu, 09 Dec 2021 16:04:19 +0100 [thread overview]
Message-ID: <1f731fd5d6309bf1ebeb8e08b73ca903a1bc47dc.camel@gentoo.org> (raw)
In-Reply-To: <20211209132325.297913-2-marecki@gentoo.org>
On Thu, 2021-12-09 at 13:23 +0000, Marek Szuba wrote:
> Has been deprecated for quite a while now, comes from eutils.eclass
> so it blocks EAPI 8+. Just call mktemp directly.
>
> Signed-off-by: Marek Szuba <marecki@gentoo.org>
> ---
> eclass/gnome2-utils.eclass | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
> index f7d45090f82..39c4797eedf 100644
> --- a/eclass/gnome2-utils.eclass
> +++ b/eclass/gnome2-utils.eclass
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2020 Gentoo Authors
> +# Copyright 1999-2021 Gentoo Authors
> # Distributed under the terms of the GNU General Public License v2
>
> # @ECLASS: gnome2-utils.eclass
> @@ -16,10 +16,9 @@
> # * scrollkeeper (old Gnome help system) management
>
> [[ ${EAPI} == 5 ]] && inherit multilib
> -# eutils.eclass: emktemp
> # toolchain-funs.eclass: tc-is-cross-compiler
> # xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update
> -inherit eutils toolchain-funcs xdg-utils
> +inherit toolchain-funcs xdg-utils
>
> case ${EAPI} in
> 5|6|7) ;;
> @@ -379,7 +378,7 @@ gnome2_gdk_pixbuf_update() {
> fi
>
> ebegin "Updating gdk-pixbuf loader cache"
> - local tmp_file=$(emktemp)
> + local tmp_file=$(mktemp "${T}"/tmp.XXXXXXXXXX) || die "Failed to create temporary file"
Why do you need to use random name in the first place? We have full
control over T, so why not just hardcode a good name?
> ${updater} 1> "${tmp_file}" &&
> chmod 0644 "${tmp_file}" &&
> cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
--
Best regards,
Michał Górny
next prev parent reply other threads:[~2021-12-09 15:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 13:23 [gentoo-dev] [PATCH 0/5] EAPI-8 support in gnome2{,-utils}.eclass Marek Szuba
2021-12-09 13:23 ` [gentoo-dev] [PATCH 1/5] gnome2-utils.eclass: phase out emktemp Marek Szuba
2021-12-09 15:04 ` Michał Górny [this message]
2021-12-13 10:19 ` Marek Szuba
2021-12-13 17:24 ` Mart Raudsepp
2021-12-26 9:44 ` Marek Szuba
2021-12-26 9:50 ` Michał Górny
2021-12-26 10:17 ` Mart Raudsepp
2021-12-09 13:23 ` [gentoo-dev] [PATCH 2/5] gnome2-utils.eclass: support EAPI 8 Marek Szuba
2021-12-09 13:23 ` [gentoo-dev] [PATCH 3/5] gnome2.eclass: do not call xdg_src_prepare Marek Szuba
2021-12-09 13:23 ` [gentoo-dev] [PATCH 4/5] gnome2.eclass: standardise the EAPI guard Marek Szuba
2021-12-09 13:23 ` [gentoo-dev] [PATCH 5/5] gnome2.eclass: support EAPI 8 Marek Szuba
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=1f731fd5d6309bf1ebeb8e08b73ca903a1bc47dc.camel@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox