View previous topic :: View next topic |
Author |
Message |
cpc n00b
Joined: 14 Jun 2002 Posts: 7 Location: California
|
Posted: Tue Jun 18, 2002 2:49 am Post subject: Switch from Debian to Gentoo |
|
|
Hi,
I just switched my workstation from Debian to Gentoo.
I definitely wanted a distro with a strong dependancies architecture as I had the pain to experience RPMs when I was younger. Seems that Mandrake did some nice work with urpmi, but it's too late for me.
I think that a source-based distro is great. Gentoo is much easier than Debian when you want to hack some sourcecode.
Oki, you suffer a lot when XFree, Qt or gtk change, but for the rest the process is painless. I also like the custom patched linux kernel.
Now I would just like a way to do some things I loved with Debian:
*apt-cache search (search a package by its description)
*dpkg -S xxx (search the xxx file in all installed packages
*dpkg -l regexp (search packages by regexp)
Anyway, thank you Gentoo team. |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Tue Jun 18, 2002 4:02 am Post subject: |
|
|
Well, you could do this:
Code: | $ for i in `find | grep .ebuild`; do grep -H DESCRIPTION $i; done > ~/ebuild-descs |
That will build an index of all the DESCRIPION tags in your Portage tree. (Give it a little while, it's a big index. ) Then, to search for something (say, WebDAV), just run:
Code: | grep -i webdav ~/emerge-descs |
There's your searching by description. You can run any grep query on it, including regexps and a number of other cool things. (BTW, I just made all that up because you asked for it.) |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Tue Jun 18, 2002 4:15 am Post subject: |
|
|
Better version:
Code: | for I in `find | grep .ebuild`; do DESC=`grep DESCRIPTION\= $I | awk -F"=*" '$3 == "" { print $2 }'`; echo $I: $DESC; done |
It strips some ebuilds that do comparisons on the DESCRIPTION field as well as outputs in a nicer format. Just grep the output of that. |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Tue Jun 18, 2002 4:55 am Post subject: |
|
|
Behold! The Über-description-search-command-thingy! It now indexes only the newest version of each package, preventing millions of duplicates. And it fits all on one line! (Now that's obscure.)
Code: | for dir in `find /usr/portage -type d ! -name files -mindepth 2`; do ls $dir/*.ebuild 2>/dev/null | head -n 1; done > /tmp/ebuilds; for eb in `cat /tmp/ebuilds`; do DESC=`grep DESCRIPTION\= $eb | awk -F"=" '$3 == "" { print $2 }'`; echo `basename $eb`: $DESC; done | sort > ebuild-descriptions; rm /tmp/ebuilds |
Yee-haw. Not exactly optimized (okay, it takes slightly longer than forever), but effective. Searches are blazing fast. Have fun. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Jun 18, 2002 5:03 am Post subject: |
|
|
To do dpkg -S, emerge gentoolkit and try qpkg -f. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Tue Jun 18, 2002 5:10 am Post subject: |
|
|
qpkg doesn't search description fields. Besides, I already wrote a Tips & Tricks about it. |
|
Back to top |
|
|
cpc n00b
Joined: 14 Jun 2002 Posts: 7 Location: California
|
Posted: Tue Jun 18, 2002 5:27 am Post subject: |
|
|
Thank you.
Like always, man is our friend.
to get all the packages with a file containing "ping" (equivalent of the dpkg -S).
to get the content of the ping package.
As delta407 says, there is nothing implemented yet to query on the description.
I would like the qpkg -i to be quicker. It would build a nice descriptions file... |
|
Back to top |
|
|
|