Mailinglist Archive: opensuse-commit (561 mails)

< Previous Next >
commit qt-creator for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 28 Jun 2010 12:14:31 +0200
  • Message-id: <20100628101431.8F9C4201F4@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package qt-creator for openSUSE:Factory
checked in at Mon Jun 28 12:14:31 CEST 2010.



--------
--- KDE/qt-creator/qt-creator.changes 2010-01-26 10:57:16.000000000 +0100
+++ /mounts/work_src_done/STABLE/qt-creator/qt-creator.changes 2010-06-21
13:49:25.000000000 +0200
@@ -1,0 +2,5 @@
+Mon Jun 21 13:04:54 CEST 2010 - dmueller@xxxxxxx
+
+- fix gdb version checks (bnc#615361)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
robust-gdb-version-parsing.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qt-creator.spec ++++++
--- /var/tmp/diff_new_pack.1l2Rip/_old 2010-06-28 12:13:08.000000000 +0200
+++ /var/tmp/diff_new_pack.1l2Rip/_new 2010-06-28 12:13:08.000000000 +0200
@@ -25,11 +25,12 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.qtsoftware.com/developer/qt-creator/
Version: 1.3.1
-Release: 1
+Release: 2
%define rversion %version
Source: %name-%rversion-src.tar.bz2
Source1: qtcreator.desktop
Source99: %name-rpmlintrc
+Patch1: robust-gdb-version-parsing.patch

#########################################################################################
# SuSE, openSUSE

#########################################################################################
@@ -61,6 +62,7 @@

%prep
%setup -q -n %name-%rversion-src
+%patch1

%build
%if "%{_lib}"=="lib64"

++++++ robust-gdb-version-parsing.patch ++++++
--- src/plugins/debugger/gdb/gdbengine.cpp
+++ src/plugins/debugger/gdb/gdbengine.cpp
@@ -1389,45 +1389,22 @@

void GdbEngine::handleShowVersion(const GdbResponse &response)
{
- //qDebug () << "VERSION 2:" <<
response.data.findChild("consolestreamoutput").data();
- //qDebug () << "VERSION:" << response.toString();
- debugMessage(_("VERSION: " + response.toString()));
+ debugMessage(_("PARSING VERSION: " + response.toString()));
if (response.resultClass == GdbResultDone) {
m_gdbVersion = 100;
m_gdbBuildVersion = -1;
m_isMacGdb = false;
- QString msg =
QString::fromLocal8Bit(response.data.findChild("consolestreamoutput").data());
- QRegExp supported(_("GNU gdb(.*)
(\\d+)\\.(\\d+)(\\.(\\d+))?(-(\\d+))?"));
- if (supported.indexIn(msg) == -1) {
+ GdbMi version = response.data.findChild("consolestreamoutput");
+ QString msg = QString::fromLocal8Bit(version.data());
+ extractGdbVersion(msg,
+ &m_gdbVersion, &m_gdbBuildVersion, &m_isMacGdb);
+ if (m_gdbVersion > 60500 && m_gdbVersion < 200000)
+ debugMessage(_("SUPPORTED GDB VERSION ") + msg);
+ else
debugMessage(_("UNSUPPORTED GDB VERSION ") + msg);
-#if 0
- QStringList list = msg.split(_c('\n'));
- while (list.size() > 2)
- list.removeLast();
- msg = tr("The debugger you are using identifies itself as:")
- + _("<p><p>") + list.join(_("<br>")) + _("<p><p>")
- + tr("This version is not officially supported by Qt
Creator.\n"
- "Debugging will most likely not work well.\n"
- "Using gdb 6.7 or later is strongly recommended.");
-#if 0
- // ugly, but 'Show again' check box...
- static QErrorMessage *err = new QErrorMessage(mainWindow());
- err->setMinimumSize(400, 300);
- err->showMessage(msg);
-#else
- //showMessageBox(QMessageBox::Information, tr("Warning"), msg);
-#endif
-#endif
- } else {
- m_gdbVersion = 10000 * supported.cap(2).toInt()
- + 100 * supported.cap(3).toInt()
- + 1 * supported.cap(5).toInt();
- m_gdbBuildVersion = supported.cap(7).toInt();
- m_isMacGdb = msg.contains(__("Apple version"));
- debugMessage(_("GDB VERSION: %1, BUILD: %2%3").arg(m_gdbVersion)
- .arg(m_gdbBuildVersion).arg(_(m_isMacGdb ? " (APPLE)" : "")));
- }
- //qDebug () << "VERSION 3:" << m_gdbVersion << m_gdbBuildVersion;
+
+ debugMessage(_("USING GDB VERSION: %1, BUILD: %2%3").arg(m_gdbVersion)
+ .arg(m_gdbBuildVersion).arg(_(m_isMacGdb ? " (APPLE)" : "")));
}
}

--- src/plugins/debugger/gdb/gdbmi.cpp
+++ src/plugins/debugger/gdb/gdbmi.cpp
@@ -32,6 +32,7 @@
#include <utils/qtcassert.h>

#include <QtCore/QByteArray>
+#include <QtCore/QRegExp>
#include <QtCore/QTextStream>

#include <ctype.h>
@@ -387,5 +388,50 @@
return result;
}

+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// GdbResponse
+//
+//////////////////////////////////////////////////////////////////////////////////
+
+void extractGdbVersion(const QString &msg,
+ int *gdbVersion, int *gdbBuildVersion, bool *isMacGdb)
+{
+ const QChar dot(QLatin1Char('.'));
+
+ QString cleaned;
+ QString build;
+ bool inClean = true;
+ foreach (QChar c, msg) {
+ if (inClean && !cleaned.isEmpty() && c != dot && (c.isPunct() ||
c.isSpace()))
+ inClean = false;
+ if (inClean) {
+ if (c.isDigit())
+ cleaned.append(c);
+ else if (!cleaned.isEmpty() && !cleaned.endsWith(dot))
+ cleaned.append(dot);
+ } else {
+ if (c.isDigit())
+ build.append(c);
+ else if (!build.isEmpty() && !build.endsWith(dot))
+ build.append(dot);
+ }
+ }
+
+ *isMacGdb = msg.contains(QLatin1String("Apple version"));
+
+ *gdbVersion = 10000 * cleaned.section(dot, 0, 0).toInt()
+ + 100 * cleaned.section(dot, 1, 1).toInt()
+ + 1 * cleaned.section(dot, 2, 2).toInt();
+ if (cleaned.count(dot) >= 3)
+ *gdbBuildVersion = cleaned.section(dot, 3, 3).toInt();
+ else
+ *gdbBuildVersion = build.section(dot, 0, 0).toInt();
+
+ if (*isMacGdb)
+ *gdbBuildVersion = build.section(dot, 1, 1).toInt();
+}
+
} // namespace Internal
} // namespace Debugger
--- src/plugins/debugger/gdb/gdbmi.h
+++ src/plugins/debugger/gdb/gdbmi.h
@@ -168,6 +168,9 @@
QVariant cookie;
};

+void extractGdbVersion(const QString &msg,
+ int *gdbVersion, int *gdbBuildVersion, bool *isMacGdb);
+
} // namespace Internal
} // namespace Debugger


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages