[SCM] Repository for the KDE Debconf access library. branch, master, updated. debian/0.2-2-20-ga401447
Matthias Klumpp
ximion-guest at alioth.debian.org
Mon Jul 15 01:22:37 UTC 2013
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/debconf-kde.git;a=commitdiff;h=a401447
The following commit has been merged in the master branch:
commit a40144701355adcb65ed313ed9a46ac3f3f1279b
Merge: 9d879d0a7adc66fbd69719c7174e264a81fd0ca3 72d0ec77a342143588cd7af3efa3371b7c080e45
Author: Matthias Klumpp <matthias at tenstral.net>
Date: Mon Jul 15 03:22:16 2013 +0200
Merge tag 'upstream/0.3'
Upstream version 0.3
Conflicts:
po/CMakeLists.txt
po/fi/libdebconf-kde.po
po/ro/libdebconf-kde.po
po/tr/libdebconf-kde.po
src/debconf.cpp
src/debconf.h
CMakeLists.txt | 4 +-
Changelog | 19 +++++
README | 35 ++++++++
TODO | 18 ++++
po/CMakeLists.txt | 49 +++++++++++
po/ca/libdebconf-kde.po | 2 +-
po/ca at valencia/libdebconf-kde.po | 2 +-
po/es/libdebconf-kde.po | 2 +-
po/fi/libdebconf-kde.po | 89 ++++++++++++++++++++
po/gl/CMakeLists.txt | 2 +
po/{zh_CN => gl}/libdebconf-kde.po | 115 +++++++++++++-------------
po/mr/CMakeLists.txt | 2 +
po/mr/libdebconf-kde.po | 86 +++++++++++++++++++
po/ro/libdebconf-kde.po | 28 ++++++-
po/tr/libdebconf-kde.po | 7 ++
src/debconf.cpp | 160 +++++++++++++++++++++++++++++++++++-
src/debconf.h | 13 +++
tools/main.cpp | 2 +-
18 files changed, 564 insertions(+), 71 deletions(-)
diff --cc po/es/libdebconf-kde.po
index cdc3a59,e3e8f59..ddfbc2e
--- a/po/es/libdebconf-kde.po
+++ b/po/es/libdebconf-kde.po
@@@ -4,9 -4,9 +4,9 @@@
# Kira J. Fernandez <kirajfdez at gmail.com>, 2010, 2011.
msgid ""
msgstr ""
- "Project-Id-Version:
"
+ "Project-Id-Version: libdebconf
"
"Report-Msgid-Bugs-To: http://bugs.kde.org
"
-"POT-Creation-Date: 2012-10-24 04:13+0200
"
+"POT-Creation-Date: 2011-08-02 05:05+0200
"
"PO-Revision-Date: 2011-07-10 12:16+0200
"
"Last-Translator: Kira J. Fernandez <kirajfdez at gmail.com>
"
"Language-Team: Spanish <kde-l10n-es at kde.org>
"
diff --cc po/ro/libdebconf-kde.po
index e9af832,ce7b871..a94fede
--- a/po/ro/libdebconf-kde.po
+++ b/po/ro/libdebconf-kde.po
@@@ -6,8 -6,8 +6,13 @@@ msgid "
msgstr ""
"Project-Id-Version:
"
"Report-Msgid-Bugs-To: http://bugs.kde.org
"
++<<<<<<< HEAD
+"POT-Creation-Date: 2011-08-02 05:05+0200
"
+"PO-Revision-Date: 2011-01-14 11:13+0200
"
++=======
+ "POT-Creation-Date: 2012-10-24 04:13+0200
"
+ "PO-Revision-Date: 2012-12-26 13:29+0200
"
++>>>>>>> upstream/0.3
"Last-Translator: Sergiu Bivol <sergiu at ase.md>
"
"Language-Team: Romanian <kde-i18n-ro at kde.org>
"
"Language: ro
"
@@@ -90,8 -65,23 +95,27 @@@ msgstr "Renunță
msgid "Back"
msgstr "Înapoi"
+#. i18n: file: src/DebconfGui.ui:100
#. i18n: ectx: property (text), widget (KPushButton, nextPB)
-#: src/DebconfGui.ui:100
+#: rc.cpp:23
msgid "Continue"
msgstr "Continuă"
++<<<<<<< HEAD
++=======
+
+ #: tools/main.cpp:38
+ msgid "Debconf KDE"
+ msgstr "Debconf KDE"
+
+ #: tools/main.cpp:40
+ msgid "Debconf frontend for KDE"
+ msgstr "Interfață Debconf pentru KDE"
+
+ #: tools/main.cpp:46
+ msgid "Path to where the socket should be created"
+ msgstr "Calea la care să fie creat soclul"
+
+ #: tools/main.cpp:47
+ msgid "FIFO file descriptors for communication with Debconf"
-msgstr "Descriptori de fișiere FIFO pentru comunicarea cu Debconf"
++msgstr "Descriptori de fișiere FIFO pentru comunicarea cu Debconf"
++>>>>>>> upstream/0.3
diff --cc po/tr/libdebconf-kde.po
index 93507cd,578cf3e..2be6d0d
--- a/po/tr/libdebconf-kde.po
+++ b/po/tr/libdebconf-kde.po
@@@ -7,10 -6,10 +7,17 @@@ msgid "
msgstr ""
"Project-Id-Version: 1.0
"
"Report-Msgid-Bugs-To: http://bugs.kde.org
"
++<<<<<<< HEAD
+"POT-Creation-Date: 2011-08-02 05:05+0200
"
+"PO-Revision-Date: 2011-01-11 12:18+0200
"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>
"
+"Language-Team: Turkish <kde-i18n-doc at kde.org>
"
++=======
+ "POT-Creation-Date: 2012-10-24 04:13+0200
"
+ "PO-Revision-Date: 2012-06-28 08:28+0300
"
+ "Last-Translator: Serdar Soytetir <tulliana at gmail.com>
"
+ "Language-Team: Turkish <kde-l10n-tr at kde.org>
"
++>>>>>>> upstream/0.3
"Language: tr
"
"MIME-Version: 1.0
"
"Content-Type: text/plain; charset=UTF-8
"
diff --cc src/debconf.cpp
index 9b7e7c1,20ecaa8..f2e9028
--- a/src/debconf.cpp
+++ b/src/debconf.cpp
@@@ -74,6 -74,14 +74,17 @@@ const DebconfFrontend::Cmd DebconfFront
{ "CAPB", &DebconfFrontend::cmd_capb },
{ "PROGRESS", &DebconfFrontend::cmd_progress },
{ "X_PING", &DebconfFrontend::cmd_x_ping },
++<<<<<<< HEAD
++=======
+ { "VERSION", &DebconfFrontend::cmd_version },
+ { "X_LOADTEMPLATEFILE", &DebconfFrontend::cmd_x_loadtemplatefile },
+ { "INFO", &DebconfFrontend::cmd_info },
+ { "FGET", &DebconfFrontend::cmd_fget },
+ { "FSET", &DebconfFrontend::cmd_fset },
+ { "BEGINBLOCK", &DebconfFrontend::cmd_beginblock },
+ { "ENDBLOCK", &DebconfFrontend::cmd_endblock },
+ { "STOP", &DebconfFrontend::cmd_stop },
++>>>>>>> upstream/0.3
{ 0, 0 } };
DebconfFrontend::DebconfFrontend(QObject *parent)
@@@ -155,9 -164,11 +167,15 @@@ QString DebconfFrontend::substitute(con
{
Substitutions sub = m_subst[key];
QString result, var, escape;
- QRegExp rx(QLatin1String( "^(.*)(\\)?\$\{([^\{\}]+)\}(.*)$" ));
+ QRegExp rx(QLatin1String( "^(.*?)(\\)?\$\{([^{}]+)\}(.*)$" ));
QString last(rest);
++<<<<<<< HEAD
+ while (rx.indexIn(rest) != -1) {
++=======
+ int pos = 0;
+ while ( (pos = rx.indexIn(rest, pos)) != -1) {
+ kDebug() << "var found! at" << pos;
++>>>>>>> upstream/0.3
result += rx.cap(1);
escape = rx.cap(2);
var = rx.cap(3);
@@@ -286,6 -298,141 +304,144 @@@ void DebconfFrontend::cmd_x_ping(const
say(QLatin1String( "0 pong" ));
}
++<<<<<<< HEAD
++=======
+ void DebconfFrontend::cmd_version(const QString ¶m)
+ {
+ if ( !param.isEmpty() ) {
+ QString major_version_str = param.section(QLatin1Char( '.' ), 0, 0);
+ bool ok = false;
+ int major_version = major_version_str.toInt( &ok );
+ if ( !ok || (major_version != 2) ) {
+ say(QLatin1String( "30 wrong or too old protocol version" ));
+ return;
+ }
+ }
+ //This debconf frontend is suposed to use the version 2.1 of the protocol.
+ say(QLatin1String( "0 2.1" ));
+ }
+
+ void DebconfFrontend::cmd_x_loadtemplatefile(const QString ¶m)
+ {
+ QFile template_file(param);
+ if (template_file.open(QFile::ReadOnly)) {
+ QTextStream template_stream(&template_file);
+ QString line = QLatin1String("");
+ int linecount = 0;
+ QHash <QString,QString> field_short_value;
+ QHash <QString,QString> field_long_value;
+ QString last_field_name;
+ while ( !line.isNull() ) {
+ ++linecount;
+ line = template_stream.readLine();
+ kDebug() << linecount << line;
+ if ( line.isEmpty() ) {
+ if (!last_field_name.isEmpty()) {
+ //Submit last block values.
+ kDebug() << "submit" << last_field_name;
+ QString item = field_short_value[QLatin1String("template")];
+ QString type = field_short_value[QLatin1String("type")];
+ QString short_description = field_short_value[QLatin1String("description")];
+ QString long_description = field_long_value[QLatin1String("description")];
+
+ m_data[item][DebconfFrontend::Type] = type;
+ m_data[item][DebconfFrontend::Description] = short_description;
+ m_data[item][DebconfFrontend::ExtendedDescription] = long_description;
+
+ //Clear data.
+ field_short_value.clear();
+ field_long_value.clear();
+ last_field_name.clear();
+ }
+ } else {
+ if (!line.startsWith(QLatin1Char(' '))) {
+ last_field_name = line.section(QLatin1String(": "), 0, 0).toLower();
+ field_short_value[last_field_name] = line.section(QLatin1String(": "), 1);
+ } else {
+ if ( field_long_value[last_field_name].isEmpty() ){
+ field_long_value[last_field_name] = line.remove(0, 1);
+ } else {
+ field_long_value[last_field_name].append(QLatin1Char('
'));
+ if ( !(line.trimmed() == QLatin1String(".")) ) {
+ field_long_value[last_field_name].append(line.remove(0, 1));
+ }
+ }
+ }
+ }
+ }
+ } else {
+ say(QLatin1String( "30 couldn't open file" ));
+ return;
+ }
+ say(QLatin1String( "0 ok" ));
+ }
+
+ void DebconfFrontend::cmd_info(const QString ¶m)
+ {
+ Q_UNUSED(param)
+ //FIXME: this is a dummy command, we should actually do something
+ //with param.
+ say(QLatin1String( "0 ok" ));
+ }
+
+ void DebconfFrontend::cmd_fget(const QString ¶m)
+ {
+ // We get strings like
+ // foo/bar seen false
+ // question = "foo/bar"
+ // flag = "seen"
+ QString question = param.section(QLatin1Char( ' ' ), 0, 0);
+ QString flag = param.section(QLatin1Char( ' ' ), 1, 1);
+
+ if (m_flags[question][flag]) {
+ say( QLatin1String("0 true") );
+ } else {
+ say( QLatin1String("0 false") );
+ }
+ }
+
+ void DebconfFrontend::cmd_fset(const QString ¶m)
+ {
+ // We get strings like
+ // foo/bar seen false
+ // question = "foo/bar"
+ // flag = "seen"
+ // value = "false"
+ QString question = param.section(QLatin1Char( ' ' ), 0, 0);
+ QString flag = param.section(QLatin1Char( ' ' ), 1, 1);
+ QString value = param.section(QLatin1Char( ' ' ), 2, 2);
+
+ if ( value == QLatin1String("false") ) {
+ m_flags[question][flag] = false;
+ } else {
+ m_flags[question][flag] = true;
+ }
+ say(QLatin1String( "0 ok" ));
+ }
+
+ void DebconfFrontend::cmd_beginblock(const QString ¶m)
+ {
+ Q_UNUSED(param)
+ //FIXME: this is a dummy command, we should actually do something
+ //with param.
+ say(QLatin1String( "0 ok" ));
+ }
+
+ void DebconfFrontend::cmd_endblock(const QString ¶m)
+ {
+ Q_UNUSED(param)
+ //FIXME: this is a dummy command, we should actually do something
+ //with param.
+ say(QLatin1String( "0 ok" ));
+ }
+
+ void DebconfFrontend::cmd_stop(const QString ¶m)
+ {
+ Q_UNUSED(param)
+ //Do nothing.
+ }
+
++>>>>>>> upstream/0.3
bool DebconfFrontend::process()
{
QTextStream in(getReadDevice());
diff --cc src/debconf.h
index 8d22813,949c9bf..4446610
--- a/src/debconf.h
+++ b/src/debconf.h
@@@ -171,6 -171,14 +171,17 @@@ private
void cmd_subst(const QString ¶m);
void cmd_progress(const QString ¶m);
void cmd_x_ping(const QString ¶m);
++<<<<<<< HEAD
++=======
+ void cmd_version(const QString ¶m);
+ void cmd_x_loadtemplatefile(const QString ¶m);
+ void cmd_info(const QString ¶m);
+ void cmd_fget(const QString ¶m);
+ void cmd_fset(const QString ¶m);
+ void cmd_beginblock(const QString ¶m);
+ void cmd_endblock(const QString ¶m);
+ void cmd_stop(const QString ¶m);
++>>>>>>> upstream/0.3
struct Cmd {
const char *cmd;
void (DebconfFrontend::*run)(const QString &);
--
Repository for the KDE Debconf access library.
More information about the pkg-kde-commits
mailing list