Package list debian-goodies / fbdfeb5
Imported Debian version 0.51 Javier Fernandez-Sanguino 9 years ago
2 changed file(s) with 39 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
126126 print "Process %s (PID: %d) " % (process.program, process.pid)
127127 process.listDeleted()
128128
129 lc_all_c_env = os.environ
130 lc_all_c_env['LC_ALL'] = 'C'
129131
130132 packages = {}
131133 diverted = None
132 dpkgQuery = ["dpkg", "--search"] + programs.keys()
133 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=None)
134 dpkgQuery = ["dpkg-query", "--search"] + programs.keys()
135 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=None,
136 env = lc_all_c_env)
134137 for line in dpkgProc.stdout.readlines():
135138 if line.startswith('local diversion'):
136139 continue
145148 packagename, program = m.group(1), diverted
146149 else:
147150 packagename, program = line[:-1].split(': ')
151 if program == diverted:
152 # dpkg prints a summary line after the diversion, name both
153 # packages of the diversion, so ignore this line
154 # mutt-patched, mutt: /usr/bin/mutt
155 continue
148156
149157 packages.setdefault(packagename,Package(packagename))
150158 packages[packagename].processes.extend(programs[program])
159167 for package in packages.values():
160168 if package == 'util-linux':
161169 continue
162 dpkgQuery = ["dpkg", "--listfiles", package.name]
170 dpkgQuery = ["dpkg-query", "--listfiles", package.name]
163171 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=None)
164172 for line in dpkgProc.stdout.readlines():
165173 path = line[:-1]
259267 # Or about files under /tmp
260268 if f.startswith('/tmp/'):
261269 return 0
270 # Or about files under /var/tmp
271 if f.startswith('/var/tmp/'):
272 return 0
262273 # Or /dev/zero
263274 if f.startswith('/dev/zero'):
264275 return 0
271282 # Skip automatically generated files
272283 if f.endswith('icon-theme.cache'):
273284 return 0
274 # Skip mutt files
275 if re.compile("/tmp/mutt-\w+-[\-0-9]").search(f):
276 return 0
277285 # Skip font files
278286 if f.startswith('/var/cache/fontconfig/'):
279287 return 0
280288 # Skip, if asked to, files that do not belong to any package
281289 if onlyPackageFiles:
282 dpkgQuery = ["dpkg", "--search", f]
290 dpkgQuery = ["dpkg-query", "--search", f]
283291 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=None)
284292 for line in dpkgProc.stdout.readlines():
285293 if line.endswith(f):
379387 self.files = []
380388 self.descriptors = []
381389 self.links = []
390 self.program = ''
382391
383392 try:
384 self.program = self.cleanFile(os.readlink('/proc/%d/exe' % self.pid))
393 self.program = os.readlink('/proc/%d/exe' % self.pid)
385394 except OSError, e:
386395 if e.errno != 2:
387396 raise
397 self.program = self.cleanFile(self.program)
388398
389399 def cleanFile(self, f):
390400 # /proc/pid/exe has all kinds of junk in it sometimes
0 debian-goodies (0.51) unstable; urgency=low
1
2 * Include patch from Jiri Palecek that makes checkrestart work
3 with processes that lack a proper link /proc/$PID/exe. This seems to happen
4 with UML processes and confused the program. (Closes: 522850)
5 * Include patches provided by Joerg Sommer for checkrestart:
6 (Closes: 511537)
7 - Set locale to POSIX ('C') since the output of dpkg is localized and
8 localisations makes the match for diversions fail.
9 - Skip the last output line from diversions since it is a summary
10 listing packages that are part of a diversion.
11 - Use dpkg-query instead of dpkg since dpkg-query is the generic interface
12 for querying the dpkg database is dpkg-query, and dpkg is only a
13 wrapper for it.
14 - Removed useless check in the isdeletedFile function that covers
15 mutt in /tmp since there is already a match for /tmp
16 * checkrestart: don't complain about processes that have deleted files
17 in /var/tmp
18
19 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Sat, 02 May 2009 17:53:57 +0200
20
021 debian-goodies (0.50) unstable; urgency=low
122
223 * Use patch provided by Thadeu Lima de Souza Cascardo to: