[gdb] [rhel5] Fix /etc/gdbinit compatibility with python-2.4.

Jan Kratochvil jankratochvil at fedoraproject.org
Wed Oct 30 11:54:30 UTC 2013


commit 25caf289cd204338308d8ed282e048be1dbfca76
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date:   Wed Oct 30 12:49:53 2013 +0100

    [rhel5] Fix /etc/gdbinit compatibility with python-2.4.

 gdb.spec |    5 ++++-
 gdbinit  |    5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gdb.spec b/gdb.spec
index 2aa7178..b46c835 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -38,7 +38,7 @@ Version: 7.6.50.%{snap}
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 12%{?dist}
+Release: 13%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
 Group: Development/Debuggers
@@ -1340,6 +1340,9 @@ fi
 %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
 
 %changelog
+* Wed Oct 30 2013 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.6.50.20130731-13.fc20
+- [rhel5] Fix /etc/gdbinit compatibility with python-2.4.
+
 * Mon Sep 30 2013 Sergio Durigan Junior <sergiodj at redhat.com> - 7.6.50.20130731-12.fc20
 - Fix the case when GDB leaks memory because value_struct_elt does not call
   check_typedef.  (Doug Evans, BZ 15695, filed as RH BZ 1013453).
diff --git a/gdbinit b/gdbinit
index 9f431dc..b59fb0d 100644
--- a/gdbinit
+++ b/gdbinit
@@ -1,8 +1,9 @@
 # System-wide GDB initialization file.
 python
 import glob
-for f in glob.iglob('%{_sysconfdir}/gdbinit.d/*.gdb'):
+# glob.iglob is not available in python-2.4 (RHEL-5).
+for f in glob.glob('%{_sysconfdir}/gdbinit.d/*.gdb'):
   gdb.execute('source %s' % f)
-for f in glob.iglob('%{_sysconfdir}/gdbinit.d/*.py'):
+for f in glob.glob('%{_sysconfdir}/gdbinit.d/*.py'):
   gdb.execute('source %s' % f)
 end


More information about the scm-commits mailing list