Summary: | flag-o-matic filter-flags and replace-flags take away one character when argument not found | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hans de Graaff <graaff> |
Component: | [OLD] Core system | Assignee: | SpanKY <vapier> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | chriswhite |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Hans de Graaff
![]() ![]() Re-assigned to dev-portage team. the -2 is correct because if you look in the functions, the very first thing they do is stick a space onto the beginning and onto the end: CFLAGS=" ${CFLAGS} " so the final CFLAG will have a space at the beginning and end and thus will need to have 2 bytes chopped off i dont know what's wrong on your box but it works fine here: root@vapier 0 root # cat test.sh #!/bin/bash source /usr/portage/eclass/flag-o-matic.eclass export CFLAGS="-O -pipe" echo $CFLAGS filter-flags "-bozo" append-flags "-fno-strict-aliasing" echo $CFLAGS replace-flags "-O3" "-O2" echo $CFLAGS replace-flags "-O" "-O2" echo $CFLAGS root@vapier 0 root # ./test.sh -O -pipe -O -pipe -fno-strict-aliasing -O -pipe -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing I have now found that the problem is due to not having a full Gentoo system. I've upgraded an existing system to Gentoo, and bash was one of the applications I had not yet updated using Gentoo. Patch-ID bash205b-004 explains the problem as it deals with calculating the length of a string in bash with leading spaces. This was exactly the problem I was having. emerging bash from Gentoo has solved the problem. ah, that'll do it :) user's bash was old (not from Gentoo) |