Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26082 - app-admin/gentoolkit-0.1.30: shorten "sort|uniq" to "sort -u"
Summary: app-admin/gentoolkit-0.1.30: shorten "sort|uniq" to "sort -u"
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-06 15:05 UTC by Nicolas Kaiser
Modified: 2011-10-30 22:18 UTC (History)
1 user (show)

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


Attachments
shorten sort|uniq to sort -u (sortuniq.diff,648 bytes, patch)
2003-08-06 15:07 UTC, Nicolas Kaiser
Details | Diff
same for /usr/bin/dep-clean (dep-clean.diff,866 bytes, patch)
2003-08-06 15:23 UTC, Nicolas Kaiser
Details | Diff
same for /usr/bin/gentool-package-count (gentool-package-count.diff,500 bytes, patch)
2003-08-06 15:26 UTC, Nicolas Kaiser
Details | Diff
same for /usr/bin/revdep-rebuild (revdep-rebuild.diff,684 bytes, patch)
2003-08-06 15:30 UTC, Nicolas Kaiser
Details | Diff
again /usr/bin/revdep-rebuild (revdep-rebuild.diff,659 bytes, patch)
2003-08-10 17:09 UTC, Nicolas Kaiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Kaiser 2003-08-06 15:05:59 UTC
"sort|uniq" can be shortened to "sort -u"
Patch attached.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Nicolas Kaiser 2003-08-06 15:07:26 UTC
Created attachment 15632 [details, diff]
shorten sort|uniq to sort -u
Comment 2 Nicolas Kaiser 2003-08-06 15:23:03 UTC
Created attachment 15633 [details, diff]
same for /usr/bin/dep-clean

The above was for /usr/bin/qpkg, now I found some more of these.
This is /usr/bin/dep-clean.
Comment 3 Nicolas Kaiser 2003-08-06 15:26:41 UTC
Created attachment 15634 [details, diff]
same for /usr/bin/gentool-package-count
Comment 4 Nicolas Kaiser 2003-08-06 15:30:03 UTC
Created attachment 15635 [details, diff]
same for /usr/bin/revdep-rebuild
Comment 5 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-10 15:48:53 UTC
Is there a reason you want to use -u option?
Comment 6 Nicolas Kaiser 2003-08-10 16:32:09 UTC
"sort -u" is a lot faster. Here's a nice article about it:
http://www.itworld.com/nl/unix_sys_adm/04112001/

Quote:"Large problems or easy optimization makes optimizing a solution sensible. In the case of sort -u, the latter is true (..). If you don't need extra system calls (i.e., to uniq), then avoid it."
Comment 7 Nicolas Kaiser 2003-08-10 17:09:24 UTC
Created attachment 15871 [details, diff]
again /usr/bin/revdep-rebuild

I just see uniq is called twice in a row in rev-dep-rebuild.
One time is enough ;)
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2003-09-30 12:35:13 UTC
qpkg is now patched
Comment 9 Martin Holzer (RETIRED) gentoo-dev 2003-09-30 12:39:20 UTC
revdep-rebuild is patched too
Comment 10 Martin Holzer (RETIRED) gentoo-dev 2003-09-30 12:42:17 UTC
in cvs