OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004825 [pkg_get] regular use minor always 2011-09-15 17:40 2011-09-20 13:47
Reporter bryanwgraham View Status public  
Assigned To
Priority normal Resolution reopened  
Status feedback  
Summary 0004825: pkg-get can mess up shells on solaris express
Description While I realize that OpenCSW probably doesn't explicitly support Solaris Express, this problem will need to be fixed eventually. When pkg-get is run on Solaris Express, if any of the 'print "whatever" > /dev/fd/2' statements are processed, the shell will have difficulties when it returns. Specifically, backspace will print "^H" instead of actually backspacing, and usually if something visual is run after (vim for instance) the screen with crop oddly.

The easiest way to test this is to run "pkg-get -i blah" (something that it won't find), then type something and try to backspace it.

There is a simple fix, because the print statement support a -u option that does exactly what "> /dev/fd/2" does without causing the problem. Thus, this line

gsed -i.bak -e 's/print\(.*\)>\/dev\/fd\/2/print -u 2\1/g' /opt/csw/bin/pkg-get

will fix the problem and create a backup pkg-get.bak file in the process. The following line will do it without creating a backup.

gsed -ie 's/print\(.*\)>\/dev\/fd\/2/print -u 2\1/g' /opt/csw/bin/pkg-get

For informational purposes:
SunOS mirror-x86 5.11 snv_151a i86pc i386 i86pc Solaris
GNU bash, version 4.0.28(1)-release (i386-pc-solaris2.11)
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0009265)
bryanwgraham (reporter)
2011-09-15 18:02

After looking at the script again, this problem could also occur from the "explain_multiple_remove" and "explain_multiple_install" lines, since they are also redirected to > /dev/fd/2, but I don't have an easy way to test this.
(0009266)
phil (manager)
2011-09-15 18:03

Thank you for taking the time to file a bug report.
That being said, this is a bug in solaris express, not pkg-get.
Please file a bug with Oracle and/or "the solaris express people" about it.
(0009267)
bryanwgraham (reporter)
2011-09-15 18:13

I don't disagree with you, it is Solaris Express' problem, but it's such an easy "fix" on the pkg-get side (a simple gsed line), and it IS a problem that lots of users will experience. I realize it's not pkg-get's problem, but given that print even supports a switch (-u) that makes redirection unnecessary, why wouldn't you implement it and save lots of users the headache?
(0009268)
phil (manager)
2011-09-15 18:41

In general principle, I dont do workarounds for things that are destined to be fixed by non-buggy releases of the OS.

However, since this is also somewhat of an optimization as well, I'll keep it in mind for a future release.
(0009290)
bonivart (developer)
2011-09-20 13:47

Please note that pkg-get is considered deprecated for use with OpenCSW. We recommend using CSWpkgutil instead.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker