Skip to content
Tcl Source Code History Of Ticket 46291ba24d
Login

History Of Ticket 46291ba24d

Artifacts Associated With Ticket 46291ba24d

  1. Ticket change [ba2605f5df] (rid 196608) by anonymous on 2021-11-17 08:47:34:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      win/Makefile.in has bashism during install, when zipfs=no.
      
      This can be encountered during `make install` after configuring without zipfs.
      
      The following patch fixes it at core-8-branch, but the same fix should also be applied to main:
      ```
      From bf4a7c32971a3a56a96298875e754ca79334dfa8 Mon Sep 17 00:00:00 2001
      From: "Avi Halachmi (:avih)" <[email protected]>
      Date: Wed, 17 Nov 2021 10:33:14 +0200
      Subject: [PATCH] win: install: avoid bashism with zipfs=no
      
      The expansion form *foo.{ext1,ext2} is bash-specific, and if zipfs is
      disabled and the shell is not bash (e.g. on Debian when cross
      compiling to windows) then this line fails.
      
      Replace it with standard posix glob.
      ---
       win/Makefile.in | 3 ++-
       1 file changed, 2 insertions(+), 1 deletion(-)
      
      diff --git a/win/Makefile.in b/win/Makefile.in
      index 1e4b82299c..649f452324 100644
      --- a/win/Makefile.in
      +++ b/win/Makefile.in
      @@ -856,7 +856,8 @@ install-libraries: libraries install-tzdata install-msgs
       	    $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \
       	    done;
       	@echo "Installing package cookiejar 0.2"
      -	@for j in $(ROOT_DIR)/library/cookiejar/*.{tcl,gz}; \
      +	@for j in $(ROOT_DIR)/library/cookiejar/*.tcl \
      +	          $(ROOT_DIR)/library/cookiejar/*.gz; \
       	    do \
       	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \
       	    done;
      -- 
      2.25.1
      
      ```
      
    5. foundin initialized to: "8.7+ (main, core-8-branch)"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "anonymous"
    13. subsystem initialized to: "53. Configuration and Build Tools"
    14. title initialized to: "win: install: bashism in Makefile.in"
    15. type initialized to: "Bug"
  2. Ticket change [9d6fdf2b92] (rid 196617) by jan.nijtmans on 2021-11-17 10:22:55:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459535.93258196"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [7f97316fe4b66b9a|here].   Thanks for the report and for the patch!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
  3. Ticket change [d173d13e5c] (rid 196622) by anonymous on 2021-11-17 10:40:28:

    1. closedate changed to: "2459535.94477164"
    2. closer changed to: "anonymous"
    3. icomment:
      Thanks.
      
      Do note that these globs can result in an error if there are no *.tcl files (or no *.gz files), as e.g. `*.gz` "expands" to `*.gz` (i.e. unmodified) if there are no matches.
      
      In some shells, like bash, the `nullglob` option can handle it, but that's not standardized.
      
      A standard approach would be to check that the file exists before using it, e.g.
      
      ```
      for i in path/to/*.gz; do
          [ -e "$i" ] || continue
          # do something with $i
      done
      ```
      
    4. login: "anonymous"
    5. mimetype: "text/plain"