pkg_mkIndex overwrite previous information

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf pkg_mkIndex overwrite previous information

  • Creator
    Topic
  • #50347
    Yves Guerin
    Participant

    Hello,

    On cloverleaf 5.6, I find the following strange behavior:

    everytime you try to add a package to a site, the tcl command pkg_mkIndex overwrite the previous information:

    # get system info

    $ uname -a

    AIX axap10 2 5 000BB2BD4C00

    $ showroot

    HCI root is /qdx/qdx5.6/integrator

    HCI site is adt2

    # get pkgIndex info

    $ cat pkgIndex.tcl

    # Tcl package index file, version 1.1

    # This file is generated by the “pkg_mkIndex” command

    # and sourced either when an application starts up or

    # by a “package unknown” script.  It invokes the

    # “package ifneeded” command to set up package-related

    # information so that packages will be loaded automatically

    # in response to “package require” commands.  When this

    # script is sourced, the variable $dir must contain the

    # full path name of this file’s directory.

    package ifneeded tag 0.0.5

      ]

      # run tcl from the console

      # list the previous package

      # add the new package to the list

      $ tcl

      tcl>info patchlevel

      8.4.12

      tcl>package require tag

      0.0.5

      tcl>pkg_mkIndex -verbose — . nephro.pkg

      successful sourcing of nephro.pkg

      packages provided were {nephro 0.0.14}

      processed nephro.pkg

      tcl>package require nephro

      0.0.14

      tcl>package require tag

      0.0.5

      tcl>exit

      # get the package info: missing my tag package

      $ cat pkgIndex.tcl

      # Tcl package index file, version 1.1

      # This file is generated by the “pkg_mkIndex” command

      # and sourced either when an application starts up or

      # by a “package unknown” script.  It invokes the

      # “package ifneeded” command to set up package-related

      # information so that packages will be loaded automatically

      # in response to “package require” commands.  When this

      # script is sourced, the variable $dir must contain the

      # full path name of this file’s directory.

      package ifneeded nephro 0.0.14

        ]

        # get my package names

        $ tcl

        tcl>info patchlevel

        8.4.12

        tcl>package require tag

        Error: can’t find package tag

        tcl>package require nephro

        0.0.14

        tcl>exit

        Did I miss something ?

      Viewing 1 reply thread
      • Author
        Replies
        • #65707
          Charlie Bursell
          Participant

          That is the way it is designed to work.  The auto_mkindex which makes the tclIndex does the same.  I have written a wrapper script, simliar to mktclindex, called mkpkgindex to build the pkgIndex.

          The difference is I use a default of .pkg instead of .tcl so I can differentiate packages from regular Tcl procs.  It is released as part of 5.6+ or you can get it from the scripts area of this forum.

          There are two methods I use when building a new index.  If all of the packages I need are available within the same directory and all are *.pkg files (not *.dll, etc), I simply run mkpkgindex and build the new index.

          If I cannot do that I will first save the existing pkgIndex file to a temp name, run mkpkgindex against the file I want to add then simply copy the contents of the temp file, without comments, to the new file.

        • #65708
          Yves Guerin
          Participant

          Hello Charlie,

          Great, it is different from the “stock” tcl/tk behavior 🙂 .

          Regards.

      Viewing 1 reply thread
      • The forum ‘Cloverleaf’ is closed to new topics and replies.

      Forum Statistics

      Registered Users
      5,125
      Forums
      28
      Topics
      9,294
      Replies
      34,439
      Topic Tags
      287
      Empty Topic Tags
      10