Bug 166897 - sci-electronics/spice-3.5.5: when compilation fails, portage installs broken package
Bug#: 166897 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: All Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: sci-electronics@gentoo.org Reported By: david@watzke.cz
Component: Ebuilds
URL: 
Summary: sci-electronics/spice-3.5.5: when compilation fails, portage installs broken package
Keywords:  
Status Whiteboard: 
Opened: 2007-02-14 20:03 0000
Description:   Opened: 2007-02-14 20:03 0000
When compilation of sci-electronics/spice-3.5.5 fails (*this* was someone's
PEBKAC, so this is *not* the reason of this bug), portage installs broken
package(!), because ./util/build won't exit with exit-status 1 even if it
fails. I'd recommend adding something like this:

|| die "dobin failed"

after dobin at least. Better would be fix the build-script, because it is
broken, but I don't know how, so I can't help (yet).

You can also inherit fixheadtails eclass and run this after epatching:

ht_fix_file util/build

because it uses old head/tail syntax.

------- Comment #1 From Denis Dupeyron 2007-03-12 18:38:42 0000 -------
(In reply to comment #0)
[...]
> I'd recommend adding something like this:
> 
> || die "dobin failed"
> 
> after dobin at least. Better would be fix the build-script, because it is
> broken, but I don't know how, so I can't help (yet).

Fixed, thanks.

> You can also inherit fixheadtails eclass and run this after epatching:
> 
> ht_fix_file util/build
> 
> because it uses old head/tail syntax.

Fixed too, but using a simple sed instead. This way, if the fixheadtail eclass
needs to be removed some day, this package won't be an issue.

Also, I have fixed some rather ugly issue with the mtime of the unpacked source
directory which forced WORKDIR to be recreated each time you issue an 'ebuild
<command>'. What happens is that the files that were previously built are then
missing from ${WORKDIR}, but the .compiled file is still there in
${PORTAGE_TMPDIR}/portage/${PF}, thus nothing is recompiled and installation
fails. This may have been the root cause of your installation failure above if
you installed using step-by-step ebuild commands instead of emerge.

By the way, do that 'someone' a favor, and tell him/her to use gnucap, or at
the very least ngspice, instead of ancient spice. ;o)

Thanks for your (interesting) bug report.
Denis.