Bug 52337 - 'pkcon update' doesn't refresh repos so no updates are detected
Summary: 'pkcon update' doesn't refresh repos so no updates are detected
Status: RESOLVED NOTABUG
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-21 11:44 UTC by Dominique Leuenberger
Modified: 2018-08-21 15:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2012-07-21 11:44:06 UTC
Bug originally reported downstream, at https://bugzilla.novell.com/show_bug.cgi?id=753946

###
I enabled auto-updates in Yast > /etc/sysconfig Editor > System > Cron >
Packagekit by setting 'Check Only' to 'No'. I waited a couple of days and
nothing was updated although updates were available.

I found in /etc/cron.daily/packagekit-background.cron that the above setting
will run 'pkcon update'. That command doesn't refresh the repos so new updates
are not detected. My repos have auto-refresh enabled.
###

Further info:

###
Hello Kun Kun,

If I add 'pkcon refresh' before 'pkcon update' in the cron file, then it works
fine.

So, either add the refresh command in the cron file or change 'pkcon update' so
it behaves like 'zypper update', which refreshes auto-refresh enabled repos.

This problem can be reproduced on any 11.4 or 12.1 machine.
###


(Is pkcon update supposed to do the update (the native openSUSE package manager, zypper, does on expired cache data)

So, if pkcon is supposed to do the refresh, then the bug is about this not happening.

If it's not supposed to auto-refresh, then the bug is about adding the refresh command to contrib/cron/packagekig-background.cron
Comment 1 Richard Hughes 2012-07-23 07:39:36 UTC
I think this is an error in the zypp PackageKit backend. When the PackageKit daemon calls into the GetUpdates method the backend is supposed to get the new update metadata if the metadata is older than the cache-age that is set by the client. This is what the zif backend does:

	cache_age = pk_backend_get_cache_age (backend);
	if (cache_age > 0)
		zif_config_set_uint (priv->config, "metadata_expire",
				     cache_age, NULL);

I think zypp needs to do something similar.
Comment 2 Richard Hughes 2018-08-21 15:52:36 UTC
We moved the upstream bugtracker to GitHub a long time ago. If this issue still affects you please re-create the issue here: https://github.com/hughsie/PackageKit/issues
 
Sorry for the impersonal message, and fingers crossed your issue no longer happens. Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.