Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189632 - net-misc/ntp removes /etc/ntp.conf if it exists
Summary: net-misc/ntp removes /etc/ntp.conf if it exists
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-20 19:48 UTC by Joe Peterson (RETIRED)
Modified: 2007-10-06 12:21 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 Joe Peterson (RETIRED) gentoo-dev 2007-08-20 19:48:18 UTC
If one installs ntp fresh, then re-installs (emerge -1 ntp), /etc/ntp.conf will be removed.  It will then be re-instantiated on the next emerge -1 ntp (and removed the next time, flip-floping back and forth).

Here is, I believe, the culprit (exists in both ntp-4.2.4_p0 & ntp-4.2.4_p3):

pkg_preinst() {
        if [[ -e ${ROOT}/etc/ntp.conf ]] ; then
                rm -f "${D}"/etc/ntp.conf
        fi
}
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-20 20:35:39 UTC
Well, this breaks w/ FEATURES="unmerge-orphans" because the file becomes orphaned. Won't happen once it's been modified. Anyway, why's the pkg_postinst() there, no clue really.
Comment 2 Joe Peterson (RETIRED) gentoo-dev 2007-08-20 21:32:37 UTC
Well, the pkg_postinst() just warns the user if the "notrust" option is used (it's just a caveat).  It's the pkg_preinst() that is removing the file if unchanged, making re-installation have unpredictable/unexpected results.  I'm not sure why it's done this way.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-08-20 21:36:55 UTC
(In reply to comment #2)

I meant preinst really, just a typo.