Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 505408 - dev-libs/gobject-introspection should RDEPEND on virtual/pkgconfig
Summary: dev-libs/gobject-introspection should RDEPEND on virtual/pkgconfig
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-03-23 09:08 UTC by James Le Cuirot
Modified: 2015-10-14 21:49 UTC (History)
1 user (show)

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


Attachments
gobject-introspection-pkgconfig.patch (gobject-introspection-pkgconfig.patch,518 bytes, patch)
2014-03-23 09:08 UTC, James Le Cuirot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2014-03-23 09:08:49 UTC
Created attachment 373296 [details, diff]
gobject-introspection-pkgconfig.patch

gobject-introspection requires pkg-config at runtime as well as build time. If you look at the process_packages function in giscanner/scannermain.py, you'll see that it calls pkg-config with Popen.

This probably won't have effected anyone before because it's already pulled in by DEPEND. It caught me out because I've applied some tricks to make it cross-compile with the help of QEMU/proot and this requires pkg-config to be present on the target.

See the attached patch.
Comment 1 Pacho Ramos gentoo-dev 2014-03-30 10:43:25 UTC
+  30 Mar 2014; Pacho Ramos <pacho@gentoo.org>
+  gobject-introspection-1.38.0.ebuild:
+  virtual/pkgconfig needed at runtime too (#505408 by James Le Cuirot)
+
Comment 2 Nikoli 2014-08-16 16:54:14 UTC
Are you sure pkg-config should be in RDEPEND of gobject-introspection? May be it should only be in DEPEND of reverse dependencies? Please explain.
Comment 3 James Le Cuirot gentoo-dev 2014-08-16 19:14:47 UTC
I understand your reasoning but I don't agree with it. If you install gobject-introspection then it should work as expected, regardless of whether it is only normally used when building other packages. What if you wanted to manually build something that requires it? I can't imagine why this would be a problem for you?
Comment 4 Nikoli 2014-08-16 19:52:04 UTC
> What if you wanted to manually build something that requires it?

A lot other packages are required for building manually, users are expected to read docs and install them when needed. gobject-introspection does not have cmake, automake, scons, gettext and a lot other required for building different packages tools, so why make pkg-config something special and keep it in RDEPEND?

> I can't imagine why this would be a problem for you?

Because i do not want to have pkg-config installed in my systems, prefer keep them minimal and use binhosts.
Comment 5 James Le Cuirot gentoo-dev 2014-08-16 20:44:31 UTC
(In reply to Nikoli from comment #4)
> > What if you wanted to manually build something that requires it?
> 
> A lot other packages are required for building manually, users are expected
> to read docs and install them when needed. gobject-introspection does not
> have cmake, automake, scons, gettext and a lot other required for building
> different packages tools, so why make pkg-config something special and keep
> it in RDEPEND?

Right but gobject-introspection never actually calls any of those things by itself. However, it *does* call pkg-config. This is a legitimate run-time dependency.

# grep -rI pkg-config /usr/lib/gobject-introspection
/usr/lib/gobject-introspection/giscanner/scannermain.py:                      help="pkg-config packages to get cflags from")
/usr/lib/gobject-introspection/giscanner/scannermain.py:                      help="Associated pkg-config packages for this library")
/usr/lib/gobject-introspection/giscanner/scannermain.py:    args = ['pkg-config', '--cflags']
/usr/lib/gobject-introspection/giscanner/scannermain.py:    # Some pkg-config files on Windows have options we don't understand,
/usr/lib/gobject-introspection/giscanner/annotationmain.py:                     help="pkg-config packages to get cflags from")
/usr/lib/gobject-introspection/giscanner/dumper.py:        self._pkgconfig_cmd = os.environ.get('PKG_CONFIG', 'pkg-config')
/usr/lib/gobject-introspection/giscanner/dumper.py:        # Enable the --msvc-syntax pkg-config flag when
/usr/lib/gobject-introspection/giscanner/dumper.py:        # Enable the --msvc-syntax pkg-config flag when

> > I can't imagine why this would be a problem for you?
> 
> Because i do not want to have pkg-config installed in my systems, prefer
> keep them minimal and use binhosts.

pkg-config has no dependencies and takes up a colossal 172KB. If this seems like massive wastage to you then disable the introspection USE flag instead. I don't know of anything that really needs it except GNOME 3 and even then I don't think it's a hard requirement.
Comment 6 James Le Cuirot gentoo-dev 2014-08-16 20:52:37 UTC
Sorry, I did miss that it depends on glib. But you need that already, don't you. Or if you somehow managed to avoid that, try dev-util/pkgconf.
Comment 7 Nikoli 2014-08-18 18:38:21 UTC
> However, it *does* call pkg-config. This is a legitimate run-time dependency.

So when and what for exactly is gobject-introspection using pkg-config? I still think it is used only for building other packages. Will something else be broken if pkg-config is not installed?
Comment 8 James Le Cuirot gentoo-dev 2014-08-18 19:03:51 UTC
(In reply to Nikoli from comment #7)
> So when and what for exactly is gobject-introspection using pkg-config? I
> still think it is used only for building other packages. Will something else
> be broken if pkg-config is not installed?

Yes, most likely when building other software but that software could be something you just downloaded manually or even a personal project. Even then, it still doesn't matter, an RDEPEND is an RDEPEND regardless of what the package is actually used for. What little merit your argument has is lost in the fact that pkg-config is tiny. If the run-time library from gobject-introspection were built as a separate package to the build-time tools then you could get the effect you want but that's not going to happen.
Comment 9 Nikoli 2014-08-18 21:07:43 UTC
So if pkg-config dep is required only for building other software, what is the point of having _only_ pkg-config in RDEPEND? Anyway pkg-config is not enough for building something, in most cases you need to install a lot other build time deps. I prefer to not have build time deps installed in my systems: i only install them when i want to build something and remove after building is done.
Comment 10 James Le Cuirot gentoo-dev 2014-08-18 21:18:58 UTC
I don't want to debate this any further because even after stating it several times, you seem to be missing the point. Can a dev please put in a final word so we can end this?
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2015-10-14 21:49:34 UTC
The matter is pretty simple.

What you are complaining about is that you are using g-i as an application user but the ebuild is not limited to that as James tried to explain to you.

For several reasons, the first and most important one being "we do not have manpower to spend on this", the package will stay this way because both usages are valid and acceptable for Gentoo and this is far from an exception.