Changeset 3827 for lliurex-store/trunk
- Timestamp:
- Mar 7, 2017, 1:07:33 PM (4 years ago)
- Location:
- lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/searchManager.py
r3678 r3827 34 34 return(self.pluginInfo) 35 35 36 def execute_action(self,appstreamStore,action,tokens ):36 def execute_action(self,appstreamStore,action,tokens,exact_match_for_search=False): 37 37 if not type(tokens) is str: 38 38 tokens='' … … 50 50 self._list_sections() 51 51 if (action=='search' or action=='info'): 52 self._search_app(tokens )52 self._search_app(tokens,exact_match_for_search) 53 53 self.progress=100 54 54 return(self.result) … … 60 60 self.precision=precision 61 61 62 def _search_app(self,tokens ):63 self._debug("Searching app "+str(tokens) )62 def _search_app(self,tokens,exact_match): 63 self._debug("Searching app "+str(tokens)+ "with exact_match="+str(exact_match)) 64 64 applist=[] 65 65 app=None … … 70 70 applist.append(app) 71 71 self._debug("App direct match found: "+app.get_id()) 72 # else: 73 # for app in self._get_apps_by_match(tokens): 74 # applist.append(app) 75 applist=self._get_apps_by_match(tokens,applist) 72 if not exact_match: 73 applist=self._get_apps_by_match(tokens,applist) 76 74 if len(applist): 77 75 self._set_status(0) -
lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/storeManager.py
r3826 r3827 418 418 419 419 searchFunction=self._execute_class_method(action,'*',launchedby) 420 aux_result=searchFunction.execute_action(self.store,action,searchItem) 420 if (launchedby=="install" or launchedby=='remove'): 421 #Last boolean parameter sets the exact_match_for_search attribute 422 aux_result=searchFunction.execute_action(self.store,action,searchItem,True) 423 else: 424 aux_result=searchFunction.execute_action(self.store,action,searchItem,False) 421 425 aux_applist=aux_result['data'] 422 426 status=aux_result['status']
Note: See TracChangeset
for help on using the changeset viewer.