Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 660308 - xdg.eclass: incorrect use of DEPEND
Summary: xdg.eclass: incorrect use of DEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
: 685916 (view as bug list)
Depends on: IDEPEND
Blocks:
  Show dependency tree
 
Reported: 2018-07-03 21:52 UTC by Michał Górny
Modified: 2022-04-12 04:41 UTC (History)
4 users (show)

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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-07-03 21:52:28 UTC
The eclass specifies:

DEPEND="
	dev-util/desktop-file-utils
	x11-misc/shared-mime-info
"

However, this is incorrect since those packages are *not* used at build time but in pkg_* phases.  Per PMS, those phases guarantee only RDEPEND [1], so those dependencie really belong in RDEPEND.

[1]:https://projects.gentoo.org/pms/7/pms.html#x1-680008.1
Comment 1 Gilles Dartiguelongue gentoo-dev 2018-11-29 08:53:04 UTC
I think we discussed this on IRC already, just writing down the arguments again for historical purpose. These dependencies are DEPEND in the context of the eclass as at some point in time, most packages that used them, needed them during build, either as a configure check or run at install-local target. Also these packages are not required once they have done their cache update job so having it in DEPEND allowed for their removal after build.

I understand this isn't correct wrt PMS but this will take time to inspect all packages using it to set it right.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-17 07:33:22 UTC
*** Bug 685916 has been marked as a duplicate of this bug. ***
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-17 07:34:25 UTC
They should be BDEPEND+RDEPEND then.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 04:41:48 UTC
Fixed by:

commit 8f7593ab923d047fe43ee96a4d59613354b1ef01
Author: Florian Schmaus <flow@gentoo.org>
Date:   Thu Jul 15 13:14:23 2021 +0200

    xdg.eclass: add EAPI 8 support

    Note that this removes the export of src_prepare in EPAI 8 as
    requested by ionen:

      1. remove src_prepare export in EAPI-8

      While "some" packages need xdg_environment_reset, most don't because
      the eclass is often only inherited to handle icons/.desktop and this
      just needlessly overwrite the src_prepare of other eclasses requiring
      more careful inherit ordering (e.g. inherit xdg cmake).

      I'd prefer it was clear when a package need this by calling
      xdg_environment_reset directly. Unless there is a non-trivial amount
      of packages that need it (e.g. for tests) that I'm not aware of.

    Thanks to ulm and others for providing feedback.

    Signed-off-by: Florian Schmaus <flow@gentoo.org>