[Tutor] How linux software centers make “search” operation?

Dave Angel davea at davea.name
Thu Mar 12 02:11:18 CET 2015


On 03/11/2015 07:21 PM, metis wisdom wrote:
> Hello, I want to develop a software center in Ubuntu similar to Ubuntu
> software center.


You forgot the rest of the caps.  It's "Uuntu Software Center".

Why?  Is there something wrong with what it does, that you need 
something different?  Is this actually a school assignment?

What was the actual assignment you were given, and when is it due?  What 
course material have you already covered?  Are you supposed to make this 
software work with live Linux data, or with some madeup samples?

> In ubuntu software center, when we type a keyword and hits
> enter button, it displays us the related results. For example, when i
> searched for "eclipse" keyword, 5 result are listed in ubuntu software
> center.

Is that good, or do you wish it showed 100 results?

>
> I want to do the similar functionality in my software center.

Why?

>
> I tried to solve this problem by making search in apt package manager using
> bash command(apt search package_name), but it gives all packages as result,
> approximately more than 100 packages.
>
> How ubuntu software center and other software centers search a keyword?

What's a software center?  Now you're using the term as though it's a 
generic term, rather than the name of a particular software package.

> Where do they search the keyword and retrieve results?

They probably issue an SQL command. to some database.  Or maybe they 
issue some Perl code that looks something up in a hash table.  Or maybe 
a SOAP call.

Does it matter?

> Source code of
> ubuntu software center is so complex and i cannot find what i need. Any
> guide will be appreciated. Thanks in advance.

You've looked at the source?  What languages is it implemented in?  You 
mention technologies, but not what they are.

>
> I analysed all source code of ubuntu software center. These codes includes
> so many technologies that it is very hard to understand it. IN order to
> understand these codes, i have to learn many technologies , it may take at
> least one month,maybe this time may not be enough. After i spent so many
> times learning these technologies, what if these technologies does not
> solve my problem? I know only python, i am not familiar with os library
> etc, and i have a limited time, please guide me. I need to build a simple
> software center, not a sophisticated one.

-- 
DaveA


More information about the Tutor mailing list