Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22264 - bittorrent ebuild overwrites /etc/mailcap entry w/o sysadmin approval
Summary: bittorrent ebuild overwrites /etc/mailcap entry w/o sysadmin approval
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo net-p2p team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-05 04:07 UTC by Sean Camanyag
Modified: 2005-10-20 16:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Camanyag 2003-06-05 04:07:09 UTC
Some people need or want to have their own default parameters passed to
bittorrent (max_uploads, max_upload_rate, etc), so they have to edit the
application/x-bittorrent entry /etc/mailcap accordingly. 

The pkg_postinst() in the bittorrent ebuild just wipes out any bittorrent entry
in /etc/mailcap and replaces it with its default. While bittorrent isn't a
frequently updated package, this still means that whenever an update is emerged,
any changes made to the mailcap entry are lost and need to be re-added manually.

Perhaps the next revision of the bittorrent ebuild should instead copy the
existing /etc/mailcap to /etc/._cfgetcetc_mailcap, do its sed work on the _cfg
file, and then leave it to the the sysadmin to decide via etc-update if the
changes to the application/x-bittorrent line should take place?
Comment 1 Patrick Kursawe (RETIRED) gentoo-dev 2003-06-10 08:22:49 UTC
Now it copies /etc/mailcap and puts the modified version in its installation tree. This should lead to the default portage behaviour for a modified /etc/mailcap - even if this seemed sometimes a bit strange when I played around with it. Please give it a try and report.
Comment 2 Sean Camanyag 2003-06-10 10:28:43 UTC
It works just as you described, /etc/mailcap now shows up in etc-update's list and allows choice of merging or discarding the changes to the bittorrent entry. Thanks Patrick.
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2003-06-10 23:14:27 UTC
Ok, closing this bug.
Comment 4 Patrick Kursawe (RETIRED) gentoo-dev 2003-06-11 23:46:00 UTC
have to re-open in order to set it to fixed
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2003-06-11 23:46:13 UTC
fixed
Comment 6 Andrej Kacian (RETIRED) gentoo-dev 2005-10-20 14:37:15 UTC
No package should overwrite file owned by another package (net-mail/mailbase in 
this case).
I propose a different solution - mailbase will provide /etc/mailcap file with 
correct application/x-bittorrent entry accordingly:
net-mail/mailbase-1-r1 for <=bittorrent-4.1.3 (old naming scheme, bt*.py)
net-mail/mailbase-2 for >=bittorrent-4.1.4 (new naming scheme)

Bittorrent ebuilds can then RDEPEND on appropriate mailbase version, and will 
stop messing with the mailcap file.

Any suggestions or corrections?
Comment 7 Andrej Kacian (RETIRED) gentoo-dev 2005-10-20 14:37:52 UTC
net-p2p, please review my previous comment, and state your opinion.
Comment 8 Marcin Kryczek (RETIRED) gentoo-dev 2005-10-20 16:22:22 UTC
i've removed the mailcap entry from bittorrent ebuild. handling mime type is now 
done in .desktop file