From root@Hilbert.suse.de Sun Apr 6 15:21:21 2008 From: root@Hilbert.suse.de To: commit@lists.opensuse.org Subject: commit yast2-core Date: Sun, 06 Apr 2008 17:24:05 +0200 Message-ID: <20080406152406.3CA08678168@Hilbert.suse.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5862455582222073394==" --===============5862455582222073394== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello community, here is the log from the commit of package yast2-core checked in at Sun Apr 6 17:24:05 CEST 2008. -------- --- yast2-core/yast2-core.changes 2008-04-06 11:14:28.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2008-04-06 14:= 17:25.779461000 +0200 @@ -1,0 +2,6 @@ +Sun Apr 06 13:34:20 CEST 2008 - aschnell(a)suse.de + +- added float builtins trunc and pow +- 2.16.44 + +------------------------------------------------------------------- Old: ---- yast2-core-2.16.43.tar.bz2 New: ---- yast2-core-2.16.44.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-core.spec ++++++ --- /var/tmp/diff_new_pack.T11965/_old 2008-04-06 17:23:53.000000000 +0200 +++ /var/tmp/diff_new_pack.T11965/_new 2008-04-06 17:23:53.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-core (Version 2.16.43) +# spec file for package yast2-core (Version 2.16.44) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,12 +12,12 @@ =20 =20 Name: yast2-core -Version: 2.16.43 +Version: 2.16.44 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-core-2.16.43.tar.bz2 +Source0: yast2-core-2.16.44.tar.bz2 Prefix: /usr # obviously BuildRequires: gcc-c++ @@ -84,7 +84,7 @@ Stanislav Visnovsky =20 %prep -%setup -n yast2-core-2.16.43 +%setup -n yast2-core-2.16.44 =20 %build %{prefix}/bin/y2tool y2autoconf @@ -161,6 +161,9 @@ %doc %{prefix}/share/doc/packages/yast2-core /usr/share/YaST2/data/devtools/bin/generateYCPWrappers %changelog +* Sun Apr 06 2008 aschnell(a)suse.de +- added float builtins trunc and pow +- 2.16.44 * Sun Apr 06 2008 coolo(a)suse.de - compile with xcrypt 3 - 2.16.43 ++++++ yast2-core-2.16.43.tar.bz2 -> yast2-core-2.16.44.tar.bz2 ++++++ ++++ 10798 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/agents-perl/doc/ycp-pm-pod.html new/yast2-core-2.16.44/agents-p= erl/doc/ycp-pm-pod.html --- old/yast2-core-2.16.43/agents-perl/doc/ycp-pm-pod.html 2008-04-06 11:14:1= 8.000000000 +0200 +++ new/yast2-core-2.16.44/agents-perl/doc/ycp-pm-pod.html 2007-11-16 13:03:5= 6.000000000 +0100 @@ -9,10 +9,8 @@ =20 =20 - - -

+ =20 =20 - -
-
=20 +

NAME

@@ -104,31 +100,31 @@

A PerlYCPValue cannot represent a term but only a term is allowed to initialize an agent in a .scr file. Therefore Pars= eTerm is provided.

-
string, intege= r, boolean +
string, integer, b= oolean =20

Stored as a scalar.

-
list +
list =20

Stored as a reference to a list of PerlYCPValues.

-
map +
map =20

Stored as a reference to a map of PerlYCPValues.

-
path +
path =20
-

Stored as a reference to a string (starting with a "." as expec= ted).

+

Stored as a reference to a string (starting with a ``.'' as expected).

-
nil (void) +
nil (void) =20

Stored as an undef.

@@ -145,7 +141,7 @@

ParseComand $line

($command, $path, $arg) =3D ParseCommand ('Write (.moria.gate, &quo= t;mellon")');

Parse a SCR command of the form Command (.some.path, optional_argument) -

Returns a three element list ("Command", ".some.path"= , $argument) +

Returns a three element list (``Command'', ``.some.path'', $argument) where the argument is a PerlYCPValue and will = be undef if it was not specified. Note that the path is converted to a string.

@@ -186,12 +182,12 @@

Return (["arbitrarily", "complex", "data&q= uot;]);

Sends a PerlYCPValue to the partner YCP com= ponent.

If there's just one argment, scalars are interpreted this way: -"true" or "false" are sent as +``true'' or ``false'' are sent as booleans, integers or strings of digits are sent as integers, otherwise as strings. If a second argument exists and is true, all scalars are written as strings. If a second argument exists and is false, all scalars are written as byteblo= cks.

-

To send a list, call Return(\@list), not Return(@list)= . +

To send a list, call Return(\@list), not Return(@list). Similarly for a map. You can use references to anonymous lists [] and hashes= {}.

The difference from ycpReturn is that Return c= an return scalars directly, strings are properly escaped if needeed and paths can be returned.

@@ -204,9 +200,9 @@ and logging just works. In such case, you should not need to use ycp.pm at a= ll. Instead, use YaST::YCP (":LOGGING").

The log output can now be redirected, which will be useful for test suite= s. -If the first command-line option is "-l", the second argument is t= aken as -the log file. A hyphen "-" designates standard output.

-

Otherwise, /var/log/YaST2/y2log and $HOME/.y2log are tried, in that order.

+If the first command-line option is ``-l'', the second argument is taken as +the log file. A hyphen ``-'' designates standard output.

+

Otherwise, /var/log/YaST2/y2log and $HOME/.y2log are tr= ied, in that order.

y2debug

@@ -216,7 +212,7 @@ y2error, y2security, y2internal

-

Logs debug messages to /var/log/YaST2/y2log or $HOME/.y2log

+

Logs debug messages to /var/log/YaST2/y2log or $HOME/.y2log<= /em>

Note a semantic change in y2debug: now the environment v= ariable Y2DEBUG is honored so y2debug will not produce output unless this variable is set. This is for compatibility with the logging system in libycp= .

@@ -231,11 +227,11 @@

ycpArgIsMap

-

Obsolete. Use (ref($arg) eq "HASH") instead.

+

Obsolete. Use (ref($arg) eq ``HASH'') instead.

ycpArgIsList

-

Obsolete. Use (ref($arg) eq "ARRAY") instead.

+

Obsolete. Use (ref($arg) eq ``ARRAY'') instead.

ycpArgIsInteger

@@ -251,7 +247,7 @@

ycpArgIsNil

-

Obsolete. Use (ref($arg) eq "SCALAR" && $$arg eq "= nil") instead.

+

Obsolete. Use (ref($arg) eq ``SCALAR'' && $$arg eq ``nil'') inste= ad.

ycpArgIsNone

@@ -259,23 +255,23 @@

ycpCommandIsDir

-

Obsolete. Use ($command eq "Dir")

+

Obsolete. Use ($command eq ``Dir'')

ycpCommandIsRead

-

Obsolete. Use ($command eq "Read")

+

Obsolete. Use ($command eq ``Read'')

ycpCommandIsWrite

-

Obsolete. Use ($command eq "Write")

+

Obsolete. Use ($command eq ``Write'')

ycpCommandIsExecute

-

Obsolete. Use ($command eq "Execute")

+

Obsolete. Use ($command eq ``Execute'')

ycpCommandIsResult

-

Obsolete. Use ($command eq "result"), note the lowercase 'r'. +

Obsolete. Use ($command eq ``result''), note the lowercase 'r'.

ycpGetCommand

@@ -313,7 +309,7 @@

ycpReturnSkalarAsBoolean

-

Obsolete. Use Return("true" or "fa= lse")

+

Obsolete. Use Return(``true'' or ``false'')

ycpReturnSkalarAsString

diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/configure.in new/yast2-core-2.16.44/configure.in --- old/yast2-core-2.16.43/configure.in 2008-04-06 11:13:18.000000000 +0200 +++ new/yast2-core-2.16.44/configure.in 2008-04-06 13:49:51.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-core dnl -dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! -- dnl (edit configure.in.in instead) =20 -AC_INIT(yast2-core, 2.16.43, http://bugs.opensuse.org/, yast2-core) +AC_INIT(yast2-core, 2.16.44, http://bugs.opensuse.org/, yast2-core) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) =20 @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) =20 dnl Important YaST2 variables -VERSION=3D"2.16.43" +VERSION=3D"2.16.44" RPMNAME=3D"yast2-core" MAINTAINER=3D"Martin Vidner " =20 diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/libycp/src/YCPBuiltinFloat.cc new/yast2-core-2.16.44/libycp/src= /YCPBuiltinFloat.cc --- old/yast2-core-2.16.43/libycp/src/YCPBuiltinFloat.cc 2007-11-13 16:00:34.= 000000000 +0100 +++ new/yast2-core-2.16.44/libycp/src/YCPBuiltinFloat.cc 2008-04-06 13:19:48.= 000000000 +0200 @@ -20,6 +20,7 @@ /-*/ =20 #include +#include #include =20 #include "ycp/YCPBuiltinFloat.h" @@ -44,7 +45,7 @@ * 1.5 + 2.5 -> 4.0 * */ - =20 + if (f1.isNull () || f2.isNull ()) return YCPNull (); =20 @@ -131,10 +132,52 @@ =20 =20 static YCPValue +f_trunc(const YCPFloat &f) +{ + /** + * @builtins trunc + * @short round to integer, towards zero + * @description + * Returns f round to the nearest integer, towards zero. + * @param f FLOAT + * @return FLOAT + * @usage trunc (+1.6) -> +1.0 + * @usage trunc (-1.6) -> -1.0 + */ + + if (f.isNull ()) + return YCPNull (); + + return YCPFloat(trunc(f->value())); +} + + +static YCPValue +f_pow(const YCPFloat &f1, const YCPFloat &f2) +{ + /** + * @builtins pow + * @short power function + * @description + * Returns the value of f1 raised to the power of f2. + * @param f1 FLOAT + * @param f2 FLOAT + * @return FLOAT + * @usage pow (10.0, 3.0) -> 1000.0 + */ + + if (f1.isNull () || f2.isNull ()) + return YCPNull (); + + return YCPFloat(pow(f1->value(), f2->value())); +} + + +static YCPValue f_tostring (const YCPFloat &f, const YCPInteger &precision) { /** - * @builtin tostring=20 + * @builtin tostring * @short Converts a floating point number to a string * @description * Converts a floating point number to a string, using the @@ -206,6 +249,8 @@ { "-", "float (float)", (void *)f_neg }, { "*", "float (float, float)", (void *)f_mult }, { "/", "float (float, float)", (void *)f_div }, + { "trunc", "float (float)", (void *)f_trunc }, + { "pow", "float (float, float)", (void *)f_pow }, { "tofloat", "float (const any)", (void *)f_tofloat }, { "tostring","string (float, integer)", (void *)f_tostring }, { 0 } diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.err new/yast2-core= -2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.err --- old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.err 2= 004-01-16 15:40:14.000000000 +0100 +++ new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.err 2= 008-04-06 13:31:31.000000000 +0200 @@ -99,3 +99,63 @@ ---------------------------------------------------------------------- tofloat ("3.14") ---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +"** trunc **" +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (1.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (1.4) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (1.6) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (2.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (-1.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (-1.4) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (-1.6) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +trunc (-2.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +"** pow ** " +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +pow (10., 2.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +pow (10., 1.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +pow (10., 0.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +pow (10., -1.) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +pow (10., -2.) +---------------------------------------------------------------------- diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.out new/yast2-core= -2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.out --- old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.out 2= 004-01-16 15:40:14.000000000 +0100 +++ new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.out 2= 008-04-06 13:31:24.000000000 +0200 @@ -23,3 +23,18 @@ (4.) (42.) (3.14) +("** trunc **") +(1.) +(1.) +(1.) +(2.) +(-1.) +(-1.) +(-1.) +(-2.) +("** pow ** ") +(100.) +(10.) +(1.) +(0.1) +(0.01) diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.ycp new/yast2-core= -2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.ycp --- old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.ycp 2= 004-01-16 15:40:14.000000000 +0100 +++ new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.ycp 2= 008-04-06 13:24:03.000000000 +0200 @@ -3,7 +3,7 @@ # # Filename: Builtin-Integer.ycp # -# Purpose: test cases for all integer builtins +# Purpose: test cases for all float builtins # # --------------------------------------------------------- =20 @@ -51,3 +51,25 @@ (tofloat ("42")) (tofloat ("3.14")) =20 + +("** trunc **") + +(trunc (1.0)) +(trunc (1.4)) +(trunc (1.6)) +(trunc (2.0)) + +(trunc (-1.0)) +(trunc (-1.4)) +(trunc (-1.6)) +(trunc (-2.0)) + + +("** pow ** ") + +(pow (10.0, 2.0)) +(pow (10.0, 1.0)) +(pow (10.0, 0.0)) +(pow (10.0, -1.0)) +(pow (10.0, -2.0)) + diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/VERSION new/yast2-core-2.16.44/VERSION --- old/yast2-core-2.16.43/VERSION 2008-04-06 11:12:29.000000000 +0200 +++ new/yast2-core-2.16.44/VERSION 2008-04-06 13:34:14.000000000 +0200 @@ -1 +1 @@ -2.16.43 +2.16.44 diff -urN --exclude=3DCVS --exclude=3D.cvsignore --exclude=3D.svn --exclude= =3D.svnignore --exclude Makefile.in --exclude configure --exclude config.gues= s --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude co= nfig.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2= -core-2.16.43/ylwrap new/yast2-core-2.16.44/ylwrap --- old/yast2-core-2.16.43/ylwrap 2008-04-06 11:13:43.000000000 +0200 +++ new/yast2-core-2.16.44/ylwrap 2008-04-06 13:50:15.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. =20 -scriptversion=3D2007-11-22.22 +scriptversion=3D2005-05-14.22 =20 -# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -# 2007 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. # # Written by Tom Tromey . # @@ -101,14 +101,14 @@ # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=3Dylwrap$$ -trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 +trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 =20 cd $dirname =20 case $# in - 0) "$prog" "$input" ;; - *) "$prog" "$@" "$input" ;; + 0) $prog "$input" ;; + *) $prog "$@" "$input" ;; esac ret=3D$? =20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: opensuse-commit+help(a)opensuse.org --===============5862455582222073394==--