Allow an option to refresh cache before checking

Bug #258173 reported by Vadim Peretokin on 2008-08-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Michael Vogt

Bug Description

Please add an option "?refresh=yes" to apturl, such that it refreshes the cache before checking if the package exists.

This scenario is necessary when the repository is frequently updated with new programs and the web interface relies on apt links for package installation.

Related branches

Vadim Peretokin (vperetokin) wrote :

Here's a patch.

In, change the AptUrl class to be:

class AptUrl(object):
    " a class that contains the parsed data from a apt url "
    def __init__(self):
        self.package = None
        self.schema = None
        self.keyfile = None
        self.minver = None
        self.repo_url = None
        self.refresh = None
        self.dist = '/'
        self.section = []

And in apturl, change code starting from 266 to be:

        # FIXME: ask before adding stuff to the sources.list
        # check if we need to fiddle with the sources.list
        if apturl.section and apturl.repo_url is None:
            ret = enable_section(apturl, cache)
            if ret != RESULT_OK:
                error(_("Enabling '%s' failed") % ",".join(apturl.section))
            cache = apt.Cache()
        # FIXME2: this has security implications, not enabled
        #elif apturl.repo_url is not None:
        # if not enable_repo(apturl):
        # error(_("Enabling '%s' failed") % apturl.repo_url)
        # continue
        # run_update(dia)
        elif apturl.refresh is not None:

Michael Vogt (mvo) on 2008-08-18
Changed in apturl:
assignee: nobody → mvo
importance: Undecided → Wishlist
status: New → Fix Committed
Changed in apturl:
status: Fix Committed → Fix Released
shilbert (sebastian-hilbert) wrote :

Has this bugfix made it into Jaunty through the regular updates or does one need to add some repository to pick this up ?

I have a Jaunty virtual machine with the latest updates I think. When installing the Jaunty version of GNUmed (0.3.9), adding the GNUmed PPA and trying to install GNUmed 0.6.0 from the PPA through

it complains that gnumed-client is installed already.


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers