Changeset 2430
- Timestamp:
- Sep 15, 2016, 8:46:10 AM (5 years ago)
- Location:
- lliurex-desktops-keeper/trunk/fuentes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-desktops-keeper/trunk/fuentes/debian/prerm
r2391 r2430 21 21 remove) 22 22 lliurex-desktops-db PURGE 23 lliurex-desktops-db SHOW 23 24 update-desktop-database /usr/share/applications/ >/dev/null 2>/dev/null || true 24 25 update-mime >/dev/null 2>/dev/null || true -
lliurex-desktops-keeper/trunk/fuentes/install/usr/sbin/lliurex-desktops-db
r2421 r2430 154 154 todel.append(tmp[len(tmp)-1]) 155 155 156 156 157 157 158 for file in todel: 158 159 if os.path.exists(destination_path+file+".diverted"): … … 166 167 #print "* Removing db file" 167 168 os.remove(diversion_db) 168 169 169 170 171 172 # hide command 170 173 def hide(path): 171 174 global db_hide … … 183 186 184 187 if os.path.exists(xfile): 185 print "True"188 186 189 must_save=True 187 print xfile188 190 db_hide.append(xfile) 189 printsubprocess.call(["dpkg-divert","--package","lliurex-desktops-keeper","--rename","--quiet","--add", "--divert",str(xfile+".diverted"),str(xfile)])191 subprocess.call(["dpkg-divert","--package","lliurex-desktops-keeper","--rename","--quiet","--add", "--divert",str(xfile+".diverted"),str(xfile)]) 190 192 191 193 if must_save: … … 199 201 hide_desktop_file.close() 200 202 203 #show command 204 def show(): 205 global db_hide 206 207 initdb_hide() 208 209 toshow=[] 210 211 for c in db_hide: 212 tmp=c.strip() 213 toshow.append(tmp) 214 215 for line in toshow: 216 xfile=line.strip() 217 if os.path.exists(line+".diverted"): 218 subprocess.call(["dpkg-divert","--package","lliurex-desktops-keeper","--rename","--quiet","--remove",str(line)]) 219 220 #print "* Removing db file" 221 os.remove(diversion_db_hide) 222 223 201 224 def initdb(): 202 225 global db … … 266 289 hide(path) 267 290 291 if order=="SHOW": 292 show() 293 268 294 exit(0) 269 295
Note: See TracChangeset
for help on using the changeset viewer.