Ticket #1290 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Wrong package status of packagekit.

Reported by: tick@… Owned by: thomas@…
Priority: high Milestone:
Component: Applications & Dependencies Version: current svn head
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

using pkcon to install and remove package will not change cached the status in
packagekit until restart packagekitd.

packagekit version b2bfdeb42f5bd750e893093696c505c4f24ba011

root@fic-gta02:/usr/share/applications# dbus-launch sh
root@fic-gta02:/usr/share/applications# pkcon search name diversity-nav
installed diversity-nav armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-dbg armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-dev armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-locale-fr armv4t 0.0.1+svnr256-r2 fr
translation for diversity-nav
available diversity-nav-locale-it armv4t 0.0.1+svnr256-r2 it
translation for diversity-nav
search-name runtime was 0.3 seconds
root@fic-gta02:/usr/share/applications# pkcon get description
'diversity-nav;0.0.1+svnr256-r2;armv4t;'
Package description

package: 'diversity-nav'
license: 'unknown'
group: 'other'
description: 'Diversity_nav - a GPS location based communicative application'
size: '0' bytes
url:

get-description runtime was 0.1 seconds
root@fic-gta02:/usr/share/applications# pkcon search name diversity-nav

installed diversity-nav armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-dbg armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-dev armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-locale-fr armv4t 0.0.1+svnr256-r2 fr
translation for diversity-nav
available diversity-nav-locale-it armv4t 0.0.1+svnr256-r2 it
translation for diversity-nav
search-name runtime was 0.3 seconds
root@fic-gta02:/usr/share/applications# pkcon remove
'diversity-nav;0.0.1+svnr256-r2;armv4t;'
remove-package runtime was 12.7 seconds

root@fic-gta02:/usr/share/applications# pkcon search name diversity-nav
installed diversity-nav armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-dbg armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-dev armv4t 0.0.1+svnr256-r2
Diversity_nav - a GPS location based communicative application
available diversity-nav-locale-fr armv4t 0.0.1+svnr256-r2 fr
translation for diversity-nav
available diversity-nav-locale-it armv4t 0.0.1+svnr256-r2 it
translation for diversity-nav
search-name runtime was 0.3 seconds
root@fic-gta02:/usr/share/applications# opkg-cl info diversity-nav
Package: diversity-nav
Version: 0.0.1+svnr256-r2
Depends: diversity-daemon, libedbus0 (>= 0.1.0.042+cvs20080311), libdbus-1-3 (>=
1.1.20), libedje0 (>= 0.5.0.042+cvs20080311), libecore-evas (>=
0.9.9.042+cvs20080311), libecore-x (>= 0.9.9.042+cvs20080311), libxcursor1 (>=
1.1.8), libxfixes3 (>= 4.0.3), libxrender1 (>= 0.9.2), libxext6 (>= 1.0.3),
libx11-6 (>= 1.1.2), libxdmcp6 (>= 1.0.2), libxau6 (>= 1.0.3), libecore-txt (>=
0.9.9.042+cvs20080311), libecore-fb (>= 0.9.9.042+cvs20080311), libts-1.0-0 (>=
1.0), libecore-job (>= 0.9.9.042+cvs20080311), libecore0 (>=
0.9.9.042+cvs20080311), libembryo0 (>= 0.9.1.042+cvs20080311), libevas0 (>=
0.9.9.042+cvs20080311), libc6 (>= 2.5), libeet0 (>= 0.9.10.042+cvs20080311),
libz1 (>= 1.2.3), libjpeg62 (>= 6b), libfontconfig1 (>= 2.4.1), libfreetype6 (>=
2.3.5), libexpat1 (>= 2.0.0)
Status: unknown ok not-installed
Section: openmoko/applications
Architecture: armv4t
maintainer: Angstrom Developers <angstrom-distro-devel@…>
MD5Sum: 4fe708bf9a80bf5ea9fa6752efd84b44
Filename: diversity-nav_0.0.1+svnr256-r2_armv4t.ipk
Source:
svn://svn.projects.openmoko.org/svnroot/diversity/trunk;module=diversity-nav;proto=https
Description: Diversity_nav - a GPS location based communicative application
Tags: group::maps

root@fic-gta02:/usr/share/applications#
root@fic-gta02:/usr/share/applications# opkg-cl list | grep packagekit
packagekit - 0.1+git2+b2bfdeb42f5bd750e893093696c505c4f24ba011-r8 - PackageKit?
package management abstraction
packagekit-dbg - 0.1+git2+b2bfdeb42f5bd750e893093696c505c4f24ba011-r8 -
PackageKit? package management abstraction
packagekit-dev - 0.1+git2+b2bfdeb42f5bd750e893093696c505c4f24ba011-r8 -
PackageKit? package management abstraction
packagekit-doc - 0.1+git2+b2bfdeb42f5bd750e893093696c505c4f24ba011-r8 -
PackageKit? package management abstraction
root@fic-gta02:/usr/share/applications#

Change History

comment:1 Changed 11 years ago by thomas@…

  • Summary changed from Wrong package status of packagekit. to Wrong package status of packagekit.

I think I have finally discovered the cause of this problem. When
pk-backend-opkg searches the package list, it uses the hash table created when
the backend was initialised. However, because of the bad ipkg api, when
opkg_packages_install() is called, a new hash table is created and modified to
reflect the current status. Therefore the hash table owned by pk-backend-opkg
becomes out of sync with the current status.

comment:2 Changed 11 years ago by thomas@…

I have looked further at which functions pk-backend-opkg uses, and it looks like
this bug will also affect upgrade, install, remove and refresh_cache. libopkg
needs a new API for each of these functions that takes an opkg_conf_t variable
as an parameter (the hash table of packages is stored in opkg_conf_t).

comment:3 Changed 11 years ago by thomas@…

I have posted a proposal for a new API here: http://wiki.openmoko.org/wiki/Libopkg

comment:4 Changed 11 years ago by thomas@…

  • Status changed from new to closed
  • Resolution set to fixed

I've now implemented the new API and updated the PackageKit? backend. I've tested
PackageKit? using pkcon and the problem is fixed.

Note: See TracTickets for help on using tickets.