Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 661492

Summary: app-misc/mmv buggy debian patch
Product: Gentoo Linux Reporter: Thomas Capricelli <orzel>
Component: Current packagesAssignee: Gentoo Shell Tools Herd Bugs <shell-tools>
Status: CONFIRMED ---    
Severity: normal CC: polynomial-c
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Thomas Capricelli 2018-07-18 11:07:24 UTC
the mmv package includes
debian/patches/better-diagnostics-for-directories-584850.diff

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

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.save/mmv.c 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)
 #endif
-   {
-       if (verbose)
-           printf("ignoring directory %s\n", ffrom->fi_name);
        return(0);
-   }

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