Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394475 - dev-lang/fpc-2.4.4 fails in src_prepare() when there is no default config file
Summary: dev-lang/fpc-2.4.4 fails in src_prepare() when there is no default config file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tim Harder
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 19:17 UTC by Roby
Modified: 2011-12-13 01:34 UTC (History)
2 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 Roby 2011-12-12 19:17:17 UTC
fpc-2.4.4 fails to compile when there is no default config file. That is, if there are no /usr/lib/fpc/${FPCVER}/samplecfg and "${PPC_CONFIG_PATH}"/fpc.cfg in the directory, then the compilation fails.

The offending commands in the ebuild are:
       if ! test ${PPC_CONFIG_PATH+set}; then
               local FPCVER="${PV}"
               export PPC_CONFIG_PATH="${WORKDIR}"
               sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
                       sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
               sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die
       fi


Reproducible: Always




Once I commented the offending comments, the compilation succeeded AND the config files are created in the expected places. Subsequent compilation with the offending commands uncommented will succeed. This suggests that the if check is faulty.
Comment 1 Sebastian Pipping gentoo-dev 2011-12-12 20:46:22 UTC
Same here.

Re-assigning to who did the bump to 2.4.4.  Feel free to revert if you dislike that choice.

A more end-user view of things:

=====================================================
[..]
>>> Preparing source in /var/tmp/portage/dev-lang/fpc-2.4.4/work/fpcbuild-2.4.4/fpcsrc ...
sed: can't read /usr/lib/fpc/2.4.4/samplecfg: No such file or directory
sed: can't read /var/tmp/portage/dev-lang/fpc-2.4.4/work/fpc.cfg: No such file or directory
 * ERROR: dev-lang/fpc-2.4.4 failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  84:  Called src_prepare
 *   environment, line 245:  Called die
 * The specific snippet of code:
 *           sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die;
[..]
=====================================================

Is src_prepare even supposed to fix files outside of ${WORKDIR} ?
Looks like a conceptual problem (not a missing file) to me.
Comment 2 Tim Harder gentoo-dev 2011-12-12 23:26:26 UTC
Ah, the nasty ide stuff broke. No surprise there.
Comment 3 Tim Harder gentoo-dev 2011-12-12 23:29:22 UTC
(In reply to comment #1)
> Is src_prepare even supposed to fix files outside of ${WORKDIR} ?
> Looks like a conceptual problem (not a missing file) to me.

It's not altering files outside of ${WORKDIR} if you take a closer look and anyway that should be stopped by sandbox.
Comment 4 Tim Harder gentoo-dev 2011-12-12 23:41:07 UTC
Fixed in CVS.
Comment 5 Sebastian Pipping gentoo-dev 2011-12-12 23:57:22 UTC
(In reply to comment #3)
> It's not altering files outside of ${WORKDIR} if you take a closer look

The error on /usr/lib/fpc/2.4.4/samplecfg puzzles me.
What's your explanation for it?


> and
> anyway that should be stopped by sandbox.

True.


(In reply to comment #4)
> Fixed in CVS.

Thanks.
Comment 6 Tim Harder gentoo-dev 2011-12-13 01:34:23 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > It's not altering files outside of ${WORKDIR} if you take a closer look
> 
> The error on /usr/lib/fpc/2.4.4/samplecfg puzzles me.
> What's your explanation for it?

It looks like the previous code was modifying the output of the samplecfg command installed on the local filesystem with sed not the actual file itself.