[PackageKit-commit] packagekit: Branch 'refs/tags/PACKAGEKIT_0_6_20' - 13 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Mon Dec 5 02:38:30 PST 2011
Rebased ref, commits from common ancestor:
commit afbe441c4410c9cb85a143dae1f0ff6e7f8809dd
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Dec 5 10:37:15 2011 +0000
Release version 0.6.20
diff --git a/NEWS b/NEWS
index d881f6d..238367f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,21 @@
+Version 0.6.21
+~~~~~~~~~~~~~~
+Released: 2011-12-05
+
+Backends:
+ - aptcc: Add Multi-Arch support (Daniel Nicoletti)
+ - aptcc: Add native filter so we do not show i386 packages on amd64 (Daniel Nicoletti)
+ - aptcc: Fix conffile handling by using WEXITSTATUS to know the exit status (Daniel Nicoletti)
+ - yum: Consistently use same logic to determine GPG checking (Nils Philippsen)
+ - yum: Use current yum API for installing untrusted packages (Nils Philippsen)
+ - zypp: Retrieve url for packages instead of returning "TODO". (Duncan Mac-Vicar P)
+
+Bugfixes:
+ - Automatically rebuild moc files with different moc version (Nils Philippsen)
+ - Make the browser plugin compile with newer versions of xulrunner (Richard Hughes)
+ - Set the right role on accept-eula (Daniel Nicoletti)
+ - Skip empty catalog entries (Christian Persch)
+
Version 0.6.20
~~~~~~~~~~~~~~
Released: 2011-11-07
diff --git a/configure.ac b/configure.ac
index 9739ee0..6eb4bdd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ AC_SUBST(PK_VERSION)
# AGE If libpackagekit can be linked into executables which can be
# built with previous versions of this library. Don't use.
LT_CURRENT=14
-LT_REVISION=10
+LT_REVISION=11
LT_AGE=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
commit a74d58a2adf03b520fcd1ce3f134ef8fdc1d1fc2
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Dec 5 10:24:28 2011 +0000
Make the browser plugin compile with newer versions of xulrunner
diff --git a/contrib/browser-plugin/pk-main.c b/contrib/browser-plugin/pk-main.c
index 072a576..7d35f51 100644
--- a/contrib/browser-plugin/pk-main.c
+++ b/contrib/browser-plugin/pk-main.c
@@ -543,7 +543,7 @@ NP_Shutdown ()
/**
* NP_GetMIMEDescription:
**/
-char *
+const char *
NP_GetMIMEDescription (void)
{
pk_debug ("NP_GetMIMEDescription");
commit 63dcf802ebc4e8c72b1f0767d825bc753e5a4c02
Author: Christian Persch <chpe at gnome.org>
Date: Mon Nov 28 15:38:23 2011 +0100
glib: catalog: Skip empty entries
When parsing the catalog file we use g_key_file_get_string() instead
of g_key_file_get_string_list(), and then split the string into parts.
For string lists, the last character is a ';' so if the user doesn't
know this, we add an empty string to the array, leading to errors
further on. Therefore, skip empty strings.
https://bugs.freedesktop.org/show_bug.cgi?id=43305
Signed-off-by: Richard Hughes <richard at hughsie.com>
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index 36bf138..0a56c1f 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -169,7 +169,8 @@ pk_catalog_process_type_part (PkCatalogState *state, PkCatalogMode mode, const g
/* split using any of the delimiters and add to correct array*/
list = g_strsplit_set (data, ";, ", 0);
for (i=0; list[i] != NULL; i++)
- g_ptr_array_add (array, g_strdup (list[i]));
+ if (list[i][0] != '\0')
+ g_ptr_array_add (array, g_strdup (list[i]));
out:
g_strfreev (list);
g_free (key);
commit 26b47480de3d128af8bb975d3239151387514f15
Author: Nils Philippsen <nils at redhat.com>
Date: Thu Nov 24 11:39:59 2011 +0100
yum: consistently use same logic to determine GPG checking
Always check for existence of _override_sigchecks attribute, in
_is_package_repo_signed() as well as in _set_only_trusted().
(cherry picked from commit f527cfa46515fb26cb8d6b59803f90d2f22483d8)
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 4c8bd71..fd73f87 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1706,10 +1706,12 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
signed = False
try:
repo = self.yumbase.repos.getRepo(pkg.repoid)
- if hasattr(repo, "gpgcheck"):
- signed = repo.gpgcheck
- else:
+ if hasattr(repo, "_override_sigchecks"):
+ # yum >= 3.2.29
signed = not repo._override_sigchecks
+ else:
+ # yum < 3.2.29
+ signed = repo.gpgcheck
except yum.Errors.RepoError, e:
raise PkError(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e))
except exceptions.IOError, e:
commit 448996c965a7d5b823beb1b5ffdaa5d54207ade1
Author: Nils Philippsen <nils at redhat.com>
Date: Wed Nov 23 15:26:41 2011 +0100
use current yum API for installing untrusted packages
YumBase in yum >= 3.2.29 doesn't use conf objects for setting up
installation or update of untrusted packages. Consolidate the code
setting this up in _set_only_trusted(), and set it up the way the yum
CLI does (since 3.2.29) or respectively did before.
(cherry picked from commit 1055c52d723346006d8bbb7e0f2b324c9de9b82f)
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index dfed1a2..4c8bd71 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1706,7 +1706,10 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
signed = False
try:
repo = self.yumbase.repos.getRepo(pkg.repoid)
- signed = repo.gpgcheck
+ if hasattr(repo, "gpgcheck"):
+ signed = repo.gpgcheck
+ else:
+ signed = not repo._override_sigchecks
except yum.Errors.RepoError, e:
raise PkError(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e))
except exceptions.IOError, e:
@@ -1715,6 +1718,30 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
return signed
+ def _set_only_trusted(self, only_trusted):
+ # if only_trusted is true, it means that we will only install/update
+ # signed files
+
+ # _override_sigchecks logic is reversed
+ override_sigchecks = not only_trusted
+
+ if hasattr(self.yumbase, "_override_sigchecks"):
+ # yum >= 3.2.29:
+ self.yumbase._override_sigchecks = override_sigchecks
+
+ for repo in self.yumbase.repos.listEnabled():
+ repo._override_sigchecks = override_sigchecks
+
+ else:
+ # yum < 3.2.29:
+ for attrname in ("gpgcheck", "repo_gpgcheck", "localpkg_gpgcheck"):
+ setattr(self.yumbase.conf, attrname, only_trusted)
+
+ for attrname in ("gpgcheck", "repo_gpgcheck"):
+ for repo in self.yumbase.repos.listEnabled():
+ setattr(repo, attrname, only_trusted)
+
+
def update_system(self, only_trusted):
'''
Implement the update-system functionality
@@ -1729,15 +1756,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.percentage(0)
self.status(STATUS_RUNNING)
- # if only_trusted is true, it means that we will only update signed files
- if only_trusted:
- self.yumbase.conf.gpgcheck = 1
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 1
- else:
- self.yumbase.conf.gpgcheck = 0
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 0
+ self._set_only_trusted(only_trusted)
self.yumbase.conf.throttle = "60%" # Set bandwidth throttle to 60%
# to avoid taking all the system's bandwidth.
@@ -1957,15 +1976,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.status(STATUS_RUNNING)
txmbrs = []
- # if only_trusted is true, it means that we will only update signed files
- if only_trusted:
- self.yumbase.conf.gpgcheck = 1
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 1
- else:
- self.yumbase.conf.gpgcheck = 0
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 0
+ self._set_only_trusted(only_trusted)
for package_id in package_ids:
grp = self._is_meta_package(package_id)
@@ -2154,15 +2165,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.error(ERROR_ALL_PACKAGES_ALREADY_INSTALLED,
'All of the specified packages have already been installed')
- # If only_trusted is true, it means that we will only install trusted files
- if only_trusted or simulate:
- self.yumbase.conf.gpgcheck = 1
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 1
- else:
- self.yumbase.conf.gpgcheck = 0
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 0
+ self._set_only_trusted(only_trusted or simulate)
# self.yumbase.installLocal fails for unsigned packages when self.yumbase.conf.gpgcheck = 1
# This means we don't run runYumTransaction, and don't get the GPG failure in
@@ -2313,15 +2316,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.percentage(0)
self.status(STATUS_RUNNING)
- # if only_trusted is true, it means that we will only update signed files
- if only_trusted:
- self.yumbase.conf.gpgcheck = 1
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 1
- else:
- self.yumbase.conf.gpgcheck = 0
- if hasattr(self.yumbase.conf, 'localpkg_gpgcheck'):
- self.yumbase.conf.localpkg_gpgcheck = 0
+ self._set_only_trusted(only_trusted)
txmbrs = []
try:
commit 3f84d063357dd568d2dfbc161eca52c20e0ac10e
Author: Nils Philippsen <nils at redhat.com>
Date: Tue Nov 22 15:33:27 2011 +0100
automatically rebuild moc files with different moc version
diff --git a/Makefile.am b/Makefile.am
index a440e21..408cfb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,6 +15,9 @@ SUBDIRS = \
contrib \
docs
+GITIGNOREFILES = \
+ .moc.version
+
clean-local :
rm -f *~
diff --git a/moc.mk b/moc.mk
index 37a27e6..cc681be 100644
--- a/moc.mk
+++ b/moc.mk
@@ -1,8 +1,18 @@
-%.moc : %.h
+%.moc : %.h $(top_srcdir)/.moc.version
$(MOC) -i -o "$@" "$<"
+$(top_srcdir)/.moc.version : $(MOC)
+ # "moc -v" always fails :-/
+ $(MOC) -v > $@.tmp 2>&1 || :
+ if test ! -f "$@" || test "`cat $@`" != "`cat $@.tmp`"; then \
+ mv -f $@.tmp $@; \
+ else \
+ rm -f $@.tmp; \
+ fi
+
clean-moc-extra:
rm -vf *.moc
+ rm -vf $(top_srcdir)/.moc.version
clean-am: clean-moc-extra
commit cac23dd8da4f901095fe7a259107c67a09d1c61a
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Thu Nov 17 17:27:29 2011 -0200
aptcc: Fix conffile handling by using WEXITSTATUS to know the real exit status
diff --git a/backends/aptcc/apt.cpp b/backends/aptcc/apt.cpp
index d293d69..cbbf86f 100644
--- a/backends/aptcc/apt.cpp
+++ b/backends/aptcc/apt.cpp
@@ -1323,7 +1323,6 @@ void aptcc::updateInterface(int fd, int writeFd)
gchar *filename;
filename = g_build_filename(DATADIR, "PackageKit", "helpers", "aptcc", "pkconffile", NULL);
- gint exit_code;
gchar **argv;
gchar **envp;
GError *error = NULL;
@@ -1348,6 +1347,7 @@ void aptcc::updateInterface(int fd, int writeFd)
}
gboolean ret;
+ gint exitStatus;
ret = g_spawn_sync(NULL, // working dir
argv, // argv
envp, // envp
@@ -1356,9 +1356,10 @@ void aptcc::updateInterface(int fd, int writeFd)
NULL, // user_data
NULL, // standard_output
NULL, // standard_error
- &exit_code,
+ &exitStatus,
&error);
+ int exit_code = WEXITSTATUS(exitStatus);
cout << filename << " " << exit_code << " ret: "<< ret << endl;
if (exit_code == 10) {
commit a0c91fda8d6ad6a2d681d30bd28df7e7afdd0f55
Merge: a306f33... 83057f0...
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Tue Nov 15 00:50:19 2011 -0200
Merge branch 'PACKAGEKIT_0_6_X' of gitorious.org:packagekit/packagekit into PACKAGEKIT_0_6_X
commit a306f33061af874ed7a2d032275e23f440e213ce
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Mon Nov 14 01:37:17 2011 -0200
aptcc: Add native filter so we do not show i386 packages if we are on amd64 for example
diff --git a/backends/aptcc/apt.cpp b/backends/aptcc/apt.cpp
index 790fe4c..d293d69 100644
--- a/backends/aptcc/apt.cpp
+++ b/backends/aptcc/apt.cpp
@@ -270,16 +270,15 @@ void aptcc::emit_package(const pkgCache::PkgIterator &pkg,
}
}
- // Verify if the package supports multiArch
- // if so we might need to emit
- bool multiArch;
- const char *start, *stop;
- pkgTagSection sec;
- pkgRecords::Parser &rec = packageRecords->Lookup(ver.FileList());
- rec.GetRec(start, stop);
- // add +1 to ensure we have the double lineline in the buffer
- if (start && sec.Scan(start, stop - start + 1)) {
- multiArch = sec.FindS("Multi-Arch").empty() ? false : true;
+ if (m_isMultiArch &&
+ (pk_bitfield_contain(filters, PK_FILTER_ENUM_ARCH) &&
+ state == PK_INFO_ENUM_AVAILABLE)) {
+ // don't emit the package if it does not match
+ // the native architecture
+ if (strcmp(ver.Arch(), "all") != 0 &&
+ strcmp(ver.Arch(), _config->Find("APT::Architecture").c_str()) != 0) {
+ return;
+ }
}
if (filters != 0) {
diff --git a/backends/aptcc/pk-backend-aptcc.cpp b/backends/aptcc/pk-backend-aptcc.cpp
index 6a275c3..98bcb07 100644
--- a/backends/aptcc/pk-backend-aptcc.cpp
+++ b/backends/aptcc/pk-backend-aptcc.cpp
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <apt-pkg/init.h>
#include <apt-pkg/algorithms.h>
+#include <apt-pkg/aptconfiguration.h>
#include "apt.h"
#include "apt-utils.h"
@@ -126,12 +127,20 @@ pk_backend_get_groups (PkBackend *backend)
PkBitfield
pk_backend_get_filters (PkBackend *backend)
{
- return pk_bitfield_from_enums (
- PK_FILTER_ENUM_GUI,
- PK_FILTER_ENUM_INSTALLED,
- PK_FILTER_ENUM_DEVELOPMENT,
- PK_FILTER_ENUM_FREE,
- -1);
+ PkBitfield filters;
+ filters = pk_bitfield_from_enums (
+ PK_FILTER_ENUM_GUI,
+ PK_FILTER_ENUM_INSTALLED,
+ PK_FILTER_ENUM_DEVELOPMENT,
+ PK_FILTER_ENUM_FREE,
+ -1);
+
+ // if we have multiArch support we add the native filter
+ if (APT::Configuration::getArchitectures(false).size() > 1) {
+ pk_bitfield_add(filters, PK_FILTER_ENUM_ARCH);
+ }
+
+ return filters;
}
/**
@@ -919,7 +928,6 @@ pk_backend_search_files_thread (PkBackend *backend)
if (_cancel) {
break;
}
- std::cout << "filename" << i->c_str() << std::endl;
pkgCache::PkgIterator pkg = m_apt->packageCache->FindPkg(i->c_str());
if (pkg.end() == true) {
continue;
commit 236a408b72d4bcc904d5609ca2598ed329718aca
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Mon Nov 14 01:06:56 2011 -0200
aptcc: Add Multi-Arch support
Conflicts:
backends/aptcc/apt.cpp
backends/aptcc/apt.h
diff --git a/backends/aptcc/apt-utils.h b/backends/aptcc/apt-utils.h
index b2d00a3..4b95206 100644
--- a/backends/aptcc/apt-utils.h
+++ b/backends/aptcc/apt-utils.h
@@ -63,7 +63,8 @@ public:
const pair<pkgCache::PkgIterator, pkgCache::VerIterator> &b)
{
return strcmp(a.first.Name(), b.first.Name()) == 0 &&
- strcmp(a.second.VerStr(), b.second.VerStr()) == 0;
+ strcmp(a.second.VerStr(), b.second.VerStr()) == 0 &&
+ strcmp(a.second.Arch(), b.second.Arch()) == 0;
}
};
diff --git a/backends/aptcc/apt.cpp b/backends/aptcc/apt.cpp
index 3b267a4..790fe4c 100644
--- a/backends/aptcc/apt.cpp
+++ b/backends/aptcc/apt.cpp
@@ -35,6 +35,7 @@
#include <apt-pkg/sptr.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/version.h>
+#include <apt-pkg/aptconfiguration.h>
#include <sys/statvfs.h>
#include <sys/statfs.h>
@@ -70,6 +71,8 @@ bool aptcc::init()
gchar *http_proxy;
gchar *ftp_proxy;
+ m_isMultiArch = APT::Configuration::getArchitectures(false).size() > 1;
+
// Set PackageKit status
pk_backend_set_status(m_backend, PK_STATUS_ENUM_LOADING_CACHE);
@@ -189,7 +192,10 @@ pair<pkgCache::PkgIterator, pkgCache::VerIterator>
found = true;
parts = pk_package_id_split (package_id);
- pkg_ver.first = packageCache->FindPkg(parts[PK_PACKAGE_ID_NAME]);
+ gchar *pkgNameArch;
+ pkgNameArch = g_strdup_printf("%s:%s", parts[PK_PACKAGE_ID_NAME], parts[PK_PACKAGE_ID_ARCH]);
+ pkg_ver.first = packageCache->FindPkg(pkgNameArch);
+ g_free(pkgNameArch);
// Ignore packages that could not be found or that exist only due to dependencies.
if (pkg_ver.first.end() == true ||
@@ -264,6 +270,18 @@ void aptcc::emit_package(const pkgCache::PkgIterator &pkg,
}
}
+ // Verify if the package supports multiArch
+ // if so we might need to emit
+ bool multiArch;
+ const char *start, *stop;
+ pkgTagSection sec;
+ pkgRecords::Parser &rec = packageRecords->Lookup(ver.FileList());
+ rec.GetRec(start, stop);
+ // add +1 to ensure we have the double lineline in the buffer
+ if (start && sec.Scan(start, stop - start + 1)) {
+ multiArch = sec.FindS("Multi-Arch").empty() ? false : true;
+ }
+
if (filters != 0) {
std::string str = ver.Section() == NULL ? "" : ver.Section();
std::string section, repo_section;
@@ -932,7 +950,7 @@ vector<string> searchMimeType (PkBackend *backend, gchar **values, bool &error,
}
// used to emit files it reads the info directly from the files
-void emit_files (PkBackend *backend, const gchar *pi)
+void aptcc::emitFiles(PkBackend *backend, const gchar *pi)
{
static string filelist;
string line;
@@ -941,13 +959,22 @@ void emit_files (PkBackend *backend, const gchar *pi)
parts = pk_package_id_split (pi);
filelist.erase(filelist.begin(), filelist.end());
- string f = "/var/lib/dpkg/info/" +
- string(parts[PK_PACKAGE_ID_NAME]) +
- ".list";
- g_strfreev (parts);
+ string fName;
+ if (m_isMultiArch) {
+ fName = "/var/lib/dpkg/info/" +
+ string(parts[PK_PACKAGE_ID_NAME]) +
+ ":" +
+ string(parts[PK_PACKAGE_ID_ARCH]) +
+ ".list";
+ } else {
+ fName = "/var/lib/dpkg/info/" +
+ string(parts[PK_PACKAGE_ID_NAME]) +
+ ".list";
+ }
+ g_strfreev (parts);
- if (FileExists(f)) {
- ifstream in(f.c_str());
+ if (FileExists(fName)) {
+ ifstream in(fName.c_str());
if (!in != 0) {
return;
}
diff --git a/backends/aptcc/apt.h b/backends/aptcc/apt.h
index 02d7f91..c445ccc 100644
--- a/backends/aptcc/apt.h
+++ b/backends/aptcc/apt.h
@@ -34,11 +34,6 @@
using namespace std;
/**
-* Emits files of packages
-*/
-void emit_files (PkBackend *backend, const gchar *pi);
-
-/**
* returns a list of packages names
*/
vector<string> search_files (PkBackend *backend, gchar **values, bool &_cancel);
@@ -116,6 +111,11 @@ public:
* Emits update detail
*/
void emit_update_detail(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver);
+
+ /**
+ * Emits files of packages
+ */
+ void emitFiles(PkBackend *backend, const gchar *pi);
/**
* seems to install packages
@@ -156,6 +156,7 @@ private:
bool removingEssentialPackages(pkgCacheFile &Cache);
vector<pair<pkgCache::PkgIterator, pkgCache::VerIterator> > m_pkgs;
+ bool m_isMultiArch;
void populateInternalPackages(pkgCacheFile &Cache);
void emitTransactionPackage(string name, PkInfoEnum state);
time_t m_lastTermAction;
diff --git a/backends/aptcc/pk-backend-aptcc.cpp b/backends/aptcc/pk-backend-aptcc.cpp
index 07e3cd1..6a275c3 100644
--- a/backends/aptcc/pk-backend-aptcc.cpp
+++ b/backends/aptcc/pk-backend-aptcc.cpp
@@ -302,7 +302,7 @@ backend_get_files_thread (PkBackend *backend)
return false;
}
- emit_files (backend, pi);
+ m_apt->emitFiles(backend, pi);
}
delete m_apt;
@@ -919,6 +919,7 @@ pk_backend_search_files_thread (PkBackend *backend)
if (_cancel) {
break;
}
+ std::cout << "filename" << i->c_str() << std::endl;
pkgCache::PkgIterator pkg = m_apt->packageCache->FindPkg(i->c_str());
if (pkg.end() == true) {
continue;
commit 83057f04581fc0dba804c9ff362f0b16e8b2d9c7
Author: Duncan Mac-Vicar P <dmacvicar at suse.de>
Date: Mon Nov 14 10:16:42 2011 +0100
Retrieve url for packages instead of returning "TODO".
Not sure why this was left as "TODO".
In any case, this code needs to be written correctly, using
zypp::Package instead of the low-level zypp::sat::Solvable
and then use pkg.url() instead of
solvable.lookupStringAttribute(SolvAttr::url)
[A
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index e885cb0..b5dd654 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -574,7 +574,7 @@ backend_get_details_thread (PkBackend *backend)
package.lookupStrAttribute (sat::SolvAttr::license).c_str (),
group,
package.lookupStrAttribute (sat::SolvAttr::description).c_str (),
- "TODO", // pkg->url ().c_str (),
+ package.lookupStrAttribute (sat::SolvAttr::url).c_str (),
size * 1024);
}
commit 7578d6111c0b27a4760b1099e0647deb7e2cfe16
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date: Wed Nov 9 17:11:27 2011 -0200
packagekit: Set the right role on accept-eula
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 47c87d1..5629d33 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -2652,6 +2652,7 @@ pk_backend_accept_eula (PkBackend *backend, const gchar *eula_id)
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (eula_id != NULL, FALSE);
+ pk_backend_set_role_internal (backend, PK_ROLE_ENUM_ACCEPT_EULA);
g_debug ("eula_id %s", eula_id);
present = g_hash_table_lookup (backend->priv->eulas, eula_id);
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 77b6fd6..cfa935e 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -2763,6 +2763,7 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
+ pk_transaction_set_role (transaction, PK_ROLE_ENUM_ACCEPT_EULA);
/* check if the sender is the same */
ret = pk_transaction_verify_sender (transaction, context, &error);
commit b26c8fb8a168760faf2af4166d2ad7c43b769ea4
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 7 11:08:43 2011 +0000
trivial: post release version bump
diff --git a/RELEASE b/RELEASE
index 2338a96..0bd29b1 100644
--- a/RELEASE
+++ b/RELEASE
@@ -2,10 +2,10 @@ PackageKit Release Notes
1. Write NEWS entries for PackageKit in the same format as usual.
-git shortlog PACKAGEKIT_0_6_19.. | grep -i -v trivial | grep -v Merge > NEWS.new
+git shortlog PACKAGEKIT_0_6_20.. | grep -i -v trivial | grep -v Merge > NEWS.new
--------------------------------------------------------------------------------
-Version 0.6.20
+Version 0.6.21
~~~~~~~~~~~~~~
Released: 2011-xx-xx
@@ -52,7 +52,7 @@ git push
10. Send an email to packagekit at lists.freedesktop.org
=================================================
-PackageKit 0.6.20 released!
+PackageKit 0.6.21 released!
Tarballs available here: http://www.packagekit.org/releases/
diff --git a/configure.ac b/configure.ac
index a3ff552..9739ee0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ(2.63)
m4_define([pk_major_version], [0])
m4_define([pk_minor_version], [6])
-m4_define([pk_micro_version], [20])
+m4_define([pk_micro_version], [21])
m4_define([pk_version],
[pk_major_version.pk_minor_version.pk_micro_version])
More information about the PackageKit-commit
mailing list