OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-tools Date: 24-Jul-2006 17:02:45 Branch: HEAD Handle: 2006072416024500 Modified files: openpkg-tools/cmd index.pl Log: apply a cruel hack to support '!=' operator in conditions of default section, too Summary: Revision Changes Path 1.10 +4 -1 openpkg-tools/cmd/index.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-tools/cmd/index.pl ============================================================================ $ cvs diff -u -r1.9 -r1.10 index.pl --- openpkg-tools/cmd/index.pl 24 Jul 2006 14:52:44 -0000 1.9 +++ openpkg-tools/cmd/index.pl 24 Jul 2006 15:02:45 -0000 1.10 @@ -353,7 +353,10 @@ # expand variables $v = vsub(\%avar, vsub(\%var, $l)); - if (($p) = $v =~ /^\#if\s+(.*?)\s*$/) { + if (($p) = ($v =~ /^\#if\s+(.*?)\s*$/)) { + # normalize "%{variable}" != ..." + $p =~ s/("\%\{[^}]+\}")\s*!=\s*"(yes|no)"/$1 . " == \"" . ($2 ne "yes" ? "yes" : "no") . "\""/sge; + # normalize #if expressions # - "%{variable}" == "yes" # - "%{variable}" == "no" @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org