[Bug 226381] Merge Review: ruby

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=226381


Mamoru Tasaka <mtasaka@xxxxxxxxxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |CLOSED
         Resolution|                            |RAWHIDE




--- Comment #30 from Mamoru Tasaka <mtasaka@xxxxxxxxxxxxxxxxxxx>  2009-04-11 13:46:53 EDT ---
In the previous (-7) spec file:

---------------------------------------------------------
for i in `find -type f ! -name "*.gif"`; do
    sh -c "iconv -f utf-8 -t utf-8 $i > /dev/null 2>&1 || (iconv -f euc-jp -t
utf-8 $i > $i.new && mv $i.new 
$i || exit 1)
    if [ $? != 0 ]; then
        iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || exit 1
    fi"
done
---------------------------------------------------------

Here $? is always 0 like below:
---------------------------------------------------------
$ sh -c "LANG=C ; foo bar ; echo $?"
sh: foo: command not found
0
$ sh -c 'LANG=C ; foo bar ; echo $?'
sh: foo: command not found
127
---------------------------------------------------------
With double quotation shell first evaluates the value of $?
and expands it before actually executing sub-shell. However
as we also want to use $i, we cannot easily change " to '.

So I changed
- not to use subshell
- from ( to {
---------------------------------------------------------
$ sh -c 'status=0 ; { status=1 ; } ; echo $status'
1
$ sh -c 'status=0 ; ( status=1 ) ; echo $status'
0
---------------------------------------------------------
- and not to "exit 1" but to use "status=1"

And I addressed all I mentioned in my comment 23 (except for
64 bits handling)

Closing this Merge Review

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

_______________________________________________
Fedora-package-review mailing list
Fedora-package-review@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-package-review

[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]