Gentoo Archives: gentoo-dev

From: Marek Szuba <marecki@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 1/5] gnome2-utils.eclass: phase out emktemp
Date: Thu, 09 Dec 2021 13:24:22
Message-Id: 20211209132325.297913-2-marecki@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/5] EAPI-8 support in gnome2{,-utils}.eclass by Marek Szuba
1 Has been deprecated for quite a while now, comes from eutils.eclass
2 so it blocks EAPI 8+. Just call mktemp directly.
3
4 Signed-off-by: Marek Szuba <marecki@g.o>
5 ---
6 eclass/gnome2-utils.eclass | 7 +++----
7 1 file changed, 3 insertions(+), 4 deletions(-)
8
9 diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
10 index f7d45090f82..39c4797eedf 100644
11 --- a/eclass/gnome2-utils.eclass
12 +++ b/eclass/gnome2-utils.eclass
13 @@ -1,4 +1,4 @@
14 -# Copyright 1999-2020 Gentoo Authors
15 +# Copyright 1999-2021 Gentoo Authors
16 # Distributed under the terms of the GNU General Public License v2
17
18 # @ECLASS: gnome2-utils.eclass
19 @@ -16,10 +16,9 @@
20 # * scrollkeeper (old Gnome help system) management
21
22 [[ ${EAPI} == 5 ]] && inherit multilib
23 -# eutils.eclass: emktemp
24 # toolchain-funs.eclass: tc-is-cross-compiler
25 # xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update
26 -inherit eutils toolchain-funcs xdg-utils
27 +inherit toolchain-funcs xdg-utils
28
29 case ${EAPI} in
30 5|6|7) ;;
31 @@ -379,7 +378,7 @@ gnome2_gdk_pixbuf_update() {
32 fi
33
34 ebegin "Updating gdk-pixbuf loader cache"
35 - local tmp_file=$(emktemp)
36 + local tmp_file=$(mktemp "${T}"/tmp.XXXXXXXXXX) || die "Failed to create temporary file"
37 ${updater} 1> "${tmp_file}" &&
38 chmod 0644 "${tmp_file}" &&
39 cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
40 --
41 2.32.0

Replies

Subject Author
Re: [gentoo-dev] [PATCH 1/5] gnome2-utils.eclass: phase out emktemp "Michał Górny" <mgorny@g.o>