5 commits - cas cas-admin cas.spec lib/cas
by Adam Stokes
cas | 7 ++++---
cas-admin | 6 +++---
cas.spec | 5 +++--
lib/cas/util.py | 10 ++++------
4 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit a0bad9677dd7baf82d0da2334c6f0bd25b42d973
Merge: 5bfb83a... 40c88f6...
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 12:57:48 2009 -0500
stable 0.15 to master
Merge commit 'HEAD'; branch 'stable-0.15'
commit 40c88f6fc7aceccdee32352614d2b589f8a1ca26
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 12:56:47 2009 -0500
- status update helper
diff --git a/cas b/cas
index 9a19e1d..80bbe6d 100755
--- a/cas
+++ b/cas
@@ -35,7 +35,7 @@ from datetime import datetime
from cas.network import Download, Executor, CasNetworkException
from cas.core import CoreBase, CoreException
from cas.db import CasStorage, CasStorageException
-from cas.util import UtilBase, Logging
+from cas.util import UtilBase, Logging, genprint
from cas.rpmutils import RPMBase
if sys.version_info[:2] < (2,4):
@@ -144,12 +144,13 @@ class CasApplication(object):
self.rpmTool = RPMBase()
def _helper_compress(self, filename):
+ genprint('Compressing: %s ... please wait' % (filename,))
cbase = CoreBase()
try:
cbase.compressCore(os.path.abspath(self.opts.filename))
- raise SystemExit("File compressed: %s" % (filename,))
+ raise SystemExit(genprint("File compressed: %s" % (filename,)))
except CoreException, e:
- raise SystemExit(e)
+ raise SystemExit(genprint(e))
def parse_options(self, args):
# build option - arguement list in the form of
diff --git a/cas-admin b/cas-admin
index 9ea3ff3..fb7a9d0 100755
--- a/cas-admin
+++ b/cas-admin
@@ -23,7 +23,7 @@ import datetime
import paramiko
from cas.core import CoreBase
-from cas.util import UtilBase, Logging
+from cas.util import UtilBase, Logging, genprint
from cas.rpmutils import RPMBase
from cas.db import CasStorage, CasStorageException
@@ -78,7 +78,7 @@ class CasDatabaseHandler(object):
# create list of rpms from `cmd`
for line in pipe.stdout:
self.db.addDebuginfoRPM(line.strip())
- self.casLog.status("(found) %-5d kernel(s)" % (count,))
+ genprint("(found) %-5d kernel(s)" % (count,))
count = count + 1
# query database for debuginfo rpms
rpms = self.db.getAllDebuginfoRPM()
@@ -88,7 +88,7 @@ class CasDatabaseHandler(object):
if not os.path.isdir(dst):
os.makedirs(dst)
rpmTool = RPMBase()
- self.casLog.status("(extracting) %-50s" % (os.path.basename(rpm),))
+ genprint("(extracting) %-50s" % (os.path.basename(rpm),))
results = rpmTool.extract(rpm, dst)
# Sort through extracted debug for each type
# e.g. hugemem, PAE, smp, largesmp
diff --git a/cas.spec b/cas.spec
index b42adc8..96422c4 100644
--- a/cas.spec
+++ b/cas.spec
@@ -3,7 +3,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
Version: 0.15
-Release: 3%{?dist}
+Release: 5%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
@@ -49,7 +49,7 @@ rm -rf ${RPM_BUILD_ROOT}
%doc AUTHORS LICENSE README PKG-INFO doc/* contrib/*
%changelog
-* Wed Dec 9 2009 Adam Stokes <ajs at redhat dot com> - 0.15-2
+* Wed Dec 9 2009 Adam Stokes <ajs at redhat dot com> - 0.15-4
- Test for pbzip2 for utilizing multiple cores during decompression
- Increment python requirement to 2.4
- provide shutil, subprocess from 2.6 if on lower python version
diff --git a/lib/cas/util.py b/lib/cas/util.py
index 9c03539..31fd774 100644
--- a/lib/cas/util.py
+++ b/lib/cas/util.py
@@ -21,6 +21,10 @@ import cas.cas_shutil as shutil
from cas.cas_subprocess import Popen, PIPE, call
+def genprint(txt):
+ sys.stdout.write("[.cas.] :: %s\n" % (txt,))
+ sys.stdout.flush()
+
class Logging(object):
def __init__(self, dst, logger_id, debug_level='DEBUG'):
self.debug_level = debug_level
@@ -48,12 +52,6 @@ class Logging(object):
if self.debug_level == 'DEBUG':
self.log.debug("[.cas.][debug] :: %s" % (msg,))
- def status(self, msg):
- """ function to print status messages
- """
- sys.stdout.write("[.cas.] :: " + msg + "\r")
- sys.stdout.flush()
-
def info(self, msg):
""" function to print procedure
"""
commit 240b6564a187917c4c4320dfecb5ca2baf029231
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 10:46:59 2009 -0500
- remove calendar import
diff --git a/cas-admin b/cas-admin
index 2b68d47..9ea3ff3 100755
--- a/cas-admin
+++ b/cas-admin
@@ -20,7 +20,6 @@ import optparse
import sys
import urlparse
import datetime
-import calendar
import paramiko
from cas.core import CoreBase
commit b487969f22efe84f5e18a0b2b8ce5c44d99d0b1b
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Wed Dec 9 22:03:09 2009 -0500
tag stable 0.15 branch
diff --git a/cas.spec b/cas.spec
index 36366b4..b42adc8 100644
--- a/cas.spec
+++ b/cas.spec
@@ -54,6 +54,7 @@ rm -rf ${RPM_BUILD_ROOT}
- Increment python requirement to 2.4
- provide shutil, subprocess from 2.6 if on lower python version
- added helper function for compressing core files in proper format
+- tagged stable 0.15
* Thu Oct 15 2009 Adam Stokes <ajs at redhat dot com> - 0.15-1
- Require paramiko for all remote executions
commit fb8bfc85a70b727e14e9f81fed52a5206953c14f
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Wed Dec 9 22:00:15 2009 -0500
rel bump
diff --git a/cas.spec b/cas.spec
index 8c8c914..36366b4 100644
--- a/cas.spec
+++ b/cas.spec
@@ -3,7 +3,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
Version: 0.15
-Release: 2%{?dist}
+Release: 3%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
14 years, 4 months
Branch 'stable-0.15' - cas cas-admin cas.spec lib/cas
by Adam Stokes
cas | 7 ++++---
cas-admin | 6 +++---
cas.spec | 4 ++--
lib/cas/util.py | 10 ++++------
4 files changed, 13 insertions(+), 14 deletions(-)
New commits:
commit 40c88f6fc7aceccdee32352614d2b589f8a1ca26
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 12:56:47 2009 -0500
- status update helper
diff --git a/cas b/cas
index 9a19e1d..80bbe6d 100755
--- a/cas
+++ b/cas
@@ -35,7 +35,7 @@ from datetime import datetime
from cas.network import Download, Executor, CasNetworkException
from cas.core import CoreBase, CoreException
from cas.db import CasStorage, CasStorageException
-from cas.util import UtilBase, Logging
+from cas.util import UtilBase, Logging, genprint
from cas.rpmutils import RPMBase
if sys.version_info[:2] < (2,4):
@@ -144,12 +144,13 @@ class CasApplication(object):
self.rpmTool = RPMBase()
def _helper_compress(self, filename):
+ genprint('Compressing: %s ... please wait' % (filename,))
cbase = CoreBase()
try:
cbase.compressCore(os.path.abspath(self.opts.filename))
- raise SystemExit("File compressed: %s" % (filename,))
+ raise SystemExit(genprint("File compressed: %s" % (filename,)))
except CoreException, e:
- raise SystemExit(e)
+ raise SystemExit(genprint(e))
def parse_options(self, args):
# build option - arguement list in the form of
diff --git a/cas-admin b/cas-admin
index 9ea3ff3..fb7a9d0 100755
--- a/cas-admin
+++ b/cas-admin
@@ -23,7 +23,7 @@ import datetime
import paramiko
from cas.core import CoreBase
-from cas.util import UtilBase, Logging
+from cas.util import UtilBase, Logging, genprint
from cas.rpmutils import RPMBase
from cas.db import CasStorage, CasStorageException
@@ -78,7 +78,7 @@ class CasDatabaseHandler(object):
# create list of rpms from `cmd`
for line in pipe.stdout:
self.db.addDebuginfoRPM(line.strip())
- self.casLog.status("(found) %-5d kernel(s)" % (count,))
+ genprint("(found) %-5d kernel(s)" % (count,))
count = count + 1
# query database for debuginfo rpms
rpms = self.db.getAllDebuginfoRPM()
@@ -88,7 +88,7 @@ class CasDatabaseHandler(object):
if not os.path.isdir(dst):
os.makedirs(dst)
rpmTool = RPMBase()
- self.casLog.status("(extracting) %-50s" % (os.path.basename(rpm),))
+ genprint("(extracting) %-50s" % (os.path.basename(rpm),))
results = rpmTool.extract(rpm, dst)
# Sort through extracted debug for each type
# e.g. hugemem, PAE, smp, largesmp
diff --git a/cas.spec b/cas.spec
index b42adc8..96422c4 100644
--- a/cas.spec
+++ b/cas.spec
@@ -3,7 +3,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
Version: 0.15
-Release: 3%{?dist}
+Release: 5%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
@@ -49,7 +49,7 @@ rm -rf ${RPM_BUILD_ROOT}
%doc AUTHORS LICENSE README PKG-INFO doc/* contrib/*
%changelog
-* Wed Dec 9 2009 Adam Stokes <ajs at redhat dot com> - 0.15-2
+* Wed Dec 9 2009 Adam Stokes <ajs at redhat dot com> - 0.15-4
- Test for pbzip2 for utilizing multiple cores during decompression
- Increment python requirement to 2.4
- provide shutil, subprocess from 2.6 if on lower python version
diff --git a/lib/cas/util.py b/lib/cas/util.py
index 9c03539..31fd774 100644
--- a/lib/cas/util.py
+++ b/lib/cas/util.py
@@ -21,6 +21,10 @@ import cas.cas_shutil as shutil
from cas.cas_subprocess import Popen, PIPE, call
+def genprint(txt):
+ sys.stdout.write("[.cas.] :: %s\n" % (txt,))
+ sys.stdout.flush()
+
class Logging(object):
def __init__(self, dst, logger_id, debug_level='DEBUG'):
self.debug_level = debug_level
@@ -48,12 +52,6 @@ class Logging(object):
if self.debug_level == 'DEBUG':
self.log.debug("[.cas.][debug] :: %s" % (msg,))
- def status(self, msg):
- """ function to print status messages
- """
- sys.stdout.write("[.cas.] :: " + msg + "\r")
- sys.stdout.flush()
-
def info(self, msg):
""" function to print procedure
"""
14 years, 4 months
Branch 'stable-0.14' - cas-admin
by Adam Stokes
cas-admin | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit cf32bb5f1f60cfd74be4dd61036303eef50d3652
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 10:48:10 2009 -0500
- put note in for -L in find
diff --git a/cas-admin b/cas-admin
index 2e575d8..bbf0735 100755
--- a/cas-admin
+++ b/cas-admin
@@ -63,6 +63,8 @@ class CasDatabaseHandler(object):
# Uses emacs regex -- see `man find`
# TODO: rework kernel filtering to expand scope
# beyond just debuginfo rpms.
+ # XXX: RHEL4 version doesn't have -L option to follow
+ # symlink, please remove if running on previous distro.
cmd = ["find", "-L", KERNELS, "-iregex", RPMFILTER]
pipe = Popen(cmd, stdout=PIPE, stderr=PIPE)
# setup count for kernels found, mainly for console output
14 years, 4 months
Branch 'stable-0.15' - cas-admin
by Adam Stokes
cas-admin | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 240b6564a187917c4c4320dfecb5ca2baf029231
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 10:46:59 2009 -0500
- remove calendar import
diff --git a/cas-admin b/cas-admin
index 2b68d47..9ea3ff3 100755
--- a/cas-admin
+++ b/cas-admin
@@ -20,7 +20,6 @@ import optparse
import sys
import urlparse
import datetime
-import calendar
import paramiko
from cas.core import CoreBase
14 years, 4 months
cas-admin
by Adam Stokes
cas-admin | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 5bfb83afc885f88e78b3c5d223536ce918e7d235
Author: adam stokes <uzr(a)jak.rebo>
Date: Fri Dec 11 10:45:31 2009 -0500
- not using calendar import
diff --git a/cas-admin b/cas-admin
index 2b68d47..9ea3ff3 100755
--- a/cas-admin
+++ b/cas-admin
@@ -20,7 +20,6 @@ import optparse
import sys
import urlparse
import datetime
-import calendar
import paramiko
from cas.core import CoreBase
14 years, 4 months
Branch 'stable-0.15' - cas.spec
by Adam Stokes
cas.spec | 1 +
1 file changed, 1 insertion(+)
New commits:
commit b487969f22efe84f5e18a0b2b8ce5c44d99d0b1b
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Wed Dec 9 22:03:09 2009 -0500
tag stable 0.15 branch
diff --git a/cas.spec b/cas.spec
index 36366b4..b42adc8 100644
--- a/cas.spec
+++ b/cas.spec
@@ -54,6 +54,7 @@ rm -rf ${RPM_BUILD_ROOT}
- Increment python requirement to 2.4
- provide shutil, subprocess from 2.6 if on lower python version
- added helper function for compressing core files in proper format
+- tagged stable 0.15
* Thu Oct 15 2009 Adam Stokes <ajs at redhat dot com> - 0.15-1
- Require paramiko for all remote executions
14 years, 4 months
Branch 'stable-0.15' - cas.spec
by Adam Stokes
cas.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit fb8bfc85a70b727e14e9f81fed52a5206953c14f
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Wed Dec 9 22:00:15 2009 -0500
rel bump
diff --git a/cas.spec b/cas.spec
index 8c8c914..36366b4 100644
--- a/cas.spec
+++ b/cas.spec
@@ -3,7 +3,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
Version: 0.15
-Release: 2%{?dist}
+Release: 3%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
14 years, 4 months
cas
by Adam Stokes
cas | 1 +
1 file changed, 1 insertion(+)
New commits:
commit c27afb2573316e3a9defc51564fa424d53865bfc
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Wed Dec 9 21:30:49 2009 -0500
- exit cleanly on compressing file
diff --git a/cas b/cas
index 5e0882f..9a19e1d 100755
--- a/cas
+++ b/cas
@@ -147,6 +147,7 @@ class CasApplication(object):
cbase = CoreBase()
try:
cbase.compressCore(os.path.abspath(self.opts.filename))
+ raise SystemExit("File compressed: %s" % (filename,))
except CoreException, e:
raise SystemExit(e)
14 years, 4 months
lib/cas
by Adam Stokes
lib/cas/network.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 4d6d9b6e15dd083381ab24ac78df9ad1156fbaa6
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Wed Dec 9 21:27:54 2009 -0500
- modifications to ssh execution
diff --git a/lib/cas/network.py b/lib/cas/network.py
index 4de5e39..ad71e1e 100644
--- a/lib/cas/network.py
+++ b/lib/cas/network.py
@@ -107,11 +107,11 @@ class Executor(object):
pass
# grab rsa/dss key
- if self.key_type = 'dss':
+ if self.key_type == 'dss':
priv_key = paramiko.DSSKey.from_private_key_file(os.path.expanduser("~/.ssh/id_dsa"))
transport.auth_publickey(self.username, priv_key)
- elif self.key_type = 'rsa':
- priv_key = paramiko.RSAKey.from_private_key_file(os.path.expanduser("~/.ssh/id_dsa"))
+ elif self.key_type == 'rsa':
+ priv_key = paramiko.RSAKey.from_private_key_file(os.path.expanduser("~/.ssh/id_rsa"))
transport.auth_publickey(self.username, priv_key)
else:
raise CasNetworkException("Unable to determine key file")
14 years, 4 months