Re: [gentoo-user] Broken binary packages

2020-07-18 Thread Rich Freeman
On Sat, Jul 18, 2020 at 6:36 AM Alexander Puchmayr
 wrote:
>
> Is there a better way to solve this? Is it possible to tell mythtv's build
> system to ignore the unwanted libraries if the xmltv use-flag is NOT set?

Maybe, and if you do please do submit a patch.

We refer to these sorts of build systems as "automagic" and they can
be pretty problematic in situations like this.

There are really only two ways to go about fixing this sort of thing
systematically at a Gentoo level:

1.  Go and patch all the build systems not to behave this way, or
discover all the necessary override options (if available) and pass
every one of them.  This is the current preferred way and has
everybody's full support, but it isn't easy and so it often doesn't
happen.
2.  Change portage to either use mount namespaces or the sandbox to
prevent anything not in a specified dependency (which could include
@system) from being seen or read at build time.  IMO this is the
cleaner solution and some other distros do it this way.  As a
side-effect it would probably eliminate a lot of bugs where deps were
missed in the ebuild.  This should defeat most problems with automagic
build systems.

Right now you're either going to have to fix the ebuild yourself (and
please submit a bug with the fix), or keep your hosts more in sync so
that the same binary works on both.

-- 
Rich



[gentoo-user] Broken binary packages

2020-07-18 Thread Alexander Puchmayr
Hi there,

I'm using a build host to generate all packages for my different machines in my 
local network; Not every machine gets every package. 

I encountered a problem where a package that looks absolutely fine on the 
buildhost but on the target machine its broken since some libraries are 
missing. NB: I previously did an emerge -e world before on the buildhost.

As an example I'd like to take media-tv/mythtv-31.0-r1, which has a dependency 
to dev-qt/qtwebkit:5 if the xmltv useflag is set:

buildhost-desktop ~ # equery depends dev-qt/qtwebkit-5.212.0_pre20200309-r1
 * These packages depend on dev-qt/qtwebkit-5.212.0_pre20200309-r1:
dev-python/PyQt5-5.14.2 (webkit ? dev-qt/qtwebkit:5[printsupport])
dev-qt/designer-5.14.2 (webkit ? >=dev-qt/qtwebkit-5.9.1:5)
dev-util/kdevelop-5.5.2 (webkit ? >=dev-qt/qtwebkit-5.212.0_pre20180120:5)
kde-apps/k3b-19.12.3 (webkit ? >=dev-qt/qtwebkit-5.212.0_pre20180120:5)
kde-apps/kdenlive-19.12.3-r3 (freesound ? >=dev-qt/
qtwebkit-5.212.0_pre20180120:5)
kde-apps/umbrello-19.12.3 (>=dev-qt/qtwebkit-5.212.0_pre20180120:5)
media-gfx/digikam-6.4.0-r1 (webkit ? >=dev-qt/qtwebkit-5.212.0_pre20180120:5)
media-gfx/wkhtmltopdf-0.12.5 (dev-qt/qtwebkit:5[printsupport])
media-tv/mythtv-31.0-r1 (xmltv ? dev-qt/qtwebkit:5)
net-misc/teamviewer-15.4.4445 (dev-qt/qtwebkit:5)

The Useflag "xmltv" is not set, but since the packages kde-apps/umbrello and  
media-gfx/wkhtmltopdf have a direct dependency to dev-qt/qtwebkit, it is 
installed on the buildhost. 
When building mythtv, it finds the webkit libraries and headers installed and 
uses it, even if the xmltv-useflag is NOT set(!), yielding a binary that has an 
implicit dependency to qtwebkit, but portage does not know of it.

When I install now the mythtv package on my laptop, where none of the other 
packages are installed that require qtwebkit, there's no need for portage to 
install it, and so we get a broken mythtv package. 

I see several ways to solve this, but none is really satisfying:
* set the xmltv use flag to mythtv to get an explict dependency -- I don't want 
it and I don't need it.
* rebuild mythtv on my 12-year old notebook locally -- nothing I'd really like 
to do.
* Install qtwebkit in the world set -- I don't like those library packages in 
the world set
* remove those packages requiring qtwebkit explicity, then rebuild mythtv, 
build package, install on notebook and rebuild/reinstall the removed packages 
on the buildhost again -- too cumbersome and I have the same problem again at 
the next update session. And mythtv is not the only package that may cause 
such problems, so I would have to do this in many different combinations.

Is there a better way to solve this? Is it possible to tell mythtv's build 
system to ignore the unwanted libraries if the xmltv use-flag is NOT set?

Regards
Alex