• Bug#1106007: --ignore-paths not working as advertised

    From martin f krafft@21:1/5 to The manpage on Sun May 18 19:40:01 2025
    Package: inotify-hookable
    Version: 0.09-2
    Severity: normal
    File: /usr/bin/inotify-hookable

    The manpage says:

    **"-i" or "--ignore-paths"**
    Regexes for files/directories to ignore events for. By default this
    is set to regexes for vim and emacs temporary files, "qr{\..*sw.\z}"
    and "qr{\.\#[^/]+\z}" respectively.

    The regexes match after any "/" in the path or the beginning of the
    string.

    I want to ignore files under `.mypy_cache`, `.ruff_cache`, and
    `.pytest_cache`, and so I tried:

    ```
    inotify-hookable -d -w . -i '\..+_cache' -C '.+\.py$=pytest -s'
    ```

    and also every other combination of regexp I could think of, including
    the use of `qr{}` and even just `.*`, but none of these seem to have any effect, leading me to believe that `-i` is broken, or very wrongly
    documented.

    Thanks for looking into this!

    -- System Information:
    Debian Release: trixie/sid
    APT prefers unstable
    APT policy: (500, 'unstable'), (1, 'experimental')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.25-amd64 (SMP w/16 CPU threads; PREEMPT)
    Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages inotify-hookable depends on:
    ii libclass-inspector-perl 1.36-3
    ii libdata-bitmask-perl 1.00-1
    ii liblinux-inotify2-perl 1:2.3-2+b3
    ii liblist-moreutils-perl 0.430-2
    ii libmoose-perl 2.2207-1+b3
    ii libmoosex-getopt-perl 0.78-1
    ii libmoosex-types-perl 0.51-4
    ii libtry-tiny-perl 0.32-1
    ii perl 5.40.1-3

    inotify-hookable recommends no packages.

    inotify-hookable suggests no packages.

    -- debconf-show failed


    --
    .''`. martin f. krafft <madduck@d.o>
    : :' : proud Debian developer
    `. `'` http://people.debian.org/~madduck
    `- Debian - when you have better things to do than fixing systems

    <!DOCTYPE html>

    <html>
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    </head>
    <body style="font-family: Lato, Calibri, Tahoma, sans-serif; max-width: 32em"> <p style="text-align: justify; text-justify: auto">Package: inotify-hookable<br/>
    Version: 0.09-2<br/>
    Severity: normal<br/>
    File: /usr/bin/inotify-hookable</p>
    <p style="text-align: justify; text-justify: auto">The manpage says:</p> <blockquote style="padding: 0 0.5em; margin: 0; font-style: italic; border-left: 2px solid #666">
    <p style="text-align: justify; text-justify: auto"><strong>&ldquo;-i&rdquo; or &ldquo;&ndash;ignore-paths&rdquo;</strong><br/>
    Regexes for files/directories to ignore events for. By default this is set to regexes for vim and emacs temporary files, &ldquo;qr{..*sw.\z}&rdquo; and &ldquo;qr{.#[^/]+\z}&rdquo; respectively.</p>
    <p style="text-align: justify; text-justify: auto">The regexes match after any &ldquo;/&rdquo; in the path or the beginning of the string.</p>
    </blockquote>
    <p style="text-align: justify; text-justify: auto">I want to ignore files under <code>.mypy_cache</code>, <code>.ruff_cache</code>, and <code>.pytest_cache</code>, and so I tried:</p>
    <div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><code>inotify-hookable -d -w . -i &#39;\..+_cache&#39; -C &#39;.+\.py$=pytest -s&#39;
    </code></pre></div>
    <p style="text-align: justify; text-justify: auto">and also every other combination of regexp I could think of, including the use of <code>qr{}</code> and even just <code>.*</code>, but none of these seem to have any effect, leading me to believe that <
    code>-i</code> is broken, or very wrongly documented.</p>
    <p style="text-align: justify; text-justify: auto">Thanks for looking into this!</p>
    <p style="text-align: justify; text-justify: auto">&ndash; System Information:<br/>
    Debian Release: trixie/sid<br/>
    APT prefers unstable<br/>
    APT policy: (500, &lsquo;unstable&rsquo;), (1, &lsquo;experimental&rsquo;)<br/>
    Architecture: amd64 (x86_64)</p>
    <p style="text-align: justify; text-justify: auto">Kernel: Linux 6.12.25-amd64 (SMP w/16 CPU threads; PREEMPT)<br/>
    Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en<br/>
    Shell: /bin/sh linked to /usr/bin/dash<br/>
    Init: systemd (via /run/systemd/system)<br/>
    LSM: AppArmor: enabled</p>
    <p style="text-align: justify; text-justify: auto">Versions of packages inotify-hookable depends on:<br/>
    ii libclass-inspector-perl 1.36-3<br/>
    ii libdata-bitmask-perl 1.00-1<br/>
    ii liblinux-inotify2-perl 1:2.3-2+b3<br/>
    ii liblist-moreutils-perl 0.430-2<br/>
    ii libmoose-perl 2.2207-1+b3<br/>
    ii libmoosex-getopt-perl 0.78-1<br/>
    ii libmoosex-types-perl 0.51-4<br/>
    ii libtry-tiny-perl 0.32-1<br/>
    ii perl 5.40.1-3</p>
    <p style="text-align: justify; text-justify: auto">inotify-hookable recommends no packages.</p>
    <p style="text-align: justify; text-justify: auto">inotify-hookable suggests no packages.</p>
    <p style="text-align: justify; text-justify: auto">&ndash; debconf-show failed</p>
    <div id="signature" style="font-family: Lato, Calibri, Tahoma, sans-serif; max-width: 32em"><span class="sig_separator" style="display: none">-- </span>

    <dt>.&rsquo;&lsquo;`. martin f. krafft <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#109;&#97;&#100;&#100;&#117;&#99;&#107;&#64;&#100;&#46;&#111;">&#109;&#97;&#100;&#100;&#117;&#99;&#107;&#64;&#100;&#46;&#111;</a></dt>
    <dd>:&rsquo; : proud Debian developer<br/> <code>.</code>&lsquo;<code>http://people.debian.org/~madduck</code>- Debian - when you have better things to do than fixing systems</dd>
    </dl>
    </div>
    </body>
    </html>

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