From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A07D8138334 for ; Wed, 20 Jun 2018 09:05:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 64922E0A91; Wed, 20 Jun 2018 09:05:36 +0000 (UTC) Received: from mx-out1.startmail.com (mx-out1.startmail.com [145.131.90.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D51B3E0A70 for ; Wed, 20 Jun 2018 09:05:35 +0000 (UTC) Date: Wed, 20 Jun 2018 04:04:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=startmail.com; s=2017-11; t=1529485534; bh=692Vd8+U3i/+7Vhxqtgu4pyhZWFP3TPQsz0vuSUJdZw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmZR0YgHTjQBfI8Wci0tBvuyhMDsPmejRbXttfUMeYf7MpY/wNRoenkCwOeNm9nFZ dkElbizjCh4ji/zxlv7HSOirmAmCWB3CvpQf9+hEuCaz2CpEJrUwYRMfD8p37zDx/R l7O25MiF/iOeOyXU0IENIhPnyVscz94gCtQ6C4T4olXVXcM/qgwK4/xAQBRjcUd7Y4 Le/m/x2C26/Gbbl9NBpsm+T3ryDl5w4GngRNHlWyn1kRVMYeclPDXtKzWSoKdI7jqJ ZSNaicugFjmCOO26JYQSobg2/q/R1vz4Ruhc8L1gt8IbvKxVz3TzttcVP8RCwN004h VHJIQcBhedEzw== From: "Marty E. Plummer" To: =?utf-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH 4/4] gnome2.eclass: move icon handling code to xdg.eclass Message-ID: <20180620090434.hyyatgvswxdfzilv@proprietary-killer> References: <20180620071053.11589-1-hanetzer@startmail.com> <20180620071053.11589-4-hanetzer@startmail.com> <1529479674.2506.4.camel@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1529479674.2506.4.camel@gentoo.org> X-Archives-Salt: b75c40b3-e812-4444-93ce-97caab6ddc54 X-Archives-Hash: 83d9a65f00ad5e8dbfc83c8849ce71f0 On Wed, Jun 20, 2018 at 09:27:54AM +0200, Michał Górny wrote: > W dniu śro, 20.06.2018 o godzinie 02∶10 -0500, użytkownik Marty E. > Plummer napisał: > > --- > > eclass/gnome2.eclass | 7 ------- > > eclass/xdg.eclass | 27 ++++++++++++++++++++++----- > > 2 files changed, 22 insertions(+), 12 deletions(-) > > > > diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass > > index 6db6d08b14e..5b81cb4f01a 100644 > > --- a/eclass/gnome2.eclass > > +++ b/eclass/gnome2.eclass > > @@ -315,7 +315,6 @@ gnome2_src_install() { > > gnome2_pkg_preinst() { > > xdg_pkg_preinst > > gnome2_gconf_savelist > > - gnome2_icon_savelist > > gnome2_schemas_savelist > > gnome2_scrollkeeper_savelist > > gnome2_gdk_pixbuf_savelist > > @@ -337,9 +336,6 @@ gnome2_pkg_preinst() { > > gnome2_pkg_postinst() { > > xdg_pkg_postinst > > gnome2_gconf_install > > - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then > > - gnome2_icon_cache_update > > - fi > > if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then > > gnome2_schemas_update > > fi > > @@ -361,9 +357,6 @@ gnome2_pkg_postinst() { > > # Handle scrollkeeper, GSettings, Icons, desktop and mime database updates. > > gnome2_pkg_postrm() { > > xdg_pkg_postrm > > - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then > > - gnome2_icon_cache_update > > - fi > > if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then > > gnome2_schemas_update > > fi > > diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass > > index fd4816b8447..29830a5ee15 100644 > > --- a/eclass/xdg.eclass > > +++ b/eclass/xdg.eclass > > @@ -39,9 +39,9 @@ xdg_src_prepare() { > > > > # @FUNCTION: xdg_pkg_preinst > > # @DESCRIPTION: > > -# Finds .desktop and mime info files for later handling in pkg_postinst. > > -# Locations are stored in XDG_ECLASS_DESKTOPFILES and XDG_ECLASS_MIMEINFOFILES > > -# respectively. > > +# Finds .desktop, icon, and mime info files for later handling in pkg_postinst. > > +# Locations are stored in XDG_ECLASS_DESKTOPFILES, XDG_ECLASS_ICONS and > > +# XDG_ECLASS_MIMEINFOFILES respectively. > > xdg_pkg_preinst() { > > local f > > > > @@ -50,6 +50,11 @@ xdg_pkg_preinst() { > > XDG_ECLASS_DESKTOPFILES+=( ${f} ) > > done < <(cd "${D}" && find 'usr/share/applications' -type f -print0 2>/dev/null) > > > > + XDG_ECLASS_ICONS=() > > + while IFS= read -r -d '' f; do > > + XDG_ECLASS_ICONS+=( ${f} ) > > + done < <(cd "${D}" && find 'usr/share/icons' -type f -print0 2>/dev/null) > > If you inline it anyway, why add xdg_*_savelist for it? > Too keep a stub that still 'works' for ebuilds using gnome2_icon_savelist from gnome2-utils.eclass. > > + > > XDG_ECLASS_MIMEINFOFILES=() > > while IFS= read -r -d '' f; do > > XDG_ECLASS_MIMEINFOFILES+=( ${f} ) > > @@ -60,7 +65,7 @@ xdg_pkg_preinst() { > > > > # @FUNCTION: xdg_pkg_postinst > > # @DESCRIPTION: > > -# Handle desktop and mime info database updates. > > +# Handle desktop, icon and mime info database updates. > > xdg_pkg_postinst() { > > if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then > > xdg_desktop_database_update > > @@ -68,6 +73,12 @@ xdg_pkg_postinst() { > > debug-print "No .desktop files to add to database" > > fi > > > > + if [[ ${#XDG_ECLASS_ICONS[@]} -gt 0 ]]; then > > + xdg_icon_cache_update > > + else > > + debug-print "No icon files to add to database" > > + fi > > + > > if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then > > xdg_mimeinfo_database_update > > else > > @@ -77,7 +88,7 @@ xdg_pkg_postinst() { > > > > # @FUNCTION: xdg_pkg_postrm > > # @DESCRIPTION: > > -# Handle desktop and mime info database updates. > > +# Handle desktop, icon and mime info database updates. > > xdg_pkg_postrm() { > > if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then > > xdg_desktop_database_update > > @@ -85,6 +96,12 @@ xdg_pkg_postrm() { > > debug-print "No .desktop files to add to database" > > fi > > > > + if [[ ${#XDG_ECLASS_ICONS[@]} -gt 0 ]]; then > > + xdg_icon_cache_update > > + else > > + debug-print "No icon files to add to database" > > + fi > > + > > if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then > > xdg_mimeinfo_database_update > > else > > -- > Best regards, > Michał Górny