And once more hello Mr. Bell. Steffen Nurpmeso wrote in <20200102204847.xjeb1%stef...@sdaoden.eu>: ... |Steffen Nurpmeso wrote in <20191231170106.qhh9d%stef...@sdaoden.eu>: | ... ||russellb...@gmail.com wrote in <201912311502.xbvf2isi031...@randytool.ne\ ||t>: ||| I switched to packaged s-nailx today s-nail-14.9.16 and get |||these warnings: ||| ||| mailx: Warning: variable superseded or obsoleted: NAIL_NO_SYSTEM_RC ||| mailx: Warning: variable superseded or obsoleted: NAIL_EXTRA_RC ||| |||I don't set these variables anywhere.
So attached there is a dramatical improvement of the user experience ;-) regarding this mess. I pushed it to [master] and the entire [stable/{v14.9,lastest,stable}] series, and i attach it, too. Maybe someone wants to apply it locally to reveal cellar corpses more pleasantly. Yeah, sorry. I actually remember that i felt the pressure to change this when doing the [net-test] topic branch, because of all the obsoletion warnings of the ssl* things. I think around that time it became clear we need another v14.9 update, and then Martynas Bendorius reported a TLS compilation problem for a specific OpenSSL version, so i did a couple of other things, then did more test coverage for basic commands copy/move/save, and then a lot of other little things, and simply did not stumble upon the problem again for more than ten weeks. Until you came around. So sorry for the inconvenience! Thanks for the report, and Ciao from Germany. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
commit 812e96a6 Author: Steffen Nurpmeso <stef...@sdaoden.eu> AuthorDate: 2020-01-04 00:39:19 +0100 Commit: Steffen Nurpmeso <stef...@sdaoden.eu> CommitDate: 2020-01-04 00:41:32 +0100 Dramatically improve obsoleted warnings of variables (Russell Bell) --- include/mx/nailfuns.h | 3 ++- src/mx/accmacvar.c | 26 ++++++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/mx/nailfuns.h b/include/mx/nailfuns.h index d9e20d7d..583a843a 100644 --- a/include/mx/nailfuns.h +++ b/include/mx/nailfuns.h @@ -189,7 +189,8 @@ FL boole n_var_okclear(enum okeys okey); #define ok_vclear(C) n_var_okclear(su_CONCAT(ok_v_, C)) /* Variable option key lookup/(un)set/clear. - * If try_getenv is true we'll getenv(3) _if_ vokey is not a known enum okey. + * If try_getenv is true we will getenv(3) _if_ vokey is not a known enum okey; + * it will also cause obsoletion messages only for doing lookup (once). * _vexplode() is to be used by the shell expansion stuff when encountering * ${@} in double-quotes, in order to provide sh(1)ell compatible behaviour; * it returns whether there are any elements in argv (*cookie) */ diff --git a/src/mx/accmacvar.c b/src/mx/accmacvar.c index 6ef5c1a9..92fdf30d 100644 --- a/src/mx/accmacvar.c +++ b/src/mx/accmacvar.c @@ -158,7 +158,9 @@ enum a_amv_var_lookup_flags{ * $TMPDIR is set to non-existent we can use the VAL_TMPDIR config default, * but if this also fails (filesystem read-only for example), then all bets * are off, and we must not enter an endless loop */ - a_AMV_VLOOK_BELLA_CIAO_CIAO_CIAO = 1u<<30 + a_AMV_VLOOK_BELLA_CIAO_CIAO_CIAO = 1u<<29, + /* #ifndef a_AMV_VAR_HAS_OBSOLETE temporarily defined to _VLOOK_NONE! */ + a_AMV_VLOOK_LOG_OBSOLETE = 1u<<30 }; enum a_amv_var_setclr_flags{ @@ -318,6 +320,11 @@ struct a_amv_var_carrier{ #include "mx/gen-version.h" /* - */ #include "mx/gen-okeys.h" /* $(MX_SRCDIR) */ +/* As above */ +#ifndef a_AMV_VAR_HAS_OBSOLETE +# define a_AMV_VLOOK_LOG_OBSOLETE a_AMV_VLOOK_NONE +#endif + /* As promised above, CTAs to protect our structures */ CTA(a_AMV_VAR_NAME_KEY_MAXOFF <= U16_MAX, "Enumeration excesses storage datatype"); @@ -1633,11 +1640,10 @@ jleave: j_leave: #ifdef a_AMV_VAR_HAS_OBSOLETE if(UNLIKELY((avmp = avcp->avc_map) != NIL && - (avmp->avm_flags & a_AMV_VF_OBSOLETE) != 0)){ - if((n_poption & n_PO_D_V) || /* TODO v15compat: only if PO_D_V! */ - (avp != NIL && avp != R(struct a_amv_var*,-1))) - a_amv_var_obsolete(avcp->avc_name); - } + (avmp->avm_flags & a_AMV_VF_OBSOLETE) != 0) && + ((avlf & a_AMV_VLOOK_LOG_OBSOLETE) || + (avp != NIL && avp != R(struct a_amv_var*,-1)))) + a_amv_var_obsolete(avcp->avc_name); #endif if(UNLIKELY(!(avlf & a_AMV_VLOOK_I3VAL_NONEW)) && @@ -3276,7 +3282,8 @@ n_var_vlook(char const *vokey, boole try_getenv){ default: /* silence CC */ case a_AMV_VSC_NONE: rv = NULL; - if(a_amv_var_lookup(&avc, a_AMV_VLOOK_LOCAL)) + if(a_amv_var_lookup(&avc, (a_AMV_VLOOK_LOCAL | + (try_getenv ? a_AMV_VLOOK_LOG_OBSOLETE : a_AMV_VLOOK_NONE)))) rv = avc.avc_var->av_value; /* Only check the environment for something that is otherwise unknown */ else if(try_getenv && avc.avc_map == NULL && @@ -3585,7 +3592,8 @@ c_environ(void *v){ a_amv_var_revlookup(&avc, *ap, TRU1); - if(a_amv_var_lookup(&avc, a_AMV_VLOOK_NONE) && (islnk || + if(a_amv_var_lookup(&avc, (a_AMV_VLOOK_NONE | + a_AMV_VLOOK_LOG_OBSOLETE)) && (islnk || (avc.avc_var->av_flags & a_AMV_VF_EXT_LINKED))){ if(!islnk){ avc.avc_var->av_flags &= ~a_AMV_VF_EXT_LINKED; @@ -3777,5 +3785,7 @@ jleave: return (f & a_ERR) ? 1 : 0; } +#undef a_AMV_VLOOK_LOG_OBSOLETE + #include "su/code-ou.h" /* s-it-mode */