Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214401 (openrc-upgrade-path) - sys-apps/openrc-9999.ebuild: Upgrade path in pkg_preinst() not performed
Summary: sys-apps/openrc-9999.ebuild: Upgrade path in pkg_preinst() not performed
Status: RESOLVED FIXED
Alias: openrc-upgrade-path
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 212696
  Show dependency tree
 
Reported: 2008-03-23 16:30 UTC by Matěj Laitl
Modified: 2008-03-23 17:45 UTC (History)
0 users

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 Matěj Laitl 2008-03-23 16:30:31 UTC
Hi,
I upgraded to new baselayout-2.0.0 & openrc-9999. Next reboot was a nightmare, root mounted read-only and so. After investigating a little, I found out that init scripts were reorganised and runlevels needed to be touched a little. But when looking at openrc-9999.ebuild, I realised it should have been done automatically. It was not done because of typo in pkg_preinst, let's see the code:

pkg_preinst() {
        # default net script is just comments, so no point in biting people
        # in the ass by accident
        [[ -e ${ROOT}/etc/conf.d/net ]] && rm -f "${D}"/etc/conf.d/net

        has_version sys-apps/openrc || return 0

        # upgrade timezone file
        if [[ ! -e ${ROOT}/etc/timezone ]] ; then
                (
                source "${ROOT}"/etc/conf.d/timezone
                [[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${ROOT}"/etc/timezone
                )
        fi

        # baselayout bootmisc init script has been split out in OpenRC
        # so handle upgraders
        (...)


I guess the line "has_version sys-apps/openrc || return 0" should instead read "has_version sys-apps/openrc && return 0", meaning "if there is already openrc, skip the upgrade path" and not "if there is NOT already openrc, skip the path".

Steps to reproduce:
1. Switch to pre-2.0.0 baselayout, unmerge openrc, so that you don't have fsck, root & friends services in /etc/init.d/
2. Upgrade to baselayout-2.0.0 & openrc-9999
3. Run etc-update, resolve all files.
4. Notice that new services (fsck, root, swap...) were NOT automatically added to your boot runlevel, /etc/modules.autoload.d/ was not transformed into /etc/conf.d/modules...
5. (for brave ones:) Reboot. Your root partition will be probably left mounted read-only.

Regards, Matěj
Comment 1 Matěj Laitl 2008-03-23 16:35:26 UTC
Let's have this bug somehow connected with bug 212696, CCing vapier.
Comment 2 SpanKY gentoo-dev 2008-03-23 17:40:43 UTC
dont cc me please, it simply means i get duplicate e-mails

fixed in cvs
http://sources.gentoo.org/sys-apps/openrc/openrc-9999.ebuild?r1=1.2&r2=1.3
Comment 3 Matěj Laitl 2008-03-23 17:45:30 UTC
Oh, sorry and thanks. (will learn how Gentoo mail aliases work)