Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7150 - suggested patch for gentoolkit - qpkg
Summary: suggested patch for gentoolkit - qpkg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Brandon Low (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-28 01:45 UTC by Paul Thompson
Modified: 2003-02-04 19:42 UTC (History)
2 users (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 Paul Thompson 2002-08-28 01:45:31 UTC
When trying to find a package that owns a directory it is natural
to use tab completion, however, a trailing slash will not match
propertly. eg.

qpkg -f /usr/share/pixmaps/

This simple patch will just strip off a trailing slash.
--- /usr/bin/qpkg       Thu Aug  8 01:21:17 2002
+++ ./qpkg      Sun Aug 25 00:12:27 2002
@@ -113,7 +113,8 @@
                        usage=y
                        break
                fi
-               arg=$a
+               # kill a trailing slash
+               arg=${a%/}
                ;;
                
        esac

It may be tab dammaged via paste, but its pretty obvious. If there are
any legitmate trailing slashes on some options arguments, it should be
moved to the -f processing area.

Also, Im not enough of an sh guy to figure out how to kill an arbitrary ammount
of trailing slashes, which would be technically better.
Paul
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-08-28 06:52:24 UTC
This is Brandon's domain.
Comment 2 Brandon Low (RETIRED) gentoo-dev 2002-09-02 21:28:46 UTC
right right...fixing