Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182792 - app-office/taxbird-0.7 fails to merge with FEATURES=collision-protect turned on in the /usr/share/mime folder
Summary: app-office/taxbird-0.7 fails to merge with FEATURES=collision-protect turned ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gunnar Wrobel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-21 14:28 UTC by Bernd Waibel
Modified: 2007-08-14 15:58 UTC (History)
0 users

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


Attachments
contents of emerge --info (emerge-info.txt,9.30 KB, text/plain)
2007-06-21 14:30 UTC, Bernd Waibel
Details
ebuild patch to use the fdo-mime eclass (taxbird-0.7-mime.patch,949 bytes, patch)
2007-06-23 12:18 UTC, Bernd Waibel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Waibel 2007-06-21 14:28:47 UTC
When trying to merge taxbird 0.7 it fails with the following error:
* checking 51 files for package collisions
existing file /usr/share/mime/XMLnamespaces is not owned by this package
existing file /usr/share/mime/globs is not owned by this package
existing file /usr/share/mime/magic is not owned by this package
existing file /usr/share/mime/subclasses is not owned by this package
existing file /usr/share/mime/aliases is not owned by this package
existing file /usr/share/mime/mime.cache is not owned by this package
* This package is blocked because it wants to overwrite
* files belonging to other packages (see messages above).
* If you have no clue what this is all about report it 
* as a bug for this package on http://bugs.gentoo.org

package app-office/taxbird-0.7 NOT merged

The automatic search for file collisions won't find any packages those files belong to. A manual search using equery gave me the same result.

As far as I understand, those files (or at least some of them) are usually created using the update-mime-database script. So, imo the ebuild should use this standard method to install it's mime files.


Reproducible: Always

Steps to Reproduce:
1. emerge taxbird
2.
3.

Actual Results:  
Installation stops at merge time with a collision error.

Expected Results:  
The mime files, or at least some of them, should be created by the update-mime-database script?
Comment 1 Bernd Waibel 2007-06-21 14:30:04 UTC
Created attachment 122699 [details]
contents of emerge --info
Comment 2 Bernd Waibel 2007-06-21 14:30:55 UTC
Comment on attachment 122699 [details]
contents of emerge --info

the contents was too long for the comment field
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-06-21 15:22:07 UTC
Well; we cannot fix collisions with orphaned files. Feel free to reopen once you've found out what's installed them.
Comment 4 Bernd Waibel 2007-06-23 11:44:04 UTC
I don't think those files are orphaned. They are usually created by /usr/bin/update-mime-database from the x11-misc/shared-mime-info package. I tried and deleted them and then called the update-mime-database program and any of those files was recreated by it.

There is also an eclass /usr/portage/eclass/fdo-mime.eclass containing a function fdo-mime_mime_database_update(). I suppose this function usually does this job, for example when installing a gnome related package, this function seems to get called, according to the output "Updating shared mime info database..." that usually occurs on such installs and is part of said function.

Shouldn't those files get updated in this way, instead of having the taxbird ebuild installing it's own mime files but NOT updating the global mime cache?

I tried and removed all the files and then emerged taxbird and called update-mime-database manually. The then generated files differ only in entries to taxbird:

morgaine portage # diff -u /mnt/backup/gentoo/mime/globs /usr/share/mime/globs   
--- /mnt/backup/gentoo/mime/globs       2007-06-21 16:02:34.000000000 +0200
+++ /usr/share/mime/globs       2007-06-22 03:35:52.000000000 +0200
@@ -256,6 +256,7 @@
 application/x-kontour:*.kon
 application/x-qw:*.qif
 application/x-config:*.config
+application/x-taxbird:*.txb
 application/x-magicpoint:*.mgp
 text/x-readme:README*
 application/x-designer:*.ui

and

morgaine portage # diff -u /mnt/backup/gentoo/mime/subclasses /usr/share/mime/subclasses 
--- /mnt/backup/gentoo/mime/subclasses  2007-06-21 16:02:34.000000000 +0200
+++ /usr/share/mime/subclasses  2007-06-22 03:35:52.000000000 +0200
@@ -184,6 +184,7 @@
 application/rtf text/plain
 application/vnd.oasis.opendocument.database application/zip
 text/htmlh text/plain
+application/x-taxbird text/plain
 application/vnd.oasis.opendocument.presentation application/zip
 text/x-matlab text/plain
 text/x-java text/x-csrc

The /usr/share/mime/mime.cache file also has binary differences. All other reported files are identical.

Do I understand anything wrong when I suppose that the taxbird ebuild should only install/merge the /usr/share/mime/application/x-taxbird.xml and /usr/share/mime/packages/taxbird.xml files and then call the said function from the fdo-mime eclass instead of pre-creating and then installing all the reported files?

Comment 5 Bernd Waibel 2007-06-23 12:18:23 UTC
Created attachment 122887 [details, diff]
ebuild patch to use the fdo-mime eclass

I'm not into the insides of writing an ebuild, but the attached patch hack to the taxbird-0.7 ebuild does work for me. I'm not sure, whether the call to fdo-mime_desktop_database_update() is necessary, but as there's a file installed into the /usr/share/applications folder, I thought it's better to also call this function beside the fdo-mime_mime_database_update() function.
Comment 6 Gunnar Wrobel (RETIRED) gentoo-dev 2007-08-14 15:58:06 UTC
Thanks for the report, the analysis and the fix!

Has been added to the newer taxbird-0.10 ebuild. Hope this resolves the problem.