Subject: x2gomatebindings fails to install from RPM

From: Michael DePaulo <[email-masked]>
Date: Tue, 17 Mar 2015 08:00:06 -0400

Package:x2gomatebindings
Version: 0.0.1.3

As reported by Matt1 on IRC, and reproduced by myself,
x2ogmatebindings fails to install on Fedora 21 (64-bit), and
presumably every other RPM-based distro:
http://pastebin.com/PUZ6Mgec

Error: Package:
x2gomatebindings-0.0.1.3-0.0x2go1.1.git20150211.160.main.fc20.x86_64
(x2go-releases)
           Requires: or

It appears to be due to line 31 in x2gomatebindings.spec:
Requires:       gtk2 or gtk3

---

From: Mihai Moldovan <[email-masked]>
Date: Wed, 18 Mar 2015 06:00:17 +0100

> It appears to be due to line 31 in x2gomatebindings.spec:

"gtk2 or gtk3"? This sounds strange. Not only because it obviously
doesn't work, but also because x2gomatebindings ships a *library* which
links to GTK2. Even if the or-dependency would have worked, gtk3 as the
only installed package would have left x2gomatebindings (theoretically)
in a broken state.

Luckily, though, RPM automatically adds dependencies on other packages*
for libraries, by examining what libraries are being linked after
destrooting. Thus, gtk2 will always be pulled in automatically**.

The Requires: statement was semantically thus redundant in the best case
and incorrect/causing breakage in the worst case.

Mihai

*) this mechanism will not catch libraries loaded at run time via
dlopen() for instance. This is mostly used for modules. One example of
software making heavy usage of that is wine.
**) I'm making a mental note here to revisit this issue. While run time
dependencies are automatically added *for libraries*, BuildRequires
still need to be set correctly or building the package will fail.