Hello community, here is the log from the commit of package setconf for openSUSE:Factory checked in at 2015-07-21 13:27:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/setconf (Old) and /work/SRC/openSUSE:Factory/.setconf.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "setconf" Changes: -------- --- /work/SRC/openSUSE:Factory/setconf/setconf.changes 2015-03-09 10:10:22.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.setconf.new/setconf.changes 2015-07-21 13:27:13.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Jul 15 04:23:12 UTC 2015 - sor.ale...@meowr.ru + +- Update to 0.6.7: + * Can use floating point numbers together with += and -=. + +------------------------------------------------------------------- Old: ---- setconf-0.6.6.tar.xz New: ---- setconf-0.6.7.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ setconf.spec ++++++ --- /var/tmp/diff_new_pack.GTsehK/_old 2015-07-21 13:27:13.000000000 +0200 +++ /var/tmp/diff_new_pack.GTsehK/_new 2015-07-21 13:27:13.000000000 +0200 @@ -17,14 +17,13 @@ Name: setconf -Version: 0.6.6 +Version: 0.6.7 Release: 0 Summary: Utility to easily change settings in configuration files License: GPL-2.0+ Group: Development/Tools/Building Url: http://setconf.roboticoverlords.org/ Source: http://setconf.roboticoverlords.org/%{name}-%{version}.tar.xz -Requires: python BuildArch: noarch %description @@ -33,18 +32,19 @@ %prep %setup -q +gzip -d %{name}.1.gz %build # Nothing to build. %install install -Dm 0755 %{name}.py %{buildroot}%{_bindir}/%{name} -install -Dm 0644 %{name}.1.gz %{buildroot}%{_mandir}/man1/%{name}.1.gz +install -Dm 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %files %defattr(-,root,root) %doc COPYING %{_bindir}/%{name} -%{_mandir}/man?/%{name}.?%{ext_man} +%{_mandir}/man?/%{name}.?%{?ext_man} %changelog ++++++ setconf-0.6.6.tar.xz -> setconf-0.6.7.tar.xz ++++++ Files old/setconf-0.6.6/setconf.1.gz and new/setconf-0.6.7/setconf.1.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setconf-0.6.6/setconf.py new/setconf-0.6.7/setconf.py --- old/setconf-0.6.6/setconf.py 2015-03-03 21:52:29.000000000 +0100 +++ new/setconf-0.6.7/setconf.py 2015-06-25 21:50:37.000000000 +0200 @@ -4,7 +4,7 @@ # setconf # Utility for setting options in configuration files. # -# Alexander F Rødseth <rods...@gmail.com> +# Alexander F Rødseth <xypr...@archlinux.org> # # GPL2 # @@ -21,6 +21,7 @@ # Oct 2014 # Dec 2014 # Mar 2015 +# Jun 2015 # from sys import argv @@ -29,10 +30,11 @@ from os.path import exists from tempfile import mkstemp from subprocess import check_output +from decimal import Decimal # TODO: Use optparse or argparse if shedskin is no longer a target. -VERSION = "0.6.6" +VERSION = "0.6.7" ASSIGNMENTS = ['==', '=>', '+=', '-=', '=', ':=', '::', ':'] @@ -555,20 +557,27 @@ return second return "" +def strip_trailing_zeros(s): + return s.rstrip('0').rstrip('.') if '.' in s else s + def inc(startvalue, s): """Increase the number in the string with the given string, or return the same string.""" try: - return str(int(startvalue)+int(s)) - except ValueError: + result = str(Decimal(startvalue)+Decimal(s)) + except ArithmeticError: return s + return strip_trailing_zeros(result) + def dec(startvalue, s): """Decrease the number in the string with the given string, or return the same string.""" try: - return str(int(startvalue)-int(s)) - except ValueError: + result = str(Decimal(startvalue)-Decimal(s)) + except ArithmeticError: return s + return strip_trailing_zeros(result) + def main(args=argv[1:], exitok=True): if len(args) == 1: if args[0] in ["-t", "--test"]: @@ -576,7 +585,7 @@ elif args[0] in ["-h", "--help"]: print("setconf " + VERSION) print("") - print("Changes a key in a textfile to a given value") + print("Changes a key in a text file to a given value") print("") print("Syntax:") print("\tsetconf filename key value [end string for multiline value]")