Bug 1483644 - metainfo() dependency generator mishandles /usr/share/metainfo/*.appdata.xml files
Summary: metainfo() dependency generator mishandles /usr/share/metainfo/*.appdata.xml ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1493204 (view as bug list)
Depends On:
Blocks: F27FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2017-08-21 15:10 UTC by Petr Pisar
Modified: 2017-11-06 13:01 UTC (History)
10 users (show)

Fixed In Version: rpm-4.14.0-rc1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-06 12:16:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2017-08-21 15:10:13 UTC
AppData specification <https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps> renamed 
/usr/share/appdata directory to /usr/share/metainfo.

When packaging gscan2pdf-1.8.5-1.fc28 that updated the location of gscan2pdf.appdata.xml file, the generated Provide is wrong:

Before the move: metainfo(gscan2pdf.appdata.xml)
After the move: metainfo(/home/test/rpmbuild/BUILDROOT/gscan2pdf-1.8.5-1.fc28.x86_64/usr/share/metainfo/gscan2pdf.appdata.xml)

I have rpm-build-4.13.90-0.git14002.6.fc28.x86_64.

Comment 1 Igor Gnatenko 2017-08-21 16:34:55 UTC
It seems like RPM expects metainfo,xml in /usr/share/metainfo and appdata.xml in /usr/share/appdata... Which I think is wrong.

CCing hughsie for advise ;)

Comment 3 Richard Hughes 2017-08-21 17:16:52 UTC
I think either can go in either place, although /usr/share/metainfo is the non-deprecated location.

Comment 4 Panu Matilainen 2017-09-07 10:48:39 UTC
Fixed as of rpm 4.14.0-rc1

Comment 5 Igor Gnatenko 2017-09-19 15:14:23 UTC
*** Bug 1493204 has been marked as a duplicate of this bug. ***

Comment 6 Mat Booth 2017-09-19 15:30:07 UTC
Hi Igor,

Sorry I did not see this duplicate because it is closed. So do you plan to backport the fix to F27, where the problem still exists?

Comment 7 Igor Gnatenko 2017-09-19 17:07:01 UTC
(In reply to Mat Booth from comment #6)
> Hi Igor,
> 
> Sorry I did not see this duplicate because it is closed. So do you plan to
> backport the fix to F27, where the problem still exists?

F27 has same version of RPM as Rawhide... Probably it's just in updates-testing still...

Comment 8 Mat Booth 2017-09-19 20:16:39 UTC
(In reply to Igor Gnatenko from comment #7)
> (In reply to Mat Booth from comment #6)
> > Hi Igor,
> > 
> > Sorry I did not see this duplicate because it is closed. So do you plan to
> > backport the fix to F27, where the problem still exists?
> 
> F27 has same version of RPM as Rawhide... Probably it's just in
> updates-testing still...

And we are in Freeze period. Hmm, okay, I guess I can wait until after F27 beta.

Comment 9 Mat Booth 2017-09-19 20:17:09 UTC
Or consider adding buildroot override... :-)

Comment 10 Petr Pisar 2017-11-06 12:06:07 UTC
This still does not look correct to me. rpm-build-4.14.0-3.fc28.x86_64 generates two metainfo() provides now. One correct and one empty:

$ rpm -q --provides -p noarch/gscan2pdf-1.8.8-1.fc28.noarch.rpm |grep metainfo
metainfo()
metainfo(gscan2pdf.appdata.xml)

(Please note the gscan2pdf.spec has been modified to work around it.)

Comment 11 Igor Gnatenko 2017-11-06 12:16:53 UTC
(In reply to Petr Pisar from comment #10)
> This still does not look correct to me. rpm-build-4.14.0-3.fc28.x86_64
> generates two metainfo() provides now. One correct and one empty:

This is expected. This is done for faster lookup of provides.

Comment 12 Petr Pisar 2017-11-06 13:01:09 UTC
(In reply to Igor Gnatenko from comment #11)
> (In reply to Petr Pisar from comment #10)
> > This still does not look correct to me. rpm-build-4.14.0-3.fc28.x86_64
> > generates two metainfo() provides now. One correct and one empty:
> 
> This is expected. This is done for faster lookup of provides.

Have you considered that this redundant dependency wastes space in the repository database?


Note You need to log in before you can comment on or make changes to this bug.