Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728588 - app-text/pdfarranger-1.5.3 install desktop icons and fix QA warning
Summary: app-text/pdfarranger-1.5.3 install desktop icons and fix QA warning
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-06-17 19:05 UTC by Chris Mayo
Modified: 2020-07-02 12:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2020-06-17 19:05:29 UTC
pdfarranger tarball includes desktop environment theme icons in data/icons/hicolor/.

QA: compile
DISTUTILS_USE_SETUPTOOLS value is probably incorrect
  value:    DISTUTILS_USE_SETUPTOOLS=bdepend (default?)
  expected: DISTUTILS_USE_SETUPTOOLS=rdepend

/usr/lib/python-exec/python3.8/pdfarranger uses an entry point:

from pkg_resources import load_entry_point



--- pdfarranger-1.5.3.ebuild
+++ pdfarranger-1.5.3-r1.ebuild
@@ -3,15 +3,18 @@
 
 EAPI=7
 PYTHON_COMPAT=( python3_{6,7,8} )
-inherit distutils-r1
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit xdg distutils-r1
 
 DESCRIPTION="Merge or split pdfs; rearrange, rotate, crop pages."
 HOMEPAGE="https://github.com/jeromerobert/pdfarranger"
 SRC_URI="https://github.com/jeromerobert/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE=""
+
 RDEPEND="dev-python/pikepdf[${PYTHON_USEDEP}]
 	dev-python/pygobject:3[${PYTHON_USEDEP},cairo]
 	dev-python/pycairo[${PYTHON_USEDEP}]
@@ -20,3 +23,10 @@
 	app-text/poppler[introspection,cairo]"
 DEPEND="${RDEPEND}
 	dev-python/python-distutils-extra[${PYTHON_USEDEP}]"
+
+src_install() {
+	distutils-r1_src_install
+
+	insinto /usr/share/icons
+	doins -r data/icons/hicolor
+}
Comment 1 Andreas Sturmlechner gentoo-dev 2020-06-17 19:11:35 UTC
Both eclasses override src_prepare so that's a red flag. Either you do the same in the ebuild, or inherit xdg-utils instead and do pkg_postinst and pkg_postrm manually.
Comment 2 Andreas Sturmlechner gentoo-dev 2020-06-17 19:12:53 UTC
(In reply to Andreas Sturmlechner from comment #1)
> Both eclasses override src_prepare so that's a red flag.
On the other hand, as long as current inherit order is preserved xdg_src_prepare is ignored and it is not doing anything important for this ebuild.
Comment 3 Andreas Sturmlechner gentoo-dev 2020-06-26 07:30:59 UTC
In case it is unclear why xdg.eclass is needed:

> * QA Notice: .desktop files with MimeType= were found installed
> * but desktop mimeinfo cache has not been updated:
> *   /usr/share/applications/com.github.jeromerobert.pdfarranger.desktop
> * Please make sure to call xdg_desktop_database_update()
> * in pkg_postinst() and pkg_postrm() phases of appropriate pkgs.
Comment 4 Larry the Git Cow gentoo-dev 2020-07-02 12:16:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc85726ca4d942416af10efd820a672a634801fa

commit dc85726ca4d942416af10efd820a672a634801fa
Author:     Andrey Grozin <grozin@gentoo.org>
AuthorDate: 2020-07-02 12:16:18 +0000
Commit:     Andrey Grozin <grozin@gentoo.org>
CommitDate: 2020-07-02 12:16:18 +0000

    app-text/pdfarranger: install icons
    
    Closes: https://bugs.gentoo.org/728588
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Andrey Grozin <grozin@gentoo.org>

 app-text/pdfarranger/pdfarranger-1.5.3-r1.ebuild | 41 ++++++++++++++++++++++++
 1 file changed, 41 insertions(+)