Hello community,

here is the log from the commit of package ksh for openSUSE:Factory checked in 
at 2013-03-26 19:48:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ksh (Old)
 and      /work/SRC/openSUSE:Factory/.ksh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ksh", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ksh/ksh.changes  2013-03-01 07:23:47.000000000 
+0100
+++ /work/SRC/openSUSE:Factory/.ksh.new/ksh.changes     2013-03-26 
19:48:09.000000000 +0100
@@ -1,0 +2,14 @@
+Tue Mar 19 16:48:37 UTC 2013 - [email protected]
+
+- Add patch ksh93-typedef.dif as found during debugging 
+
+-------------------------------------------------------------------
+Tue Mar 19 15:14:00 UTC 2013 - [email protected]
+
+- Make Shift_JIS patch more reliable as requestef from upstream
+- Drop remaining part of the patch ksh93-zerofill.dif for zerofilled
+  variables (bnc#785360 as the first part of the patch is upstream
+  together with an other change. This fix a side effect of cutting
+  variables if TMOUT is used (bnc#808956)
+
+-------------------------------------------------------------------

Old:
----
  ksh93-zerofill.dif

New:
----
  ksh93-typedef.dif

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ksh.spec ++++++
--- /var/tmp/diff_new_pack.gt1ThX/_old  2013-03-26 19:48:11.000000000 +0100
+++ /var/tmp/diff_new_pack.gt1ThX/_new  2013-03-26 19:48:11.000000000 +0100
@@ -114,8 +114,8 @@
 Patch27:        astksh_builtin_poll20120806_001.diff
 # PATCH-FIX-UPSTREAM ksh93-env.dif [bnc#785266, bnc#803613]
 Patch28:        ksh93-env.dif
-# PATCH-FIX-UPSTREAM ksh93-zerofill.dif [bnc#785360]
-Patch29:        ksh93-zerofill.dif
+# PATCH-FIX-UPSTREAM ksh93-typedef.dif
+Patch29:        ksh93-typedef.dif
 # PATCH-EXTEND-UPSTREAM ksh93-pathtemp.dif [bnc#786134]
 # the fix is part of ksh93u+ 2012-06-28
 # nevertheless the /dev/shm extension is useful
@@ -389,7 +389,7 @@
       fi
   done
   MEMORY="-s 128 ${MEMORY:+-e ${MEMORY}}"
-  RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/[[:blank:]]+-g[0-9]?/ 
-g2/g')
+  RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 
's/([[:blank:]]+)-g[[:digit:]]+/\1-g2/g;s/([[:blank:]]+)-g([[:blank:]]+|$)/\1-g2\2/g')
   UNIVERSE=att
   LDFLAGS="-lm"
   LDSOFLG=""

++++++ ksh93-shift_ijs.dif ++++++
--- /var/tmp/diff_new_pack.gt1ThX/_old  2013-03-26 19:48:11.000000000 +0100
+++ /var/tmp/diff_new_pack.gt1ThX/_new  2013-03-26 19:48:11.000000000 +0100
@@ -116,7 +116,7 @@
        else
        {
 --- src/cmd/ksh93/sh/macro.c
-+++ src/cmd/ksh93/sh/macro.c   2013-02-07 13:26:07.897952986 +0000
++++ src/cmd/ksh93/sh/macro.c   2013-03-19 17:16:46.062074381 +0100
 @@ -54,6 +54,7 @@
  #if SHOPT_MULTIBYTE
  #   undef isascii
@@ -125,7 +125,7 @@
  #else
  #   define mbchar(p)       (*(unsigned char*)p++)
  #endif /* SHOPT_MULTIBYTE */
-@@ -2026,6 +2027,10 @@ static void comsubst(Mac_t *mp,register
+@@ -2026,6 +2027,11 @@ static void comsubst(Mac_t *mp,register
        struct _mac_            savemac;
        int                     savtop = stktell(stkp);
        char                    lastc=0, *savptr = stkfreeze(stkp,0);
@@ -133,33 +133,46 @@
 +      const Lc_t              *lc=lcinfo(LC_CTYPE)->lc;
 +      wchar_t                 lastw=0;
 +#endif /* SHOPT_MULTIBYTE */
++      ssize_t                 len;
        int                     was_history = sh_isstate(SH_HISTORY);
        int                     was_verbose = sh_isstate(SH_VERBOSE);
        int                     was_interactive = sh_isstate(SH_INTERACTIVE);
-@@ -2209,6 +2214,17 @@ static void comsubst(Mac_t *mp,register
+@@ -2127,7 +2133,7 @@ static void comsubst(Mac_t *mp,register
+                                       num = lseek(fd, (off_t)0, SEEK_CUR);
+                               goto out_offset;
+                       }
+-                      if(!(sp=mp->shp->sftable[fd]))
++                      if(!(sp=mp->shp->sftable[fd]) || (sffileno(sp)!=fd 
&&!(sfset(sp,0,0)&SF_STRING)))
+                               sp = 
sfnew(NIL(Sfio_t*),(char*)malloc(IOBSIZE+1),IOBSIZE,fd,SF_READ|SF_MALLOC);
+                       type = 3;
+               }
+@@ -2209,17 +2215,36 @@ static void comsubst(Mac_t *mp,register
                }
                else if(lastc)
                {
+-                      mac_copy(mp,&lastc,1);
++                      char mb[8];
++                      mb[0] = lastc;
++                      len = 1;
 +#if SHOPT_MULTIBYTE
 +                      if(lastw)
-+                      {
-+                              int     n;
-+                              char    mb[8];
-+                              n = mbconv(mb, lastw);
-+                              mac_copy(mp,mb,n);
-+                              lastw = 0;
-+                      }
-+                      else
++                              len = mbconv(mb, lastw);
++                      lastw = 0;
 +#endif /* SHOPT_MULTIBYTE */
-                       mac_copy(mp,&lastc,1);
                        lastc = 0;
++                      mac_copy(mp,mb,len);
                }
-@@ -2220,6 +2236,17 @@ static void comsubst(Mac_t *mp,register
-                       ssize_t len = 1;
+               newlines = nextnewlines;
+               if(++c < bufsize)
+                       str[c] = 0;
+               else
+               {
+-                      ssize_t len = 1;
++                      len = 1;
  
                        /* can't write past buffer so save last character */
 +#if SHOPT_MULTIBYTE
-+                      if ((len = mbsize(str))>1 && !(lc->flags & LC_utf8))
++                      if ((lc->flags & LC_utf8)==0 && (len = mbsize(str))>1)
 +                      {
 +                              len = mb2wc(lastw,str,len);
 +                              if (len < 0)
@@ -172,25 +185,25 @@
                        c -= len;
                        lastc = str[c];
                        str[c] = 0;
-@@ -2240,6 +2267,17 @@ static void comsubst(Mac_t *mp,register
+@@ -2240,8 +2265,16 @@ static void comsubst(Mac_t *mp,register
        }
        if(lastc)
        {
+-              mac_copy(mp,&lastc,1);
++              char mb[8];
++              mb[0] = lastc;
++              len = 1;
 +#if SHOPT_MULTIBYTE
 +              if(lastw)
-+              {
-+                      int     n;
-+                      char    mb[8];
-+                      n = mbconv(mb, lastw);
-+                      mac_copy(mp,mb,n);
-+                      lastw = 0;
-+              }
-+              else
++                      len = mbconv(mb, lastw);
++              lastw = 0;
 +#endif /* SHOPT_MULTIBYTE */
-               mac_copy(mp,&lastc,1);
                lastc = 0;
++              mac_copy(mp,mb,len);
        }
-@@ -2340,13 +2378,13 @@ static void mac_copy(register Mac_t *mp,
+       sfclose(sp);
+       return;
+@@ -2340,13 +2373,13 @@ static void mac_copy(register Mac_t *mp,
                if(mp->pattern)
                {
                        char *sp = "&|()";
@@ -228,7 +241,7 @@
                        int len;
 --- src/cmd/ksh93/tests/sjis.sh
 +++ src/cmd/ksh93/tests/sjis.sh        2011-05-20 15:11:29.000000000 +0000
-@@ -0,0 +1,67 @@
+@@ -0,0 +1,77 @@
 +########################################################################
 +#                                                                      #
 +#   Copyright (c) 2007 SuSE Linux Products GmbH, Nuernberg, Germany    #
@@ -295,6 +308,16 @@
 +    print -u2 -n "\t"
 +    print -u2 -r ${0##*/}[$LINENO]: "Shift-JIS encoding failed"
 +fi
++
++LANG=POSIX
++typeset -r utf8_euro_char1=$'\u[20ac]'
++typeset -r utf8_euro_char2=$'\342\202\254'
++(( (${#utf8_euro_char1} == 1) && (${#utf8_euro_char2} == 1) )) || export 
LC_ALL='en_US.UTF-8'
++if [[ "$(printf '\u[20ac]')" != $'\342\202\254' ]] ; then
++    : err_exit
++    print -u2 -n "\t"
++    print -u2 -r ${0##*/}[$LINENO]: "Locale overrride failed."
++fi
 +exit $err
 --- src/lib/libast/comp/setlocale.c
 +++ src/lib/libast/comp/setlocale.c    2007-12-20 17:50:28.000000000 +0000

++++++ ksh93-typedef.dif ++++++
--- src/cmd/ksh93/bltins/typeset.c
+++ src/cmd/ksh93/bltins/typeset.c      2013-03-19 17:21:08.667413362 +0100
@@ -461,6 +461,7 @@ static void print_value(Sfio_t *iop, Nam
 {
        char     *name;
        int     aflag=tp->aflag;
+       Namval_t        *table;
        if(nv_isnull(np))
        {
                if(!np->nvflag)
@@ -504,7 +505,9 @@ static void print_value(Sfio_t *iop, Nam
                sfwrite(iop,"}\n",2);
                return;
        }
+       table = tp->sh->last_table;
        sfputr(iop,nv_name(np),aflag=='+'?'\n':'=');
+       tp->sh->last_table = table;
        if(aflag=='+')
                return;
        if(nv_isarray(np) && nv_arrayptr(np))
@@ -675,6 +678,7 @@ static int     setall(char **argv,regist
                        {
                                if(comvar || (shp->last_root==shp->var_tree && 
(tp->tp || (!shp->st.real_fun && (nvflags&NV_STATIC)) || 
(!(flag&(NV_EXPORT|NV_RDONLY)) && 
nv_isattr(np,(NV_EXPORT|NV_IMPORT))==(NV_EXPORT|NV_IMPORT)))))
 {
+                               if((flag&(NV_HOST|NV_INTEGER))!=NV_HOST)
                                        _nv_unset(np,0);
 }
                        }
@@ -790,7 +794,7 @@ static int     setall(char **argv,regist
                                else
                                {
                                        char *oldname=0;
-                                       int len=strlen(name);
+                                       size_t len=strlen(name);
                                        if(tp->argnum==1 && newflag==NV_INTEGER 
&& nv_isattr(np,NV_INTEGER))
                                                tp->argnum = 10;
                                        if(np->nvfun && !nv_isarray(np) && 
name[len-1]=='.')
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to