Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458440 - app-office/openerp-6.1.1-r1 USE=-postgres - sed: can't read [...]/image//etc/init.d/openerp: No such file or directory
Summary: app-office/openerp-6.1.1-r1 USE=-postgres - sed: can't read [...]/image//etc/...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-20 11:03 UTC by A. Person
Modified: 2018-11-07 12:20 UTC (History)
2 users (show)

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


Attachments
new openerp 6.1.1 ebuild (openerp-6.1.1-r2.ebuild,2.70 KB, text/plain)
2013-03-14 22:57 UTC, Daniel Jakob
Details

Note You need to log in before you can comment on or make changes to this bug.
Description A. Person 2013-02-20 11:03:35 UTC
>>> Merging app-office/openerp-6.1.1-r1 to /
chown: cannot access ���/var/tmp/portage/app-office/openerp-6.1.1-r1/image//var/run/openerp���: No such file or directory
fowners failed
sed: can't read /var/tmp/portage/app-office/openerp-6.1.1-r1/image//etc/init.d/openerp: No such file or directory
 * ERROR: app-office/openerp-6.1.1-r1 failed (preinst phase):
 *   sed failed
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called pkg_preinst
 *   environment, line 2960:  Called die
 * The specific snippet of code:
 *       use postgres || sed -i '6,8d' "${D}/etc/init.d/openerp" || die "sed failed"

Reproducible: Always
Comment 1 Daniel Jakob 2013-03-14 22:57:18 UTC
Created attachment 342058 [details]
new openerp 6.1.1 ebuild

Try my modified ebuild which creates the missing directories and installs the correct init file
Comment 2 A. Person 2013-05-29 18:11:51 UTC
I just tested the ebuild and it works great.  Can we get it in portage?
Comment 3 Yixun Lan gentoo-dev 2013-10-28 04:43:34 UTC
--- a/openerp-6.1.1-r1.ebuild     2013-03-04 12:48:18.000000000 +0800
+++ b/openerp-6.1.1-r1.ebuild     2013-10-28 12:19:09.802140832 +0800
   ....
 
-       doinitd "${FILESDIR}/${PN}-2" "${PN}"
+       doinitd "${FILESDIR}"/openerp "${PN}"
        newconfd "${FILESDIR}/openerp-confd-2" "${PN}"
        keepdir /var/log/openerp
 
@@ -68,6 +68,7 @@
        dodir /etc/openerp
        insinto /etc/openerp
        newins "${FILESDIR}"/openerp.cfg openerp.cfg || die
+       dodir /var/run/openerp
 }

--- files/openerp-2     2013-02-20 09:50:30.000000000 +0800
+++ files/openerp       2013-01-31 16:55:19.000000000 +0800
@@ -8,7 +8,6 @@
 }
 
 start() {
-       checkpath -q -d -m 0755 -o openerp:openerp /run/openerp
        ebegin "Starting openerp server"
        start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/bin/openerp-server \
                --make-pidfile --user "${USER}" --background -- ${DAEMON_OPTS}


This is the diff which compare the modified ebuild with the original one.
the checkpath line is not necessary, since command "start-stop-deamon" in runscript automatically create the path /run/openerp

/var/run is a symbol link to /run
so "dodir /var/run/openerp" is not necessary(which also is wrong), please see bug #332633 for more detail formation.

here I think the correct patch: just removing following two lines.
 fowners ${OPENERP_USER}:${OPENERP_GROUP} /var/run/openerp
 chown ${OPENERP_USER}:${OPENERP_GROUP} /var/run/openerp

(In reply to Daniel Jakob from comment #1)
> Created attachment 342058 [details]
> new openerp 6.1.1 ebuild
>
Comment 4 Yixun Lan gentoo-dev 2013-10-28 08:05:05 UTC
(In reply to Dennis 'dlan' Lan from comment #3)

> the checkpath line is not necessary, since command "start-stop-deamon" in
> runscript automatically create the path /run/openerp
> 
sorry. checkpath is necessary, /run/openerp must be created before run init script
Comment 5 Vladimir Datsevich 2014-12-16 21:46:43 UTC
Is it possible to close this one - since outdated?
Comment 6 5836000 2014-12-17 03:33:43 UTC
I an ok to close it . Thanks for reminder