Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Switch from Debian to Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
cpc
n00b
n00b


Joined: 14 Jun 2002
Posts: 7
Location: California

PostPosted: Tue Jun 18, 2002 2:49 am    Post subject: Switch from Debian to Gentoo Reply with quote

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. :D
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jun 18, 2002 4:02 am    Post subject: Reply with quote

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. :D) 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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jun 18, 2002 4:15 am    Post subject: Reply with quote

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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jun 18, 2002 4:55 am    Post subject: Reply with quote

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Tue Jun 18, 2002 5:03 am    Post subject: Reply with quote

To do dpkg -S, emerge gentoolkit and try qpkg -f.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jun 18, 2002 5:10 am    Post subject: Reply with quote

qpkg doesn't search description fields. Besides, I already wrote a Tips & Tricks about it. :D
Back to top
View user's profile Send private message
cpc
n00b
n00b


Joined: 14 Jun 2002
Posts: 7
Location: California

PostPosted: Tue Jun 18, 2002 5:27 am    Post subject: Reply with quote

Thank you.
Like always, man is our friend.
Code:
qpkg -fp ping
to get all the packages with a file containing "ping" (equivalent of the dpkg -S).
Code:
qpkg -l -v ping
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum