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
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-18 11:07 UTC by Thomas Capricelli
Modified: 2021-01-26 01:19 UTC (History)
1 user (show)

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


Attachments

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
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) (RETIRED) 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);
Comment 4 Larry the Git Cow gentoo-dev 2021-01-21 10:01:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a86cc33d1a1435c269b2ab76d111293a08b9df78

commit a86cc33d1a1435c269b2ab76d111293a08b9df78
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-01-21 10:00:46 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-01-21 10:01:40 +0000

    app-misc/mmv: Bump to version 1.01b_p19
    
    Don't apply broken Debian patch (#661492)
    
    Closes: https://bugs.gentoo.org/661492
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-misc/mmv/Manifest             |  1 +
 app-misc/mmv/mmv-1.01b_p19.ebuild | 51 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
Comment 5 Thomas Capricelli 2021-01-26 01:19:05 UTC
Great, thanks !