[yum-commits] Branch 'yum-3_2_X' - 6 commits - yum/misc.py
skvidal at osuosl.org
skvidal at osuosl.org
Tue Dec 22 05:22:50 UTC 2009
yum/misc.py | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
New commits:
commit 21b9162fce00041f18449fb1057084067015a250
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Mon Dec 21 17:38:12 2009 -0500
as ville suggested for python 3.0 compat
diff --git a/yum/misc.py b/yum/misc.py
index 6c76dd1..78c7950 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -896,7 +896,7 @@ def get_open_files(pid):
except (IOError, OSError), e:
return files
- for line in maps.xreadlines():
+ for line in maps:
if line.find('fd:') == -1:
continue
line = line.replace('\n', '')
commit a97da4cd5ce078cdca82b8c80f360a842282674d
Merge: 85565b0... 6a27418...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Mon Dec 21 13:19:04 2009 -0500
Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
* 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
Add bash completion for the check command.
Fix tuple typo, stupid language syntax
Add check command, like smart/apt
Call rpmdb.check_*() directly, now that we can instead of asking the
Remove unnecessary 'Finished Transaction Test' from CLI output.
l10n: Initial commit of Finnish translation
Fix accidental revert in 0a2be676, which I was using to test
Fix moved code typo, dups => deps for deps :)
Do rpmdb checks when we have no history
Use showdups for obsoletes, so "list obsoletes" is sane for RHEL like repos
Create a _rpmdb_warn_checks function, and use that when we find an
Add check_*() APIs to rpmdb, for when version doesn't match etc.
commit 85565b0f77838e0b56afe40df3fa88e1982acad5
Merge: 74f17bb... 7cdcde9...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Dec 11 15:28:34 2009 -0500
Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
* 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
Move default urlgrabber options into _default_grabopts(), apply them
commit 74f17bbb09373a4157e7ef527f250443cbd52046
Merge: caf6d25... dcec113...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Dec 10 16:18:41 2009 -0500
Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
* 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
Tell git to ignore Pydev project files.
commit caf6d2588e1bb8bce1a0eb2d7ca0f628d44d1a94
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Dec 10 15:55:09 2009 -0500
use xreadlines() not readline()
diff --git a/yum/misc.py b/yum/misc.py
index 98e25ff..6c76dd1 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -896,7 +896,7 @@ def get_open_files(pid):
except (IOError, OSError), e:
return files
- for line in maps.readline():
+ for line in maps.xreadlines():
if line.find('fd:') == -1:
continue
line = line.replace('\n', '')
commit d9a65d77ab756e148737e1637a5302aaac35c7a8
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Dec 10 14:53:01 2009 -0500
get cmdline and parse out files on it to look for other items running
this handles pygtk and lots of python apps, too
diff --git a/yum/misc.py b/yum/misc.py
index a436b6b..98e25ff 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -890,13 +890,13 @@ def return_running_pids():
def get_open_files(pid):
"""returns files open from this pid"""
files = []
- smaps = '/proc/%s/maps' % pid
+ maps_f = '/proc/%s/maps' % pid
try:
- maps = open(smaps, 'r')
+ maps = open(maps_f, 'r')
except (IOError, OSError), e:
return files
- for line in maps.readlines():
+ for line in maps.readline():
if line.find('fd:') == -1:
continue
line = line.replace('\n', '')
@@ -906,4 +906,18 @@ def get_open_files(pid):
filename = filename.strip()
if filename not in files:
files.append(filename)
+
+ cli_f = '/proc/%s/cmdline' % pid
+ try:
+ cli = open(cli_f, 'r')
+ except (IOError, OSError), e:
+ return files
+
+ cmdline = cli.read()
+ if cmdline.find('\00') != -1:
+ cmds = cmdline.split('\00')
+ for i in cmds:
+ if i.startswith('/'):
+ files.append(i)
+
return files
More information about the Yum-commits
mailing list