Codebase list debian-goodies / ee0d378
Instead of skipping packages that are ignored (which leads checkrestart to output information in lines without any content in systemd systems), just remove the packages from the package dictionary so that they will never be processed again. Javier Fernandez-Sanguino 9 years ago
1 changed file(s) with 8 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
207207 # Close the pipe
208208 dpkgProc.stdout.close()
209209
210 # Remove the ignored packages from the list of packages
211 if ignorelist:
212 for i in ignorelist:
213 try:
214 del packages[i]
215 except KeyError:
216 continue
217
210218 print "(%d distinct packages)" % len(packages)
211219
212220 if len(packages) == 0:
215223 sys.exit(0)
216224
217225 for package in packages.values():
218 skip = False
219 if ignorelist:
220 for i in ignorelist:
221 if i == package.name:
222 skip = True
223 if skip:
224 continue
225226 dpkgQuery = ["dpkg-query", "--listfiles", package.name]
226227 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
227228 env = lc_all_c_env)
297298 # TODO - consider putting this in a --verbose option
298299 print "These processes (%d) do not seem to have an associated init script to restart them:" %len(nonrestartable)
299300 for package in nonrestartable:
300 skip = False
301 if ignorelist:
302 for i in ignorelist:
303 if i == package.name:
304 skip = True
305 if skip:
306 continue
307301 print package.name + ':'
308302 for process in package.processes:
309303 print "\t%s\t%s" % (process.pid,process.program)