Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661492 - app-misc/mmv buggy debian patch
Summary: app-misc/mmv buggy debian patch
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Shell Tools Herd Bugs
Depends on:
Reported: 2018-07-18 11:07 UTC by Thomas Capricelli
Modified: 2019-05-31 14:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2018-07-18 11:07:24 UTC
the mmv package includes

Which is buggy:
    if ((ffrom->fi_stflags & FI_ISDIR) ? !dirs : !fils)
+   {
+       if (verbose)
+           printf("ignoring directory %s\n", ffrom->fi_name);
+   }

As can be seen from the above line, mmv decides to ignore an entry depending on the type (ffrom->fi_stflags & FI_ISDIR) and to some input flags (dirs for directories, and fils for files).

As a result, when ignoring files, this buggy message is displayed "ignore directory xxxxxxx.txt", where xxx is obviously not a directory.

As a result, hundred of bogus lines are displayed when using mmv, even without the -r option.
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2018-07-18 11:21:27 UTC
I'm quite sure upstream would be interested in this as well...
Comment 2 Thomas Capricelli 2018-07-18 13:00:42 UTC
Problem is that there's no 'upstream'. The package is clearly orphan. Debian kinda has adopted it, but i gave up trying to report a bug on their bugzilla after 10minutes reading through their websites. Seems like they want an email instead of web reports.
Comment 3 Thomas Capricelli 2019-05-31 14:23:45 UTC

Could you either remove the lines from the debian patch, or add a 'gentoo-specific' patch ? 

I currently use this patch in my local overlay:

diff -u -ur mmv-1.01b.orig/mmv.c
--- mmv.c   2018-07-18 13:32:41.381865687 +0200
+++ mmv.c   2018-07-18 13:32:01.209764252 +0200
@@ -1204,11 +1204,7 @@
    getstat(pathbuf, ffrom);
    if ((ffrom->fi_stflags & FI_ISDIR) ? !dirs : !fils)
-   {
-       if (verbose)
-           printf("ignoring directory %s\n", ffrom->fi_name);
-   }

    if (needslash) {
        strcpy(pathend + *pk, SLASHSTR);