Summary: | app-text/pdfarranger and USE to request media-gfx/img2pdf | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christophe PEREZ <chris> |
Component: | Current packages | Assignee: | Andrey Grozin <grozin> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | sbraz |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Christophe PEREZ
2021-02-25 13:49:19 UTC
Package informs you post installation:
> * Optional dependency:
> * media-gfx/img2pdf for image file import
Otherwise Portage does not yet support optional runtime dependencies.
I don't understand. If you have a USE "img" for pdfarranger, and img2pdf as a dependency on this useflag, why it shouldn't work ? You have this on every gentoo ebuild. Why not here ? USE="img" emerge pdfarranger => img2pdf + pdfarranger USE="-img" emerge pdfarranger => pdfarranger I must not manage to make myself understood. # diff -u /usr/portage/app-text/pdfarranger/pdfarranger-1.6.2.ebuild /usr/local/portage/app-text/pdfarranger/pdfarranger-1.6.2.ebuild --- /usr/portage/app-text/pdfarranger/pdfarranger-1.6.2.ebuild 2021-02-11 15:39:19.000000000 -0400 +++ /usr/local/portage/app-text/pdfarranger/pdfarranger-1.6.2.ebuild 2021-02-25 10:08:06.965508654 -0400 @@ -14,7 +14,7 @@ LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64" -IUSE="" +IUSE="img" RDEPEND=" app-text/poppler[introspection,cairo] @@ -23,6 +23,7 @@ dev-python/pygobject:3[${PYTHON_USEDEP},cairo] x11-libs/gtk+:3[introspection] x11-libs/pango[introspection] + img? ( media-gfx/img2pdf ) " DEPEND="${RDEPEND} dev-python/python-distutils-extra[${PYTHON_USEDEP}] And it works like I suggested. I don't understand the problem at all. Support by Portage would mean that switching the IUSE would not cause package rebuild. https://www.gentoo.org/glep/glep-0062.html Optional IUSE that are effective exclusively in RDEPEND are banned by QA. As long as that is the case, we have optfeature.eclass that is used in this package. Of course another solution the package maintainer may choose to do is making media-gfx/img2pdf a permanent RDEPEND. I don't understand all answers.
Isn't it possible to add a USE flag "image" to make img2pdf as a dependency when we want to use pdfarranger with images ?
I don't understand all about
> Optional IUSE that are effective exclusively in RDEPEND are banned by QA.
> As long as that is the case, we have optfeature.eclass that is used in this
> package.
But I don't care.
I find it silly not to want to add a USE flag for an option provided by the software developer and even mentioned in the ebuild itself. This is the very principle of the USE flag.
Hi Christophe, As Andreas explained, we cannot do that because it's *strictly* a runtime dependency. It does not need to be here during the build phase. If we add this flag and emerge pdfarranger with USE=img, we will rebuild pdfarranger, which is not necessary. This is why such USE flags are banned (even though you might see a few ebuilds in the tree that have them, for historical reasons). To complement my explanation, here is an excerpt from https://devmanual.gentoo.org/general-concepts/use-flags/index.html: > The usage of a USE flag should not control runtime dependencies when the package does not link to it. Doing so will create extra configuration for the package and re-compilation for no underlying file change on disk. This should be avoided and instead can be conveyed to the user via post install messages if needed. |