https://bugzilla.redhat.com/show_bug.cgi?id=2277345

            Bug ID: 2277345
           Summary: NotoSansMono[wght].ttf file name causes scripts with
                    failglob enabled to fail
           Product: Fedora
           Version: 40
          Hardware: All
                OS: Linux
            Status: NEW
         Component: google-noto-fonts
          Severity: medium
          Assignee: ta...@redhat.com
          Reporter: hart...@redhat.com
        QA Contact: extras...@fedoraproject.org
                CC: fonts-bugs@lists.fedoraproject.org,
                    i18n-b...@lists.fedoraproject.org,
                    peter...@redhat.com, p...@redhat.com, ta...@redhat.com
  Target Milestone: ---
    Classification: Fedora



shopt failglob
If set, patterns which fail to match filenames during pathname expansion result
in an expansion error.

Using this feature is good practice in scripts as helps prevent scripting
mistakes; however, having file name with square brackets causes failures. And
with Fedora 40 upgrade seems
google-noto-sans-mono-vf-fonts-20240301-2.fc40.noarch has added one with:

  /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf

Reproducible: Always

Steps to Reproduce:
1. Causes globs that don't expand to cause errors
   $ shopt -s failglob

2. Try use files from rpm as variable, and fail
   $ for file in $(rpm -q --list google-noto-sans-mono-vf-fonts) ; do
     [[ -f "/${file}" ]] || echo "${file}"
   done
   -bash: no match: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf

3. Note the RC
   $ echo $?
   1

4. Or even command line
   $ rpm -qf /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf
   -bash: no match: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf

   $ rpm -qf '/usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf'
   google-noto-sans-mono-vf-fonts-20240301-2.fc40.noarch


Actual Results:  
   -bash: no match: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf


Expected Results:  
no error accessing files with failglob shopt enabled

started fedora 40 upgrade, as daily script of mine fails because this file is
included in initramfs too.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2277345

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202277345%23c0
--
_______________________________________________
fonts-bugs mailing list -- fonts-bugs@lists.fedoraproject.org
To unsubscribe send an email to fonts-bugs-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/fonts-bugs@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to