New upstream release
- Remove upstreamed patches - zif: Fix a critical warning when enabling a repository
This commit is contained in:
parent
d7edd94699
commit
5311b5012b
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ PackageKit-0.6.7.tar.bz2
|
||||
/PackageKit-0.8.2.tar.xz
|
||||
/PackageKit-0.8.3.tar.xz
|
||||
/PackageKit-0.8.4.tar.xz
|
||||
/PackageKit-0.8.5.tar.xz
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
From 9dbdf3d6aad84a382cffb689262d9ac841df1758 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Hughes <richard@hughsie.com>
|
||||
Date: Wed, 3 Oct 2012 14:36:32 +0100
|
||||
Subject: [PATCH 1/8] glib: Ensure remote error is stripped before showing it
|
||||
to the user
|
||||
|
||||
This prevents showing the user errors like:
|
||||
|
||||
GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code14
|
||||
|
||||
Resolves half of https://bugzilla.redhat.com/show_bug.cgi?id=862333
|
||||
---
|
||||
lib/packagekit-glib2/pk-client.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
|
||||
index 8a5f311..1a55757 100644
|
||||
--- a/lib/packagekit-glib2/pk-client.c
|
||||
+++ b/lib/packagekit-glib2/pk-client.c
|
||||
@@ -264,6 +264,7 @@ pk_client_fixup_dbus_error (GError *error)
|
||||
error->code = PK_CLIENT_ERROR_NOT_SUPPORTED;
|
||||
goto out;
|
||||
}
|
||||
+ g_dbus_error_strip_remote_error (error);
|
||||
g_warning ("couldn't parse execption '%s', please report", name);
|
||||
out:
|
||||
/* hardcode domain */
|
||||
--
|
||||
1.7.12
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From 1945d27506ce72e3a135c204c9e550be92c0c65b Mon Sep 17 00:00:00 2001
|
||||
From: Richard Hughes <richard@hughsie.com>
|
||||
Date: Tue, 2 Oct 2012 11:56:41 +0100
|
||||
Subject: [PATCH 3/4] Change the priority state changed timeout to 2 seconds
|
||||
|
||||
30 seconds is too long to have incorrect data showing in the UI.
|
||||
---
|
||||
etc/PackageKit.conf.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in
|
||||
index 18c5deb..3440be5 100644
|
||||
--- a/etc/PackageKit.conf.in
|
||||
+++ b/etc/PackageKit.conf.in
|
||||
@@ -194,8 +194,8 @@ DeveloperMode=false
|
||||
# This should be used when a native tool has been used, and the update UIs
|
||||
# should be updated to reflect reality.
|
||||
#
|
||||
-# default=30
|
||||
-StateChangedTimeoutPriority=30
|
||||
+# default=2
|
||||
+StateChangedTimeoutPriority=2
|
||||
|
||||
# The time in seconds to wait after the computer has been resumed or any non
|
||||
# package related system event
|
||||
--
|
||||
1.7.12.1
|
||||
|
||||
@ -1,711 +0,0 @@
|
||||
From ab3ee74c7ec4b74b4c9d1ab6298f4c32da03073b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Nicoletti <dantti12@gmail.com>
|
||||
Date: Tue, 2 Oct 2012 09:04:19 -0300
|
||||
Subject: [PATCH 4/4] packagekit-qt: Break ABI to make pk-qt more closer to
|
||||
what pk-glib is and allow for searchGroup() to work
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
lib/packagekit-qt2/Makefile.am | 4 ++
|
||||
lib/packagekit-qt2/bitfield.cpp | 70 +++++++++++++++++++++++++++
|
||||
lib/packagekit-qt2/bitfield.h | 33 +++++++++++++
|
||||
lib/packagekit-qt2/daemon.cpp | 15 +-----
|
||||
lib/packagekit-qt2/daemon.h | 77 ++++++++++++++++++++++++++++++
|
||||
lib/packagekit-qt2/package.cpp | 23 ++++-----
|
||||
lib/packagekit-qt2/package.h | 4 +-
|
||||
lib/packagekit-qt2/packagedetails.cpp | 8 +---
|
||||
lib/packagekit-qt2/packagedetails.h | 79 ++++++++++++++++---------------
|
||||
lib/packagekit-qt2/transaction.cpp | 18 ++++---
|
||||
lib/packagekit-qt2/transaction.h | 74 ++++++++++++++++-------------
|
||||
lib/packagekit-qt2/transactionprivate.cpp | 2 +-
|
||||
13 files changed, 295 insertions(+), 114 deletions(-)
|
||||
create mode 100644 lib/packagekit-qt2/bitfield.cpp
|
||||
create mode 100644 lib/packagekit-qt2/bitfield.h
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a4f123..a7530c3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -74,7 +74,7 @@ AC_SUBST(LT_AGE)
|
||||
# - If the interface is the same as the previous version, but bugs are
|
||||
# fixed, change:
|
||||
# REVISION += 1
|
||||
-LT_QT_CURRENT=4
|
||||
+LT_QT_CURRENT=5
|
||||
LT_QT_REVISION=0
|
||||
LT_QT_AGE=0
|
||||
AC_SUBST(LT_QT_CURRENT)
|
||||
diff --git a/lib/packagekit-qt2/Makefile.am b/lib/packagekit-qt2/Makefile.am
|
||||
index 6e5e777..959e618 100644
|
||||
--- a/lib/packagekit-qt2/Makefile.am
|
||||
+++ b/lib/packagekit-qt2/Makefile.am
|
||||
@@ -21,6 +21,8 @@ MOCFILES = \
|
||||
daemonproxy.moc \
|
||||
transactionproxy.moc \
|
||||
transaction.moc \
|
||||
+ package.moc \
|
||||
+ packagedetails.moc \
|
||||
$(NULL)
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
@@ -30,6 +32,7 @@ lib_LTLIBRARIES = \
|
||||
libpackagekit_qt2_includedir = $(includedir)/PackageKit/packagekit-qt2
|
||||
|
||||
libpackagekit_qt2_include_HEADERS = \
|
||||
+ bitfield.h \
|
||||
Signature \
|
||||
signature.h \
|
||||
Eula \
|
||||
@@ -47,6 +50,7 @@ libpackagekit_qt2_include_HEADERS = \
|
||||
$(NULL)
|
||||
|
||||
libpackagekit_qt2_la_SOURCES = \
|
||||
+ bitfield.cpp \
|
||||
signature.h \
|
||||
signature.cpp \
|
||||
eula.h \
|
||||
diff --git a/lib/packagekit-qt2/bitfield.cpp b/lib/packagekit-qt2/bitfield.cpp
|
||||
new file mode 100644
|
||||
index 0000000..2fa6e82
|
||||
--- /dev/null
|
||||
+++ b/lib/packagekit-qt2/bitfield.cpp
|
||||
@@ -0,0 +1,70 @@
|
||||
+#include "bitfield.h"
|
||||
+
|
||||
+using namespace PackageKit;
|
||||
+
|
||||
+Bitfield::Bitfield () : m_val (0)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+Bitfield::Bitfield (qulonglong val) : m_val (val)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+Bitfield::~Bitfield ()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+qulonglong Bitfield::operator& (qulonglong mask) const
|
||||
+{
|
||||
+ return m_val & (1ULL << mask);
|
||||
+}
|
||||
+
|
||||
+qulonglong Bitfield::operator&= (qulonglong mask)
|
||||
+{
|
||||
+ m_val &= (1ULL << mask);
|
||||
+ return m_val;
|
||||
+}
|
||||
+
|
||||
+qulonglong Bitfield::operator| (qulonglong mask) const
|
||||
+{
|
||||
+ return m_val | (1ULL << mask);
|
||||
+}
|
||||
+
|
||||
+qulonglong Bitfield::operator|= (qulonglong mask)
|
||||
+{
|
||||
+ m_val |= (1ULL << mask);
|
||||
+ return m_val;
|
||||
+}
|
||||
+
|
||||
+Bitfield Bitfield::operator& (Bitfield mask) const
|
||||
+{
|
||||
+ return m_val & mask.m_val;
|
||||
+}
|
||||
+
|
||||
+Bitfield Bitfield::operator&= (Bitfield mask)
|
||||
+{
|
||||
+ m_val &= mask.m_val;
|
||||
+ return m_val;
|
||||
+}
|
||||
+
|
||||
+Bitfield Bitfield::operator| (Bitfield mask) const
|
||||
+{
|
||||
+ return m_val | mask.m_val;
|
||||
+}
|
||||
+
|
||||
+Bitfield Bitfield::operator|= (Bitfield mask)
|
||||
+{
|
||||
+ m_val |= mask.m_val;
|
||||
+ return m_val;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+Bitfield& Bitfield::operator= (const Bitfield& other)
|
||||
+{
|
||||
+ if (this == &other)
|
||||
+ return *this;
|
||||
+
|
||||
+ m_val = other.m_val;
|
||||
+
|
||||
+ return *this;
|
||||
+}
|
||||
diff --git a/lib/packagekit-qt2/bitfield.h b/lib/packagekit-qt2/bitfield.h
|
||||
new file mode 100644
|
||||
index 0000000..d7dd481
|
||||
--- /dev/null
|
||||
+++ b/lib/packagekit-qt2/bitfield.h
|
||||
@@ -0,0 +1,33 @@
|
||||
+#ifndef PACKAGEKIT_BITFIELD_H
|
||||
+#define PACKAGEKIT_BITFIELD_H
|
||||
+
|
||||
+#include <QtGlobal>
|
||||
+
|
||||
+namespace PackageKit {
|
||||
+
|
||||
+class Bitfield
|
||||
+{
|
||||
+public:
|
||||
+ Bitfield ();
|
||||
+ Bitfield (qulonglong val);
|
||||
+ ~Bitfield ();
|
||||
+
|
||||
+ qulonglong operator& (qulonglong mask) const;
|
||||
+ qulonglong operator&= (qulonglong mask);
|
||||
+ qulonglong operator| (qulonglong mask) const;
|
||||
+ qulonglong operator|= (qulonglong mask);
|
||||
+
|
||||
+ Bitfield operator& (Bitfield mask) const;
|
||||
+ Bitfield operator&= (Bitfield mask);
|
||||
+ Bitfield operator| (Bitfield mask) const;
|
||||
+ Bitfield operator|= (Bitfield mask);
|
||||
+
|
||||
+ Bitfield& operator= (const Bitfield& other);
|
||||
+
|
||||
+private:
|
||||
+ qulonglong m_val;
|
||||
+};
|
||||
+
|
||||
+} // End namespace PackageKit
|
||||
+
|
||||
+#endif
|
||||
diff --git a/lib/packagekit-qt2/daemon.cpp b/lib/packagekit-qt2/daemon.cpp
|
||||
index 7b0cee1..8984946 100644
|
||||
--- a/lib/packagekit-qt2/daemon.cpp
|
||||
+++ b/lib/packagekit-qt2/daemon.cpp
|
||||
@@ -78,11 +78,7 @@ Daemon::~Daemon()
|
||||
|
||||
Transaction::Roles Daemon::actions()
|
||||
{
|
||||
- qulonglong roles = global()->d_ptr->daemon->roles();
|
||||
-
|
||||
- Transaction::Roles flags;
|
||||
- flags |= static_cast<Transaction::Role>(roles);
|
||||
- return flags;
|
||||
+ return global()->d_ptr->daemon->roles();
|
||||
}
|
||||
|
||||
QString Daemon::backendName()
|
||||
@@ -144,14 +140,7 @@ QDBusObjectPath Daemon::getTid()
|
||||
|
||||
uint Daemon::getTimeSinceAction(Transaction::Role role)
|
||||
{
|
||||
- // We need to find the Role enum position
|
||||
- // since this method does not support bitwised enum.
|
||||
- for (uint i = 0; i < 64; ++i) {
|
||||
- if (role == (1 << i)) {
|
||||
- return global()->d_ptr->daemon->GetTimeSinceAction(i);
|
||||
- }
|
||||
- }
|
||||
- return UINT_MAX;
|
||||
+ return global()->d_ptr->daemon->GetTimeSinceAction(role);
|
||||
}
|
||||
|
||||
QList<QDBusObjectPath> Daemon::getTransactionList()
|
||||
diff --git a/lib/packagekit-qt2/daemon.h b/lib/packagekit-qt2/daemon.h
|
||||
index 8ef525f..d8bb976 100644
|
||||
--- a/lib/packagekit-qt2/daemon.h
|
||||
+++ b/lib/packagekit-qt2/daemon.h
|
||||
@@ -23,6 +23,7 @@
|
||||
#define PACKAGEKIT_DAEMON_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
+#include <QtCore/QMetaEnum>
|
||||
|
||||
#include "package.h"
|
||||
#include "transaction.h"
|
||||
@@ -242,6 +243,82 @@ public:
|
||||
* The micro version number.
|
||||
*/
|
||||
static uint versionMicro();
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the string representing the enum
|
||||
+ * Useful for PackageDetails::Group
|
||||
+ */
|
||||
+ template<class T> static QString enumToString(int value, const char *enumName)
|
||||
+ {
|
||||
+ QString prefix = enumName;
|
||||
+ int id = T::staticMetaObject.indexOfEnumerator(enumName);
|
||||
+ QMetaEnum e = T::staticMetaObject.enumerator(id);
|
||||
+ if (!e.isValid ()) {
|
||||
+// qDebug() << "Invalid enum " << prefix;
|
||||
+ return QString();
|
||||
+ }
|
||||
+ QString enumString = e.valueToKey(value);
|
||||
+ if (enumString.isNull()) {
|
||||
+// qDebug() << "Enum key not found while searching for value" << QString::number(value) << "in enum" << prefix;
|
||||
+ return QString();
|
||||
+ }
|
||||
+
|
||||
+ // Remove the prefix
|
||||
+ if(!prefix.isNull() && enumString.indexOf(prefix) == 0) {
|
||||
+ enumString.remove(0, prefix.length());
|
||||
+ }
|
||||
+
|
||||
+ QString pkName;
|
||||
+ for(int i = 0 ; i < enumString.length() - 1 ; ++i) {
|
||||
+ pkName += enumString[i];
|
||||
+ if(enumString[i+1].isUpper())
|
||||
+ pkName += QChar('-');
|
||||
+ }
|
||||
+ pkName += enumString[enumString.length() - 1];
|
||||
+
|
||||
+ return pkName.toLower();
|
||||
+ }
|
||||
+
|
||||
+ template<class T> static int enumFromString(const QString &str, const char *enumName)
|
||||
+ {
|
||||
+ QString prefix = enumName;
|
||||
+ QString realName;
|
||||
+ bool lastWasDash = false;
|
||||
+ QChar buf;
|
||||
+
|
||||
+ for(int i = 0 ; i < str.length() ; ++i) {
|
||||
+ buf = str[i].toLower();
|
||||
+ if(i == 0 || lastWasDash) {
|
||||
+ buf = buf.toUpper();
|
||||
+ }
|
||||
+
|
||||
+ lastWasDash = false;
|
||||
+ if(buf == QLatin1Char('-')) {
|
||||
+ lastWasDash = true;
|
||||
+ } else if(buf == QLatin1Char('~')) {
|
||||
+ lastWasDash = true;
|
||||
+ realName += "Not";
|
||||
+ } else {
|
||||
+ realName += buf;
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ if (!prefix.isNull()) {
|
||||
+ realName = prefix + realName;
|
||||
+ }
|
||||
+
|
||||
+ int id = T::staticMetaObject.indexOfEnumerator(enumName);
|
||||
+ QMetaEnum e = T::staticMetaObject.enumerator(id);
|
||||
+ int enumValue = e.keyToValue(realName.toAscii().data());
|
||||
+
|
||||
+ if (enumValue == -1) {
|
||||
+ enumValue = e.keyToValue(prefix.append("Unknown").toAscii().data());
|
||||
+ if (!QString(enumName).isEmpty()) {
|
||||
+// qDebug() << "enumFromString (" << enumName << ") : converted" << str << "to" << QString("Unknown").append(enumName) << ", enum id" << id;
|
||||
+ }
|
||||
+ }
|
||||
+ return enumValue;
|
||||
+ }
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
diff --git a/lib/packagekit-qt2/package.cpp b/lib/packagekit-qt2/package.cpp
|
||||
index 2e1a91a..384c32e 100644
|
||||
--- a/lib/packagekit-qt2/package.cpp
|
||||
+++ b/lib/packagekit-qt2/package.cpp
|
||||
@@ -28,9 +28,9 @@
|
||||
using namespace PackageKit;
|
||||
|
||||
Package::Package(const QString &packageId, Info info, const QString &summary) :
|
||||
- QString(packageId),
|
||||
d(new PackagePrivate)
|
||||
{
|
||||
+ d->id = packageId;
|
||||
d->info = info;
|
||||
d->summary = summary;
|
||||
}
|
||||
@@ -42,11 +42,8 @@ Package::Package() :
|
||||
}
|
||||
|
||||
Package::Package(const Package &other) :
|
||||
- d(new PackagePrivate)
|
||||
+ d(other.d)
|
||||
{
|
||||
- d->info = InfoUnknown;
|
||||
-
|
||||
- *this = other;
|
||||
}
|
||||
|
||||
Package::~Package()
|
||||
@@ -55,40 +52,40 @@ Package::~Package()
|
||||
|
||||
bool Package::isValid() const
|
||||
{
|
||||
- int sepCount = count(QLatin1Char(';'));
|
||||
+ int sepCount = d->id.count(QLatin1Char(';'));
|
||||
if (sepCount == 3) {
|
||||
// A valid pk-id "name;version;arch;data"
|
||||
return true;
|
||||
} else if (sepCount == 0) {
|
||||
// its also valid just "name"
|
||||
- return !isEmpty();
|
||||
+ return !d->id.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QString Package::id() const
|
||||
{
|
||||
- return *this;
|
||||
+ return d->id;
|
||||
}
|
||||
|
||||
QString Package::name() const
|
||||
{
|
||||
- return section(QLatin1Char(';'), 0, 0);
|
||||
+ return d->id.section(QLatin1Char(';'), 0, 0);
|
||||
}
|
||||
|
||||
QString Package::version() const
|
||||
{
|
||||
- return section(QLatin1Char(';'), 1, 1);
|
||||
+ return d->id.section(QLatin1Char(';'), 1, 1);
|
||||
}
|
||||
|
||||
QString Package::arch() const
|
||||
{
|
||||
- return section(QLatin1Char(';'), 2, 2);
|
||||
+ return d->id.section(QLatin1Char(';'), 2, 2);
|
||||
}
|
||||
|
||||
QString Package::data() const
|
||||
{
|
||||
- return section(QLatin1Char(';'), 3, 3);
|
||||
+ return d->id.section(QLatin1Char(';'), 3, 3);
|
||||
}
|
||||
|
||||
QString Package::summary() const
|
||||
@@ -144,6 +141,6 @@ bool Package::operator==(const Package &package) const
|
||||
Package& Package::operator=(const Package &package)
|
||||
{
|
||||
d = package.d;
|
||||
- QString::operator=(package);
|
||||
}
|
||||
|
||||
+#include "package.moc"
|
||||
diff --git a/lib/packagekit-qt2/package.h b/lib/packagekit-qt2/package.h
|
||||
index 57fb153..81eca8d 100644
|
||||
--- a/lib/packagekit-qt2/package.h
|
||||
+++ b/lib/packagekit-qt2/package.h
|
||||
@@ -37,6 +37,7 @@ public:
|
||||
info(other.info),
|
||||
summary(other.summary) { }
|
||||
~PackagePrivate() { }
|
||||
+ QString id;
|
||||
uint info;
|
||||
QString summary;
|
||||
};
|
||||
@@ -51,8 +52,9 @@ public:
|
||||
*
|
||||
* \note All Package objects should be deleted by the user.
|
||||
*/
|
||||
-class Package : public QString
|
||||
+class Package
|
||||
{
|
||||
+ Q_GADGET
|
||||
public:
|
||||
/**
|
||||
* Describes the state of a package
|
||||
diff --git a/lib/packagekit-qt2/packagedetails.cpp b/lib/packagekit-qt2/packagedetails.cpp
|
||||
index 3be7de1..c273e5d 100644
|
||||
--- a/lib/packagekit-qt2/packagedetails.cpp
|
||||
+++ b/lib/packagekit-qt2/packagedetails.cpp
|
||||
@@ -22,12 +22,6 @@
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
-namespace PackageKit {
|
||||
-
|
||||
-
|
||||
-
|
||||
-}
|
||||
-
|
||||
using namespace PackageKit;
|
||||
|
||||
PackageDetails::PackageDetails(const QString &package_id, const QString &license, uint group, const QString &detail, const QString &url, qulonglong size) :
|
||||
@@ -82,3 +76,5 @@ qulonglong PackageDetails::size() const
|
||||
{
|
||||
return d->size;
|
||||
}
|
||||
+
|
||||
+#include "packagedetails.moc"
|
||||
diff --git a/lib/packagekit-qt2/packagedetails.h b/lib/packagekit-qt2/packagedetails.h
|
||||
index c4751db..f188e18 100644
|
||||
--- a/lib/packagekit-qt2/packagedetails.h
|
||||
+++ b/lib/packagekit-qt2/packagedetails.h
|
||||
@@ -22,6 +22,7 @@
|
||||
#define PACKAGEKIT_PACKAGE_DETAILS_H
|
||||
|
||||
#include "package.h"
|
||||
+#include "bitfield.h"
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
|
||||
@@ -57,48 +58,50 @@ namespace PackageKit {
|
||||
*/
|
||||
class PackageDetails : public Package
|
||||
{
|
||||
+ Q_GADGET
|
||||
+ Q_ENUMS(Group)
|
||||
public:
|
||||
/**
|
||||
* Describes the different package groups
|
||||
*/
|
||||
- enum Group {
|
||||
- GroupUnknown = 1ULL << 0,
|
||||
- GroupAccessibility = 1ULL << 1,
|
||||
- GroupAccessories = 1ULL << 2,
|
||||
- GroupAdminTools = 1ULL << 3,
|
||||
- GroupCommunication = 1ULL << 4,
|
||||
- GroupDesktopGnome = 1ULL << 5,
|
||||
- GroupDesktopKde = 1ULL << 6,
|
||||
- GroupDesktopOther = 1ULL << 7,
|
||||
- GroupDesktopXfce = 1ULL << 8,
|
||||
- GroupEducation = 1ULL << 9,
|
||||
- GroupFonts = 1ULL << 10,
|
||||
- GroupGames = 1ULL << 11,
|
||||
- GroupGraphics = 1ULL << 12,
|
||||
- GroupInternet = 1ULL << 13,
|
||||
- GroupLegacy = 1ULL << 14,
|
||||
- GroupLocalization = 1ULL << 15,
|
||||
- GroupMaps = 1ULL << 16,
|
||||
- GroupMultimedia = 1ULL << 17,
|
||||
- GroupNetwork = 1ULL << 18,
|
||||
- GroupOffice = 1ULL << 19,
|
||||
- GroupOther = 1ULL << 20,
|
||||
- GroupPowerManagement = 1ULL << 21,
|
||||
- GroupProgramming = 1ULL << 22,
|
||||
- GroupPublishing = 1ULL << 23,
|
||||
- GroupRepos = 1ULL << 24,
|
||||
- GroupSecurity = 1ULL << 25,
|
||||
- GroupServers = 1ULL << 26,
|
||||
- GroupSystem = 1ULL << 27,
|
||||
- GroupVirtualization = 1ULL << 28,
|
||||
- GroupScience = 1ULL << 29,
|
||||
- GroupDocumentation = 1ULL << 30,
|
||||
- GroupElectronics = 1ULL << 31,
|
||||
- GroupCollections = 1ULL << 32,
|
||||
- GroupVendor = 1ULL << 33,
|
||||
- GroupNewest = 1ULL << 34
|
||||
- };
|
||||
- typedef qulonglong Groups;
|
||||
+ typedef enum {
|
||||
+ GroupUnknown,
|
||||
+ GroupAccessibility,
|
||||
+ GroupAccessories,
|
||||
+ GroupAdminTools,
|
||||
+ GroupCommunication,
|
||||
+ GroupDesktopGnome,
|
||||
+ GroupDesktopKde,
|
||||
+ GroupDesktopOther,
|
||||
+ GroupDesktopXfce,
|
||||
+ GroupEducation,
|
||||
+ GroupFonts,
|
||||
+ GroupGames,
|
||||
+ GroupGraphics,
|
||||
+ GroupInternet,
|
||||
+ GroupLegacy,
|
||||
+ GroupLocalization,
|
||||
+ GroupMaps,
|
||||
+ GroupMultimedia,
|
||||
+ GroupNetwork,
|
||||
+ GroupOffice,
|
||||
+ GroupOther,
|
||||
+ GroupPowerManagement,
|
||||
+ GroupProgramming,
|
||||
+ GroupPublishing,
|
||||
+ GroupRepos,
|
||||
+ GroupSecurity,
|
||||
+ GroupServers,
|
||||
+ GroupSystem,
|
||||
+ GroupVirtualization,
|
||||
+ GroupScience,
|
||||
+ GroupDocumentation,
|
||||
+ GroupElectronics,
|
||||
+ GroupCollections,
|
||||
+ GroupVendor,
|
||||
+ GroupNewest
|
||||
+ } Group;
|
||||
+ typedef Bitfield Groups;
|
||||
|
||||
/**
|
||||
* Constructs package
|
||||
diff --git a/lib/packagekit-qt2/transaction.cpp b/lib/packagekit-qt2/transaction.cpp
|
||||
index f605b1b..ee7c59b 100644
|
||||
--- a/lib/packagekit-qt2/transaction.cpp
|
||||
+++ b/lib/packagekit-qt2/transaction.cpp
|
||||
@@ -59,7 +59,6 @@ void Transaction::init(const QDBusObjectPath &tid)
|
||||
{
|
||||
Q_D(Transaction);
|
||||
|
||||
- d->tid = tid;
|
||||
d->oldtrans = false;
|
||||
d->p = 0;
|
||||
|
||||
@@ -67,7 +66,8 @@ void Transaction::init(const QDBusObjectPath &tid)
|
||||
// he want us to get it
|
||||
if (tid.path().isNull()) {
|
||||
d->tid = Daemon::global()->getTid();
|
||||
- qDebug() << "packagekit-qt:" << d->tid.path();
|
||||
+ } else {
|
||||
+ d->tid = tid;
|
||||
}
|
||||
|
||||
int retry = 0;
|
||||
@@ -78,7 +78,7 @@ void Transaction::init(const QDBusObjectPath &tid)
|
||||
QDBusConnection::systemBus(),
|
||||
this);
|
||||
if (!d->p->isValid()) {
|
||||
- qDebug() << "Error, cannot create transaction proxy" << d->p->lastError();
|
||||
+ qWarning() << "Error, cannot create transaction proxy" << d->p->lastError();
|
||||
QDBusMessage message;
|
||||
message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.DBus"),
|
||||
QLatin1String("/"),
|
||||
@@ -278,16 +278,14 @@ Transaction::Role Transaction::role() const
|
||||
{
|
||||
Q_D(const Transaction);
|
||||
if(d->oldtrans) {
|
||||
- uint role = 1 << d->role;
|
||||
- return static_cast<Transaction::Role>(role);
|
||||
+ return d->role;
|
||||
}
|
||||
|
||||
if (d->destroyed) {
|
||||
return Transaction::RoleUnknown;
|
||||
}
|
||||
|
||||
- uint role = 1 << d->p->role();
|
||||
- return static_cast<Transaction::Role>(role);
|
||||
+ return static_cast<Transaction::Role>(d->p->role());
|
||||
}
|
||||
|
||||
void Transaction::setHints(const QStringList &hints)
|
||||
@@ -543,6 +541,12 @@ void Transaction::searchGroup(const QString &group, Transaction::Filters filters
|
||||
searchGroups(QStringList() << group, filters);
|
||||
}
|
||||
|
||||
+void Transaction::searchGroup(PackageDetails::Group group, Filters filters)
|
||||
+{
|
||||
+ QString groupString = Daemon::enumToString<PackageDetails>(group, "Group");
|
||||
+ searchGroup(groupString, filters);
|
||||
+}
|
||||
+
|
||||
void Transaction::searchGroups(PackageDetails::Groups groups, Transaction::Filters filters)
|
||||
{
|
||||
searchGroups(groups, filters);
|
||||
diff --git a/lib/packagekit-qt2/transaction.h b/lib/packagekit-qt2/transaction.h
|
||||
index 9e3416d..c599957 100644
|
||||
--- a/lib/packagekit-qt2/transaction.h
|
||||
+++ b/lib/packagekit-qt2/transaction.h
|
||||
@@ -88,40 +88,40 @@ public:
|
||||
/**
|
||||
* Describes the role of the transaction
|
||||
*/
|
||||
- enum Role {
|
||||
- RoleUnknown = 1 << 0,
|
||||
- RoleCancel = 1 << 1,
|
||||
- RoleGetDepends = 1 << 2,
|
||||
- RoleGetDetails = 1 << 3,
|
||||
- RoleGetFiles = 1 << 4,
|
||||
- RoleGetPackages = 1 << 5,
|
||||
- RoleGetRepoList = 1 << 6,
|
||||
- RoleGetRequires = 1 << 7,
|
||||
- RoleGetUpdateDetail = 1 << 8,
|
||||
- RoleGetUpdates = 1 << 9,
|
||||
- RoleInstallFiles = 1 << 10,
|
||||
- RoleInstallPackages = 1 << 11,
|
||||
- RoleInstallSignature = 1 << 12,
|
||||
- RoleRefreshCache = 1 << 13,
|
||||
- RoleRemovePackages = 1 << 14,
|
||||
- RoleRepoEnable = 1 << 15,
|
||||
- RoleRepoSetData = 1 << 16,
|
||||
- RoleResolve = 1 << 17,
|
||||
- RoleSearchDetails = 1 << 18,
|
||||
- RoleSearchFile = 1 << 19,
|
||||
- RoleSearchGroup = 1 << 20,
|
||||
- RoleSearchName = 1 << 21,
|
||||
- RoleUpdatePackages = 1 << 22,
|
||||
- RoleWhatProvides = 1 << 23,
|
||||
- RoleAcceptEula = 1 << 24,
|
||||
- RoleDownloadPackages = 1 << 25,
|
||||
- RoleGetDistroUpgrades = 1 << 26,
|
||||
- RoleGetCategories = 1 << 27,
|
||||
- RoleGetOldTransactions = 1 << 28,
|
||||
- RoleUpgradeSystem = 1 << 29, // Since 0.6.11
|
||||
- RoleRepairSystem = 1 << 30 // Since 0.7.2
|
||||
- };
|
||||
- Q_DECLARE_FLAGS(Roles, Role)
|
||||
+ typedef enum {
|
||||
+ RoleUnknown,
|
||||
+ RoleCancel,
|
||||
+ RoleGetDepends,
|
||||
+ RoleGetDetails,
|
||||
+ RoleGetFiles,
|
||||
+ RoleGetPackages,
|
||||
+ RoleGetRepoList,
|
||||
+ RoleGetRequires,
|
||||
+ RoleGetUpdateDetail,
|
||||
+ RoleGetUpdates,
|
||||
+ RoleInstallFiles,
|
||||
+ RoleInstallPackages,
|
||||
+ RoleInstallSignature,
|
||||
+ RoleRefreshCache,
|
||||
+ RoleRemovePackages,
|
||||
+ RoleRepoEnable,
|
||||
+ RoleRepoSetData,
|
||||
+ RoleResolve,
|
||||
+ RoleSearchDetails,
|
||||
+ RoleSearchFile,
|
||||
+ RoleSearchGroup,
|
||||
+ RoleSearchName,
|
||||
+ RoleUpdatePackages,
|
||||
+ RoleWhatProvides,
|
||||
+ RoleAcceptEula,
|
||||
+ RoleDownloadPackages,
|
||||
+ RoleGetDistroUpgrades,
|
||||
+ RoleGetCategories,
|
||||
+ RoleGetOldTransactions,
|
||||
+ RoleUpgradeSystem, // Since 0.6.11
|
||||
+ RoleRepairSystem // Since 0.7.2
|
||||
+ } Role;
|
||||
+ typedef Bitfield Roles;
|
||||
|
||||
/**
|
||||
* Describes the different types of error
|
||||
@@ -844,6 +844,12 @@ public:
|
||||
* \sa searchGroups(const QStringList &groups, Filters filters = FilterNone)
|
||||
*/
|
||||
void searchGroup(const QString &group, Filters filters = FilterNone);
|
||||
+
|
||||
+ /**
|
||||
+ * Convenience function to search by group enum
|
||||
+ * \sa searchGroups(const QStringList &groups, Filters filters = FilterNone)
|
||||
+ */
|
||||
+ void searchGroup(PackageDetails::Group group, Filters filters = FilterNone);
|
||||
|
||||
/**
|
||||
* \brief Lists all the packages in the given \p group
|
||||
diff --git a/lib/packagekit-qt2/transactionprivate.cpp b/lib/packagekit-qt2/transactionprivate.cpp
|
||||
index 94b2832..564bd58 100644
|
||||
--- a/lib/packagekit-qt2/transactionprivate.cpp
|
||||
+++ b/lib/packagekit-qt2/transactionprivate.cpp
|
||||
@@ -202,7 +202,7 @@ QStringList TransactionPrivate::packageListToPids(const PackageList &packages) c
|
||||
{
|
||||
QStringList pids;
|
||||
foreach (const Package &package, packages) {
|
||||
- pids << package;
|
||||
+ pids << package.id();
|
||||
}
|
||||
return pids;
|
||||
}
|
||||
--
|
||||
1.7.12.1
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
From 89ea03c4d72d1a3c4978239241300076e78b1b29 Mon Sep 17 00:00:00 2001
|
||||
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||
Date: Wed, 3 Oct 2012 15:37:28 -0400
|
||||
Subject: [PATCH 5/8] pk-gtk-module: Argument pango_language_matches() must be
|
||||
canonical
|
||||
|
||||
The pattern passed to pango_language_matches() has to be in canonical
|
||||
form - that is, lowercase with - for separators.
|
||||
|
||||
(Note that there was no leak before the usage of pango_languages_matches()
|
||||
was introduced by 677e8ab408 - pango_language_from_string() doesn't
|
||||
return an allocated result.)
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=55590
|
||||
|
||||
Signed-off-by: Richard Hughes <richard@hughsie.com>
|
||||
---
|
||||
contrib/gtk-module/pk-gtk-module.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/gtk-module/pk-gtk-module.c b/contrib/gtk-module/pk-gtk-module.c
|
||||
index 2c93f02..54cf08f 100644
|
||||
--- a/contrib/gtk-module/pk-gtk-module.c
|
||||
+++ b/contrib/gtk-module/pk-gtk-module.c
|
||||
@@ -252,7 +252,7 @@ pk_pango_fc_font_map_load_fontset (PangoFontMap *font_map,
|
||||
* code instead of "xx"... */
|
||||
if (G_LIKELY (language == last_language) ||
|
||||
language == NULL ||
|
||||
- pango_language_matches (language, "C;xx"))
|
||||
+ pango_language_matches (language, "c;xx"))
|
||||
return fontset;
|
||||
|
||||
if (G_UNLIKELY (!seen_languages))
|
||||
--
|
||||
1.7.12
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 27a59b0566de69a22c248ae7ba6f74bcf32ef73e Mon Sep 17 00:00:00 2001
|
||||
From: Richard Hughes <richard@hughsie.com>
|
||||
Date: Thu, 4 Oct 2012 11:43:14 +0100
|
||||
Subject: [PATCH 6/8] offline-updates: Don't crash when writing the
|
||||
offline-update-competed file
|
||||
|
||||
---
|
||||
contrib/systemd-updates/pk-offline-update.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c
|
||||
index 36972be..6d02f4a 100644
|
||||
--- a/contrib/systemd-updates/pk-offline-update.c
|
||||
+++ b/contrib/systemd-updates/pk-offline-update.c
|
||||
@@ -280,7 +280,7 @@ pk_offline_update_write_results (PkResults *results)
|
||||
packages = pk_results_get_package_array (results);
|
||||
if (packages != NULL) {
|
||||
string = g_string_new ("");
|
||||
- for (i = 0; packages->len; i++) {
|
||||
+ for (i = 0; i < packages->len; i++) {
|
||||
package = g_ptr_array_index (packages, i);
|
||||
g_string_append_printf (string, "%s,",
|
||||
pk_package_get_id (package));
|
||||
--
|
||||
1.7.12
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
From f86490ef61704f9ca86841c533643650b522703d Mon Sep 17 00:00:00 2001
|
||||
From: Richard Hughes <richard@hughsie.com>
|
||||
Date: Thu, 4 Oct 2012 11:45:34 +0100
|
||||
Subject: [PATCH 8/8] offline-updates: Only save packages that have been
|
||||
updated or installed in the offline-update-competed
|
||||
file
|
||||
|
||||
---
|
||||
contrib/systemd-updates/pk-offline-update.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c
|
||||
index a012e12..4ddddb5 100644
|
||||
--- a/contrib/systemd-updates/pk-offline-update.c
|
||||
+++ b/contrib/systemd-updates/pk-offline-update.c
|
||||
@@ -282,8 +282,15 @@ pk_offline_update_write_results (PkResults *results)
|
||||
string = g_string_new ("");
|
||||
for (i = 0; i < packages->len; i++) {
|
||||
package = g_ptr_array_index (packages, i);
|
||||
- g_string_append_printf (string, "%s,",
|
||||
- pk_package_get_id (package));
|
||||
+ switch (pk_package_get_info (package)) {
|
||||
+ case PK_INFO_ENUM_UPDATING:
|
||||
+ case PK_INFO_ENUM_INSTALLING:
|
||||
+ g_string_append_printf (string, "%s,",
|
||||
+ pk_package_get_id (package));
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
if (string->len > 0)
|
||||
g_string_set_size (string, string->len - 1);
|
||||
--
|
||||
1.7.12
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
Summary: Package management service
|
||||
Name: PackageKit
|
||||
Version: 0.8.4
|
||||
Release: 4%{?dist}
|
||||
Version: 0.8.5
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: http://www.packagekit.org
|
||||
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
|
||||
@ -17,14 +17,6 @@ Patch1: PackageKit-0.4.4-Fedora-turn-off-time.conf.patch
|
||||
# Upstreamable? allow use of xulrunner2 for browser-plugin support
|
||||
Patch4: PackageKit-0.7.4-xulrunner2.patch
|
||||
|
||||
# upstream patches
|
||||
Patch103: 0003-Change-the-priority-state-changed-timeout-to-2-secon.patch
|
||||
Patch104: 0004-packagekit-qt-Break-ABI-to-make-pk-qt-more-closer-to.patch
|
||||
Patch105: 0001-glib-Ensure-remote-error-is-stripped-before-showing-.patch
|
||||
Patch106: 0005-pk-gtk-module-Argument-pango_language_matches-must-b.patch
|
||||
Patch107: 0006-offline-updates-Don-t-crash-when-writing-the-offline.patch
|
||||
Patch108: 0008-offline-updates-Only-save-packages-that-have-been-up.patch
|
||||
|
||||
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
|
||||
Requires: PackageKit-backend
|
||||
Requires: shared-mime-info
|
||||
@ -262,12 +254,6 @@ user to restart the computer or remove and re-insert the device.
|
||||
%patch0 -p1 -b .fedora
|
||||
%patch1 -p1 -b .no-time
|
||||
%patch4 -p1 -b .xulrunner2
|
||||
%patch103 -p1 -b .0003
|
||||
%patch104 -p1 -b .0004
|
||||
%patch105 -p1 -b .remote-dbus-error
|
||||
%patch106 -p1 -b .pango-c-error
|
||||
%patch107 -p1 -b .offline-crash
|
||||
%patch108 -p1 -b .offline-save-list
|
||||
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
@ -478,6 +464,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_libdir}/pkgconfig/packagekit-plugin.pc
|
||||
|
||||
%changelog
|
||||
* Mon Oct 29 2012 Richard Hughes <rhughes@redhat.com> - 0.8.5-1
|
||||
- New upstream release
|
||||
- Remove upstreamed patches
|
||||
- zif: Fix a critical warning when enabling a repository
|
||||
|
||||
* Mon Oct 08 2012 Rex Dieter <rdieter@fedoraproject.org> 0.8.4-4
|
||||
- -yum: Requires: yum >= 3.4.3-45
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user