Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671850 - app-text/zathura-0.4.1 should not depend on dev-libs/appstream
Summary: app-text/zathura-0.4.1 should not depend on dev-libs/appstream
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard: revbump alongside with sphinx dep iss...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-25 10:13 UTC by Cedric Sodhi
Modified: 2018-12-23 08:13 UTC (History)
2 users (show)

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


Attachments
ebuild ... install (install.log,7.92 KB, text/x-log)
2018-11-25 17:35 UTC, Cedric Sodhi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Sodhi 2018-11-25 10:13:53 UTC
Appstream is only used for build-time tests here

https://git.pwmt.org/pwmt/zathura/blob/2c2bec639c296741e1ef7dc77e19bdef0344d67a/data/meson.build#L40

and probably shouldn't be a dependency.
Comment 1 Mart Raudsepp gentoo-dev 2018-11-25 11:05:17 UTC
That's not even appstream, that's appstream-glib.
The ebuild deps are rather wrong here.

There must be a dev-libs/appstream-glib build DEPEND, because this part will need /usr/share/gettext/its/appdata.{its,loc} files to succeed, which are shipped by appstream-glib:

appdata = i18n.merge_file('appdata',
  input: 'org.pwmt.zathura.appdata.xml.in',

I don't know what appstream RDEP is for, however appstream-glib IS required at build time, but is missing in the ebuild. Maybe appstream is a mistake from maintainer after reading "appstream-util", or build problem was solved by adding appstream dep (but that's only because that in turn indirectly pulls in appstream-glib too), or it's really needed somewhere else.
Comment 2 Cedric Sodhi 2018-11-25 12:06:04 UTC
Adding for reference:

> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47a950b00c6db38
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-25 15:55:06 UTC
Should be fixed
Comment 4 Mart Raudsepp gentoo-dev 2018-11-25 17:17:25 UTC
I don't see it fixed - there is a missing appstream-glib build depend now.
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-25 17:21:04 UTC
(In reply to Mart Raudsepp from comment #4)
> I don't see it fixed - there is a missing appstream-glib build depend now.

this is not needed for either building or testing
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-25 17:21:14 UTC
(or running)
Comment 7 Cedric Sodhi 2018-11-25 17:22:35 UTC
(In reply to Mart Raudsepp from comment #4)
> I don't see it fixed - there is a missing appstream-glib build depend now.

Mart, I believe that this problem exists in principle, but I'd say this bug shouldn't be closed in either sense, with or without that dependency until we have examined what exactly is going on, since, as we discussed on IRC, I have no indication for this behaviour, whatsoever. I have neither appstream, nor appstream-glib installed, yet meson installs zathura without any errors or warnings. Therefore, I think this warrants further investigation before closure.
Comment 8 Mart Raudsepp gentoo-dev 2018-11-25 17:32:27 UTC
(In reply to Mikle Kolyada from comment #5)
> (In reply to Mart Raudsepp from comment #4)
> > I don't see it fixed - there is a missing appstream-glib build depend now.
> 
> this is not needed for either building or testing

It is needed at install phase for merging translations into the appdata file.

I have investigated this topic for meson builds for over 4 hours for cantarell, epiphany and more. It is needed or msgfmt will error when called by meson, as it won't know what to do with a *.appdata.xml{,in} file. Due to dark magic inside gettext, it might not be needed in some situations, like if it figures it doesn't have to translate anything, as LINGUAS is set to an empty string or something. But for actual translations it is needed.

That said, I'm not in a position to cleanly test this, as appstream-glib is rather necessary on my systems. But remember, this might be an error at src_install phase without it, just running ebuild ... test doesn't cut it. You can try with "ebuild ... install" without appstream-glib present.
Comment 9 Cedric Sodhi 2018-11-25 17:35:29 UTC
Created attachment 556250 [details]
ebuild ... install

I've examined the build a bit closer and it appears that the files (appdata and desktop files) are parsed from their *.in templates into their outputs just fine, but it also looks like they contain nothing to be processed by gettext. I've attached the output of `ebuild install` with no appstream* packages so you can check whether you agree.
Comment 10 Mart Raudsepp gentoo-dev 2018-11-25 17:43:23 UTC
Odd - maybe gettext knows about appdata, but not metainfo, yet appstream-glib installs ITS rules for both. I'll investigate this for myself; no appstream-glib dep meanwhile is fine, but the effect might be much wider (in terms of removing appstream-glib build deps from already existing places and changing the guidelines I have for this - for myself for now, but this will eventually end up on the wiki).

Temporarily moving away /usr/share/gettext/its/appdata.{its,loc} immediately breaks cantarell build, which happens to use "*.metainfo.xml", but not zathura, that happens to use "*.appdata.xml" (but installs in non-legacy metainfo path). So gettext must know about appdata without the appstream-glib .loc file
Comment 11 Mart Raudsepp gentoo-dev 2018-11-25 17:47:19 UTC
OK, gettext installs appdata.loc itself too:

/usr/share/gettext-0.19.8/its/appdata.loc

But that only contains instructions for *.appdata.xml (which has longer history than *.metainfo.xml, which was added as new metainfo path and meant for non-applications for the filename, like cantarell is), but not yet *.metainfo.xml.
Presumably a future gettext will include information about metainfo itself as well, at which point we could stop adding build depends for this.

For zathura it's fine then, however you are missing gettext build depend still, and that should be new enough to support ITS and also ship that *.loc file. >=sys-devel/gettext-0.19.8 should be sufficient.
Comment 12 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-25 17:48:12 UTC
(In reply to Mart Raudsepp from comment #8)
> (In reply to Mikle Kolyada from comment #5)
> > (In reply to Mart Raudsepp from comment #4)
> > > I don't see it fixed - there is a missing appstream-glib build depend now.
> > 
> > this is not needed for either building or testing
> 
> It is needed at install phase for merging translations into the appdata file.
> 
> I have investigated this topic for meson builds for over 4 hours for
> cantarell, epiphany and more. It is needed or msgfmt will error when called
> by meson, as it won't know what to do with a *.appdata.xml{,in} file. Due to
> dark magic inside gettext, it might not be needed in some situations, like
> if it figures it doesn't have to translate anything, as LINGUAS is set to an
> empty string or something. But for actual translations it is needed.
> 
> That said, I'm not in a position to cleanly test this, as appstream-glib is
> rather necessary on my systems. But remember, this might be an error at
> src_install phase without it, just running ebuild ... test doesn't cut it.
> You can try with "ebuild ... install" without appstream-glib present.

well,I tested this with and without appstream and co before adding to the tree (but then forgot to remove this), for some days. I did not face any references for adding this explicityly
Comment 13 Larry the Git Cow gentoo-dev 2018-12-23 08:13:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0684d7ca62a3e54556e4e93dd093b08a11c88125

commit 0684d7ca62a3e54556e4e93dd093b08a11c88125
Author:     Mikle Kolyada <zlogene@gentoo.org>
AuthorDate: 2018-12-23 08:12:52 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2018-12-23 08:12:52 +0000

    app-text/zathura: Add missing gettext dependency
    
    Closes: https://bugs.gentoo.org/671850
    Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 app-text/zathura/zathura-0.4.1-r2.ebuild | 65 ++++++++++++++++++++++++++++++++
 app-text/zathura/zathura-9999.ebuild     |  1 +
 2 files changed, 66 insertions(+)