Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293654 - media-gfx/aview-1.3.0_rc1-r1 ebuild, aview tmp_creation patch breaks keyboard input for asciiview and breaks multiple file processing
Summary: media-gfx/aview-1.3.0_rc1-r1 ebuild, aview tmp_creation patch breaks keyboard...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-18 19:40 UTC by isaac
Modified: 2011-02-23 17:57 UTC (History)
1 user (show)

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


Attachments
Fixed filename spaces patch (aview-1.3.0_rc1-filename-spaces.patch,1.28 KB, patch)
2011-01-28 21:33 UTC, Kevin McCarthy (RETIRED)
Details | Diff
tmp_creation patch to work with the fixed filename spaces patch (aview-1.3.0_rc1-tmp_creation.patch,981 bytes, patch)
2011-01-28 21:34 UTC, Kevin McCarthy (RETIRED)
Details | Diff
patch to fix the keyboard commands from stdin problem (aview-1.3.0_rc1-stdin.patch,499 bytes, patch)
2011-01-28 21:35 UTC, Kevin McCarthy (RETIRED)
Details | Diff
ebuild to apply the above patches in the correct order (aview-1.3.0_rc1-r2.ebuild,851 bytes, text/plain)
2011-01-28 21:35 UTC, Kevin McCarthy (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
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.