RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 06-May-2016 00:23:43 Branch: rpm-5_4 Handle: 2016050522234300 Modified files: (Branch: rpm-5_4) rpm/rpmio rpmtcl.c Log: - tcl: spew version of tcl in use. Summary: Revision Changes Path 2.13.2.3 +16 -0 rpm/rpmio/rpmtcl.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/rpmtcl.c ============================================================================ $ cvs diff -u -r2.13.2.2 -r2.13.2.3 rpmtcl.c --- rpm/rpmio/rpmtcl.c 24 Sep 2014 13:03:04 -0000 2.13.2.2 +++ rpm/rpmio/rpmtcl.c 5 May 2016 22:23:43 -0000 2.13.2.3 @@ -1,6 +1,7 @@ #include "system.h" #include <rpmiotypes.h> +#include <rpmlog.h> #include <argv.h> #ifdef WITH_TCL @@ -123,6 +124,15 @@ return _rpmtclI; } +#if defined(WITH_TCL) +static void rpmtclInfo(void) +{ + int _lvl = RPMLOG_DEBUG; + + rpmlog(_lvl, "==================== tcl-%s\n", TCL_PATCH_LEVEL); +} +#endif /* WITH_TCL */ + rpmtcl rpmtclNew(char ** av, uint32_t flags) { rpmtcl tcl = @@ -136,10 +146,16 @@ Tcl_Interp * tclI = Tcl_CreateInterp(); char b[32]; int ac; + static int oneshot; if (av == NULL) av = _av; ac = argvCount((ARGV_t)av); + if (!oneshot) { + rpmtclInfo(); + oneshot++; + } + Tcl_SetVar(tclI, "argv", Tcl_Merge(ac-1, (const char *const *)av+1), TCL_GLOBAL_ONLY); (void)sprintf(b, "%d", ac-1); Tcl_SetVar(tclI, "argc", b, TCL_GLOBAL_ONLY); @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org