This is a new debuginfo install script written in python, so it can use the yum python API and thus provide a better output AND can make yum to ignore the dead repositories...
how to test: just copy: abrt-action-install-debuginfo.py to /usr/libexec abrt_event.conf to /etc/abrt
remove the cache in /var/cache/abrt-di try to kill and "analyze" some C/C++ app
And then send some feedback :)
known problems (TODO): - ignores the debuginfo cache quota - doesn't trim the cache
Thank you, Jirka
A new version with cleaned output. I'd be happy if some can test it and send me some feedback.
Thanks, Jirka
On 11/24/2010 05:36 PM, Jiri Moskovcak wrote:
This is a new debuginfo install script written in python, so it can use the yum python API and thus provide a better output AND can make yum to ignore the dead repositories...
how to test: just copy: abrt-action-install-debuginfo.py to /usr/libexec abrt_event.conf to /etc/abrt
remove the cache in /var/cache/abrt-di try to kill and "analyze" some C/C++ app
And then send some feedback :)
known problems (TODO):
- ignores the debuginfo cache quota
- doesn't trim the cache
Thank you, Jirka
Crash-catcher mailing list Crash-catcher@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/crash-catcher
On Thu, 2010-11-25 at 12:09 +0100, Jiri Moskovcak wrote:
A new version with cleaned output. I'd be happy if some can test it and send me some feedback.
def unpack_rpm(package_nevra, files, tmp_dir, destdir, keeprpm): package_file_suffix = ".rpm" package_full_path = tmp_dir + "/" + package_nevra + package_file_suffix log1("Extracting %s to %s" % (package_full_path, destdir)) log2(files) print (_("Extracting cpio from %s") % (package_full_path)) unpacked_cpio_out = tmp_dir + "/unpacked.cpio" try: unpacked_cpio = open(unpacked_cpio_out, 'wb') except IOError, ex: print "Can't write to:", (unpacked_cpio_out,ex) return RETURN_FAILURE
This error is not checked where unpack_rpm() is called, in download() function. So it will happily continue. Which is probably wrong: if disk is full, we need to abort.
rpm2cpio = Popen(["rpm2cpio", package_full_path], stdout=unpacked_cpio, bufsize=-1) retcode = rpm2cpio.wait() if retcode == 0: log1("cpio written OK") else: unpacked_cpio.close() print (_("Can't extract package: %s") % package_full_path) return RETURN_FAILURE
You probably need to delete $tmp_dir/unpacked.cpio on error. (Unless you change caller to always delete $tmp_dir if unpack_rpm() returns RETURN_FAILURE.
On 11/25/2010 02:02 PM, Denys Vlasenko wrote:
On Thu, 2010-11-25 at 12:09 +0100, Jiri Moskovcak wrote:
A new version with cleaned output. I'd be happy if some can test it and send me some feedback.
def unpack_rpm(package_nevra, files, tmp_dir, destdir, keeprpm): package_file_suffix = ".rpm" package_full_path = tmp_dir + "/" + package_nevra + package_file_suffix log1("Extracting %s to %s" % (package_full_path, destdir)) log2(files) print (_("Extracting cpio from %s") % (package_full_path)) unpacked_cpio_out = tmp_dir + "/unpacked.cpio" try: unpacked_cpio = open(unpacked_cpio_out, 'wb') except IOError, ex: print "Can't write to:", (unpacked_cpio_out,ex) return RETURN_FAILURE
This error is not checked where unpack_rpm() is called, in download() function. So it will happily continue. Which is probably wrong: if disk is full, we need to abort.
ok, I made the caller to clean to clean the tmpdir and abort downloading on error
rpm2cpio = Popen(["rpm2cpio", package_full_path], stdout=unpacked_cpio, bufsize=-1) retcode = rpm2cpio.wait() if retcode == 0: log1("cpio written OK") else: unpacked_cpio.close() print (_("Can't extract package: %s") % package_full_path) return RETURN_FAILURE
You probably need to delete $tmp_dir/unpacked.cpio on error. (Unless you change caller to always delete $tmp_dir if unpack_rpm() returns RETURN_FAILURE.
moved unlink(cpio) before the RETURN so, it's removed in case of FAILURE and the directory is then removed by the caller..
On Thu, 2010-11-25 at 12:09 +0100, Jiri Moskovcak wrote:
A new version with cleaned output. I'd be happy if some can test it and send me some feedback.
This part is not needed anymore:
for bid in missing: print "MISSING:%s" % bid
gdb has been fixed to correctly show missing debuginfos in "info sharedlib" output.
On 11/25/2010 02:11 PM, Denys Vlasenko wrote:
On Thu, 2010-11-25 at 12:09 +0100, Jiri Moskovcak wrote:
A new version with cleaned output. I'd be happy if some can test it and send me some feedback.
This part is not needed anymore:
for bid in missing: print "MISSING:%s" % bid
gdb has been fixed to correctly show missing debuginfos in "info sharedlib" output.
ok, I turn it into log1("MISSING:...") so it can be used for debugging and remove the exit(RETURN_MISSING) part
A new version which fixes the following:
This part is not needed anymore:
for bid in missing: print "MISSING:%s" % bid
- changed to log1("MISSING...")
You probably need to delete $tmp_dir/unpacked.cpio on error. (Unless you change caller to always delete $tmp_dir if unpack_rpm() returns RETURN_FAILURE.
- unpack_rpm() return value is now checked from the caller and tmpdir is removed in case of error
+ added -y option to make it noninteractive answering "Yes" to all questions (as yum does...)
Please review, Jirka
crash-catcher@lists.fedorahosted.org