Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253452 - sys-apps/openrc-0.4.1-r1 displays not 100% valid version if subversion installed
Summary: sys-apps/openrc-0.4.1-r1 displays not 100% valid version if subversion installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-02 15:16 UTC by Anton Bolshakov
Modified: 2009-01-14 15:58 UTC (History)
1 user (show)

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


Attachments
openrc-0.4.1-fix-versioninfo-on-boot.diff (openrc-0.4.1-fix-versioninfo-on-boot.diff,498 bytes, patch)
2009-01-02 16:02 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2009-01-02 15:16:22 UTC
It displays "OpenRC 0.4.1-svn-exported is starting up" message which is fully true.

The problem is with the Makefile:

openrc-0.4.1/src/rc/Makefile 
 _SVNVER_SH=     if type svnversion >/dev/null 2>&1; then \
                        echo "-svn-$$(svnversion)"; \
                else \
                        echo ""; \
                fi

Perhaps, this code should detect it in a different way.

Expected result:
 It should display "OpenRC 0.4.1" only.


Other installed packages:
 dev-util/subversion-1.5.4

Sorry for bothering with such trivial thing, but I don't like to see it during each boot.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-01-02 16:02:00 UTC
Created attachment 177110 [details, diff]
openrc-0.4.1-fix-versioninfo-on-boot.diff

You are right. Version information from openrc should be independent from svninfo being installed or not when using the release versions.
How about something like this patch here?
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-01-02 16:05:33 UTC
Reassigning to base-system herd, CCing upstream maintainer.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2009-01-02 16:14:53 UTC
Instead of always calling out to svnversion, why not just check for the existence of the .svn directory to decide if it's probably an SVN checkout?
Comment 4 Roy Marples 2009-01-02 17:05:09 UTC
subversion allows dirs other than .svn, so svnexport is handy. Calling it twice is inefficient, so we will store and evalute it in a variable.

Patch here.
http://roy.marples.name/projects/openrc/changeset/1469/
Comment 5 Anton Bolshakov 2009-01-02 22:08:53 UTC
(In reply to comment #4)

I propose following to make it easy to read:

ret=""
if type svnversion >/dev/null 2>&1; then
        svnver="$(svnversion)"
                if [ $svnver != "exported" ]; then
                         ret="-svn-$svnver"
                fi
fi
echo $ret

Not sure if it's the way for make files.
Comment 6 Roy Marples 2009-01-02 22:52:14 UTC
As you wish
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-01-14 15:58:00 UTC
This bug has been FIXED.

*openrc-0.4.2 (14 Jan 2009)

  14 Jan 2009; Matthias Schwarzott <zzam@gentoo.org>
  +files/0.4.2/0001-msg-style.patch,
  +files/0.4.2/0002-useful-functions.patch, +files/0.4.2/0003-KV.patch,
  +files/0.4.2/0004-svn-version.patch, +openrc-0.4.2.ebuild:
  Version bumped. Bug #254239. This fixes lots of details like compilation
  on non-linux, forcefsck only applying to boot and not shutdown.