Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167893 - merging media-tv/freevo-1.6.1 overwrites file in /etc
Summary: merging media-tv/freevo-1.6.1 overwrites file in /etc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robert Buchholz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 17:56 UTC by Daniel Peters
Modified: 2007-07-15 19:25 UTC (History)
3 users (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 Daniel Peters 2007-02-21 17:56:47 UTC
While merging media-tv/freevo-1.6.1, it overwrites the existing /etc/freevo/freevo.conf. This happens because of '"/usr/bin/freevo" setup ${myconf} || die "configure problem"' in the pkg_postinst function. IMHO the easiest solution is to skip the line if the file is already present, like 
if [ ! -e /etc/freevo/freevo.conf ] ; then
  "/usr/bin/freevo" setup ${myconf} || die "configure problem"
else
  einfo "Skipping generation of /etc/freevo/freevo.conf"
fi

FF,

 Daniel
Comment 1 Matteo Azzali (RETIRED) gentoo-dev 2007-02-21 19:56:28 UTC
Are you sure that this is an issue? I always used to duplicate that file into
/home/user/.freevo/ and then personalize it, as the file in home directory
takes priority and that configuration can be personalized per-user.

Also this is the suggested standard procedure for local_conf.py ,
new freevo documentation changed this behaviour?
Comment 2 Daniel Peters 2007-02-21 21:16:50 UTC
(In reply to comment #1)
> Are you sure that this is an issue?

IMO, yes.

From http://devmanual.gentoo.org/general-concepts/config-protect/index.html :

"Packages must not attempt to override this system via pkg_postinst or similar."

Sorry about RTFMing, but admins who configure for a multi-user system will be caught by this unexpectingly.

FF,

 Daniel
Comment 3 Matteo Azzali (RETIRED) gentoo-dev 2007-02-22 09:13:15 UTC
Don't apologize, for sure something should be changed in the ebuild,
but that manual page means only that the lines regarding /etc/freevo.conf
should probably be placed inside src_install() instead than pkg_postinst(),
while the solution you suggested would mean that /etc/freevo.conf would
never be overwritten (that's bad!).
Comment 4 Ian Stakenvicius 2007-07-11 20:14:56 UTC
The new ebuild for 1.7.2 has fixed this -- freevo.conf is updated in the usual config-protect way, no explicit overwrites.

(note, freevo is moving to sunrise as there is no official dev to maintain it)
Comment 5 Robert Buchholz (RETIRED) gentoo-dev 2007-07-15 19:25:10 UTC
I believe this is fixed in media-tv/freevo-1.7.2.
Because <1.7 will not go stable, it won't be fixed there and the ebuilds removed soon.

The "freevo setup" part is now executed in src_install since this is the only way I can think of to enable config protection. This sets up sane defaults based on the user's USE flags, but it could also break mplayer and other's PATH detection when using pre-built binpkgs.

Please reopen with better ideas.