Changeset 6693 for lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/loadStore.py
- Timestamp:
- Jan 25, 2018, 4:47:53 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/loadStore.py
r6645 r6693 52 52 if action=='load_bundles': 53 53 self._load_store(self.store,loadBundles=True) 54 # self.progress=10055 54 self.result['data']=self.store 56 55 self.progress=100 57 56 return(self.result) 58 # return (self.store)59 57 #def execute_action 60 58 … … 91 89 if target_file.endswith('appdata.xml'): 92 90 store_file=Gio.File.new_for_path(target_dir+'/'+target_file) 93 self._debug("Adding file "+target_dir+'/'+target_file)91 self._debug("Adding file %s/%s"%(target_dir,target_file)) 94 92 try: 95 93 store.from_file(store_file,icon_dir,None) 96 94 except Exception as e: 97 self._debug("Couldn't add file "+target_file+" to store")98 self._debug("Reason: "+str(e))95 self._debug("Couldn't add file %s to store"%target_file) 96 self._debug("Reason: %s"%e) 99 97 return(store) 100 98 … … 111 109 a.remove_veto(veto) 112 110 store.add_app(a) 113 self._debug("Adding app from desktop "+desktop_file)111 self._debug("Adding app from desktop %s"%desktop_file) 114 112 except: 115 113 pass … … 125 123 #Zomandos get max priority 126 124 if app.has_category('Zomando'): 127 self._debug("Prioritize zmd "+str(app.get_id()))125 self._debug("Prioritize zmd %s"%app.get_id()) 128 126 app.set_priority(400) 129 127 lliurex_apps.update({app.get_id_filename():app}) … … 132 130 #Prioritize Lliurex apps 133 131 elif app.has_category('Lliurex'): 134 self._debug("Prioritize app "+str(app.get_id()))132 self._debug("Prioritize app %s"%app.get_id()) 135 133 app.set_priority(200) 136 134 lliurex_apps.update({app.get_id_filename():app}) 137 135 elif str(app.get_origin()).find('lliurex')>=0: 138 self._debug("Prioritize app "+app.get_id())136 self._debug("Prioritize app %s"%app.get_id()) 139 137 app.set_priority(100) 140 138 lliurex_apps.update({app.get_id_filename():app}) … … 142 140 app.set_priority(0) 143 141 if app.get_id_filename() in lliurex_apps.keys(): 144 self._debug("Mergin app "+str(app.get_id())+" as is in Lliurex")142 self._debug("Mergin app %s as is in LliureX"%app.get_id()) 145 143 lliurex_apps[app.get_id_filename()].subsume_full(app,appstream.AppSubsumeFlags.BOTH_WAYS) 146 144 store.remove_app(app) … … 150 148 #Remove add-on apps (as are included in the main packages) 151 149 if app.get_kind()==appstream.AppKind.ADDON: 152 self._debug("Removed addon "+str(app.get_pkgnames()))150 self._debug("Removed addon %s"%app.get_pkgnames()) 153 151 store.remove_app(app) 154 152 #Remove duplicated apps … … 157 155 if pkg in tmp_store_apps.keys(): 158 156 fn=app.get_id_no_prefix() 159 self._debug("Comparing "+fn+" with "+tmp_store_apps[pkg]['fn'])157 self._debug("Comparing %s with %s"%(fn,tmp_store_apps[pkg]['fn'])) 160 158 if fn != tmp_store_apps[pkg]['fn']: 161 159 if fn != pkg and ".desktop" not in fn: 162 self._debug("Removed duplicated "+app.get_id())160 self._debug("Removed duplicated %s"%app.get_id()) 163 161 store.remove_app(app) 164 162 else: 165 self._debug("Removed duplicated "+tmp_store_apps[pkg]['app'].get_id())163 self._debug("Removed duplicated %s"%tmp_store_apps[pkg]['app'].get_id()) 166 164 store.remove_app(tmp_store_apps[pkg]['app']) 167 165 tmp_store_apps.update({pkg:{'fn':app.get_id_no_prefix(),'app':app}}) … … 178 176 def _purge_zomandos(self,zmd_apps,store): 179 177 for zmd_id in zmd_apps: 180 self._debug("Searching debs related to "+zmd_id)178 self._debug("Searching debs related to %s"%zmd_id) 181 179 purge_list=store.get_apps_by_id(zmd_id) 182 180 purge_list.extend(store.get_apps_by_id(zmd_id+".desktop")) … … 184 182 if purge_app: 185 183 if not purge_app.has_category('Zomando'): 186 self._debug("Removed related zomando app "+str(purge_app.get_id()))184 self._debug("Removed related zomando app %s"%purge_app.get_id()) 187 185 store.remove_app(purge_app) 188 186 return(store) … … 222 220 store.remove_app(app) 223 221 else: 224 self._debug("App "+blacklist_app+" from blacklist not found in store. Assigned to RE blacklist")222 self._debug("App %s from blacklist not found in store. Assigned to RE blacklist"%blacklist_app) 225 223 blacklist_re.append("("+blacklist_app+")") 226 224 if blacklist_re: … … 231 229 if re_result: 232 230 store.remove_app(app) 233 self._debug("Removed "+str(app.get_id()) +" as matches with "+blacklist_app)231 self._debug("Removed %s as matches with %s"%(app.get_id(),blacklist_app)) 234 232 else: 235 233 self._debug('No blacklist to check') 236 234 except Exception as e: 237 self._debug("Error processing blacklist: "+str(e))235 self._debug("Error processing blacklist: %s"%e) 238 236 finally: 239 237 return(store)
Note: See TracChangeset
for help on using the changeset viewer.