If you are offline and try to refresh package lists in gnome packagekit (System -> Refresh Package Lists), it says that it cannot refresh package lists while offline. However, it should retrieve the package lists and group information of local/media repositories.
Anyway, even if online, some repositories might have problems and cannot be contacted for whatever reason. So, probably a better approach is to try to retrieve repository information of all repositories (certainly it can ignore online repositories if offline) and finally list any encountered errors or add error messages (just like what is done when a repository is inaccessible in other operations).
I think the logic was that if the user was offline, then all the repos would be tried and would fail, and it would put lots of scary warnings in the logs about not being able to contact the different sites.
Is there a use case where we have no network but want to refresh from the DVD?
You're right, probably I should change the bug title. The reason that I wanted to refresh a local repo (it was not a media repo at the time, but a file:// repo) was that PackageKit did not read group information from the repo. When I clicked one of the groups (e.g. Games), it said that it had not read group information and I should reload the repository information. So, I tried refreshing repository information which in return said that I cannot refresh while offline.
PackageKit does not get and use comps.xml files from local repos (file: or media repositories)
Author: Richard Hughes <firstname.lastname@example.org>
Date: Wed Dec 1 17:00:05 2010 +0000
yum: allow a cache refresh when offline to deal with networkless setups
:100644 100644 2abfa32... 9a5e044... M backends/yum/pk-backend-yum.c