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

Bug 45927

Summary: epm doesnt handle files which has spaces in file its name
Product: Gentoo Linux Reporter: roma1390
Component: New packagesAssignee: Aron Griffis (RETIRED) <agriffis>
Status: VERIFIED FIXED    
Severity: normal CC: mr_bones_
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to handle whitespace in filenames
fixed patch to properly deal with symlinks

Description roma1390 2004-03-27 13:55:37 UTC
epm doesnt support file names with spaces:

# epm -qf /usr/share/doc/divx4linux-20030428-r1/html/DivX\ MPEG-4\ Codec\ and\ Its\ Interface.htm 
file /usr/share/doc/divx4linux-20030428-r1/html/DivX MPEG-4 Codec and Its Interface.htm is not owned by any package
# epm -qf /usr/share/doc/divx4linux-20030428-r1/html/               
divx4linux-20030428-r1
# epm -ql divx4linux-20030428-r1
/usr/lib/libdivxencore.so
/usr/lib/libdivxdecore.so
/usr/lib/libdivxencore.so.0
/usr/lib/libdivxdecore.so.0
/usr/share/doc/divx4linux-20030428-r1/html/DivX
/usr/include/encore2.h
/usr/include/portab.h
/usr/include/decore.h

# epm -y divx4linux-20030428-r1
md5sum: /usr/share/doc/divx4linux-20030428-r1/html/DivX: No such file or directory
md5sum: MPEG-4: No such file or directory
md5sum: Codec: No such file or directory
md5sum: and: No such file or directory
md5sum: Its: No such file or directory
md5sum: Interface.htm: No such file or directory
..5.....   /usr/share/doc/divx4linux-20030428-r1/html/DivX MPEG-4 Codec and Its Interface.htm

Reproducible: Always
Steps to Reproduce:
Comment 1 roma1390 2004-03-27 13:58:33 UTC
patch for md5sum:


--- /usr/bin/epm        2004-03-21 19:15:33.000000000 +0200
+++ /tmp/epm    2004-03-27 23:46:22.000000000 +0200
@@ -381,7 +381,7 @@
                next;
            }
            if (-r _) {
-               ($md5 = `md5sum $Cname`) =~ s/\s.*//s;
+               ($md5 = `md5sum "$Cname"`) =~ s/\s.*//s;
            }
            else {
                $md5 = 'UNKNOWN';

btw: 
 epm -qi epm          
Name        : epm
Version     : 0.8.5
Release     :                                     Slot: 0
Install date: Sun Mar 21 19:15:33 2004      Build Host: i686-pc-linux-gnu
Group       : app-portage                      License: GPL-2
Size        : 27796
Packager    : agriffis
URL         : http://www.gentoo.org/~agriffis/epm/
Description : 
rpm workalike for Gentoo Linux
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2004-03-29 09:00:52 UTC
Fixed in 0.8.6, in portage now.  Thanks.
Comment 3 roma1390 2004-03-29 20:43:07 UTC
thanks, but all bugs fixed:

epm -ql doen't fixed:

# epm -ql divx4linux
/usr/lib/libdivxencore.so
/usr/lib/libdivxdecore.so
/usr/lib/libdivxencore.so.0
/usr/lib/libdivxdecore.so.0
/usr/share/doc/divx4linux-20030428-r1/html/DivX
/usr/include/encore2.h
/usr/include/portab.h
/usr/include/decore.h

# epm -qi epm
Name        : epm
Version     : 0.8.6
Release     :                                     Slot: 0
Install date: Tue Mar 30 07:37:02 2004      Build Host: i686-pc-linux-gnu
Group       : app-portage                      License: GPL-2
Size        : 28024
Packager    : agriffis
URL         : http://www.gentoo.org/~agriffis/epm/
Description : 
rpm workalike for Gentoo Linux

Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-03-29 23:40:41 UTC
Created attachment 28349 [details, diff]
patch to handle whitespace in filenames

Maybe I'm missing something but this patch seems to work for me.  The "work"
at the end of the query function seems like overkill to me.
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2004-03-30 03:49:08 UTC
Created attachment 28357 [details, diff]
fixed patch to properly deal with symlinks

Doh!  I did miss something.

Does it count if I fixed it before anyone else noticed? ;-)
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2004-04-04 21:40:09 UTC
Thanks Michael, I added this in 0.8.7
Comment 7 roma1390 2004-04-04 23:19:18 UTC
Thanks a lot. It's great job.
Comment 8 Aron Griffis (RETIRED) gentoo-dev 2004-04-05 14:44:59 UTC
Closing