• TCLLIB release version access by program

    From Harald Oehlmann@21:1/5 to All on Fri Sep 16 12:29:34 2022
    Dear TCL team,
    is there any way to get the TCLLIB release version by an API?

    It would be great to get it by "package require tcllib" ;-).

    Background is a compliance question by Volkswagen.
    They check for every used open source component, if the provided licence
    file is really in the distribution.
    I currently use "package require cmdline" to get the TCLLib version.
    This resulted in "1.5". There is no TCLLIB release 1.5, only 1.4 or 1.6.
    Thus, I got a complaint.

    Thank you and take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Heller@21:1/5 to [email protected] on Fri Sep 16 13:03:10 2022
    "tcllib" is not a package, it is a collection of packages. And tcllib itself is up to release 1.19 (at least on my Ubuntu 18.04 Linux system):

    % dpkg-query -l tcllib
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Architecture Description +++-==============-============-============-================================= ii tcllib 1.19-dfsg-2 all Standard Tcl Library

    At Fri, 16 Sep 2022 12:29:34 +0200 Harald Oehlmann <[email protected]> wrote:


    Dear TCL team,
    is there any way to get the TCLLIB release version by an API?

    It would be great to get it by "package require tcllib" ;-).

    Background is a compliance question by Volkswagen.
    They check for every used open source component, if the provided licence
    file is really in the distribution.
    I currently use "package require cmdline" to get the TCLLib version.
    This resulted in "1.5". There is no TCLLIB release 1.5, only 1.4 or 1.6. Thus, I got a complaint.

    Thank you and take care,
    Harald




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    [email protected] -- Webhosting Services

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From heinrichmartin@21:1/5 to Harald Oehlmann on Fri Sep 16 05:45:09 2022
    On Friday, September 16, 2022 at 12:29:39 PM UTC+2, Harald Oehlmann wrote:
    Dear TCL team,

    not part of the team, but trying to help

    is there any way to get the TCLLIB release version by an API?

    It would be great to get it by "package require tcllib" ;-).

    Afaik, the version of the package (see .spec file in the source) is not copied to the install target.

    At first glance, you are left with two options:
    * get the versions of all packages or of all used packages to create a signature of your deliverable
    * get the version of the installed package (package manager, or package itself)

    I currently use "package require cmdline" to get the TCLLib version.
    This resulted in "1.5". There is no TCLLIB release 1.5, only 1.4 or 1.6.

    I am not aware of any package that has its version tied to the overall version; but that would probably a way to resolve your request, i.e. add an empty[1] package tcllib.

    [1] you don't want to load all packages upon "package require tcllib", do you? ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Robert Heller on Fri Sep 16 13:45:27 2022
    Robert Heller <[email protected]> wrote:
    "tcllib" is not a package, it is a collection of packages. And tcllib itself is up to release 1.19 (at least on my Ubuntu 18.04 Linux system):

    Ubuntu is quite behind -- the latest release was 1.20 on 2019.12.02 (https://www.tcl-lang.org/software/tcllib/)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Heller@21:1/5 to Rich on Fri Sep 16 16:10:43 2022
    At Fri, 16 Sep 2022 13:45:27 -0000 (UTC) Rich <[email protected]d> wrote:


    Robert Heller <[email protected]> wrote:
    "tcllib" is not a package, it is a collection of packages. And tcllib itself
    is up to release 1.19 (at least on my Ubuntu 18.04 Linux system):

    Ubuntu is quite behind -- the latest release was 1.20 on 2019.12.02 (https://www.tcl-lang.org/software/tcllib/)

    It is on an older LTS release. I expect Ubuntu 20.04 or 22.04 will have a newer version.





    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    [email protected] -- Webhosting Services

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ashok Nadkarni@21:1/5 to Rich on Fri Sep 16 09:54:40 2022
    On Friday, September 16, 2022 at 7:15:32 PM UTC+5:30, Rich wrote:
    Ubuntu is quite behind -- the latest release was 1.20 on 2019.12.02 (https://www.tcl-lang.org/software/tcllib/)

    Current release is 1.21 released May 2022. https://core.tcl-lang.org/tcllib/doc/trunk/embedded/index.md

    It's not only Ubuntu releases that are behind. Tcl website pages are behind as well :-)

    /Ashok

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Fri Sep 16 18:33:33 2022
    Am 16.09.22 um 18:10 schrieb Robert Heller:
    At Fri, 16 Sep 2022 13:45:27 -0000 (UTC) Rich <[email protected]d> wrote:


    Robert Heller <[email protected]> wrote:
    "tcllib" is not a package, it is a collection of packages. And tcllib itself
    is up to release 1.19 (at least on my Ubuntu 18.04 Linux system):

    Ubuntu is quite behind -- the latest release was 1.20 on 2019.12.02
    (https://www.tcl-lang.org/software/tcllib/)

    It is on an older LTS release. I expect Ubuntu 20.04 or 22.04 will have a newer version.






    Ubuntu 22.04 has tcllib 1.20.

    --
    Csaba Nemethi https://www.nemethi.de mailto:[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Fri Sep 16 17:01:13 2022
    You could get a dict of all packages versions in your tcllib source directory tree:

    proc getPkgVer {path} {
    # return a dict of all package names and their versions
    # from any pkgIndex.tcl file in directories below the given path

    # get a list of all lines from all pkgIndex.tcl files
    foreach fn [fileutil::find $path {string match pkgIndex.tcl}] {
    set ff [open $fn r]
    try {lappend lines [split [read $ff] \n]} finally {close $ff}
    }
    # scan each line for "package ifneeded" and harvest package name and version
    # assumes there is only one entry per line
    dict create {*}[concat {*}[lmap line $lines {
    if {[regexp {package\s+ifneeded\s+(\S+)\s+(\S+)\s} $line x pkg ver]} {
    list $pkg $ver
    } else {
    continue
    }
    }]]
    }

    and compare versions for any installed packages:

    proc installedPkgs {} {
    # return a list of installed packages and their versions
    lmap pkg [package names] {
    set ver [package provide $pkg]
    if {"" eq $ver} {
    continue
    } else {
    list $pkg $ver
    }
    }
    }


    I've got what claims to be tcllib 1.21 from may 2022
    although it takes some searching to actually find it on source forge.

    Dave B

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Mon Sep 19 07:55:02 2022
    Am 16.09.2022 um 14:45 schrieb heinrichmartin:> I am not aware of any
    package that has its version tied to the overall version; but that would probably a way to resolve your request, i.e. add an empty[1] package tcllib.

    [1] you don't want to load all packages upon "package require tcllib", do you? ;-)

    Dear TCL group,
    thank you all for the answers, I appreciate. It is always good to know,
    that I did not overlook something obvious.

    The main pckIndex.tcl file has the release version in a comment and
    states to be auto-generated.
    So, technically, probably an:
    package ifneeded tcllib 1.21 {package provide tcllib 1.21}
    would be possible.

    Yes, "package require tcllib" will only check if it exists and return
    the version. It will not load any modules.

    I have filed an RFE on the bug tracker.

    Thank you all,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)