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

Bug 293654

Summary: media-gfx/aview-1.3.0_rc1-r1 ebuild, aview tmp_creation patch breaks keyboard input for asciiview and breaks multiple file processing
Product: Gentoo Linux Reporter: isaac <aristophrenic>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: signals
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fixed filename spaces patch
tmp_creation patch to work with the fixed filename spaces patch
patch to fix the keyboard commands from stdin problem
ebuild to apply the above patches in the correct order

Description isaac 2009-11-18 19:40:00 UTC
In the script asciiview, the switch from "for name in $filenames;" to "echo $filenames|while read name;" breaks keyboard input from the user when aview is running.
Also the way the patch processes multiple filenames is broken, e.g.
when calling: asciiview file1 file2 file3, the filenames variable stores the file list as file1file2file3.

Reproducible: Always

Steps to Reproduce:
1. run:
asciiview filename

2. run:
asciivew file1 file2 file3


Actual Results:  
When running asciiview on one file, user input is ignored until exiting with ^C.

When running "asciiview file1 file2 file3" you get:
file1file2file3 could not be opended

Expected Results:  
aview keyboard commands should be interpreted when running asciiview
multiple file names should remain separate tokens.
Comment 1 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 21:33:29 UTC
Created attachment 260953 [details, diff]
Fixed filename spaces patch
Comment 2 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 21:34:31 UTC
Created attachment 260955 [details, diff]
tmp_creation patch to work with the fixed filename spaces patch
Comment 3 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 21:35:32 UTC
Created attachment 260957 [details, diff]
patch to fix the keyboard commands from stdin problem
Comment 4 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 21:35:56 UTC
Created attachment 260958 [details]
ebuild to apply the above patches in the correct order
Comment 5 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 21:41:41 UTC
I've taken a stab at fixing the asciiview script. I switched the filename-spaces patch from trying to use nulls and IFS voodoo to using newlines for the "while read" loop and also added some quotes that seem to have been forgotten in the original patch. It now works with multiple filenames, even with spaces in them.

I've also added code to save stdin before the while loop and redirect stdin during to the aview command. This fixes the problem where it won't listen to the keyboard commands.
Comment 6 Kevin McCarthy (RETIRED) gentoo-dev 2011-02-23 17:57:37 UTC
media-gfx/aview-1.3.0_rc1-r2 has been committed to the portage tree.