[Bug 830492] Re: Downloads should not lock apt
James Haigh
James.R.Haigh at Gmail.com
Sun Aug 21 15:08:04 UTC 2011
I have thought of a solution involving a Python script that is simple
enough for me to work on, without having to touch apt-get code.
The reason this bug is important to me is that I have a slow Internet
connection. A more general solution is to implement a network shared
package cache like Pacserve[1] or pkgdistcache[2].
It doesn't matter that apt is locked during a download if the packages
are already in the local cache (/var/cache/apt/archives/) because the
download stage is instantaneous. My script will run a virtual package
server on localhost which should be set as the only repository in
Software Sources.
When my script receives a request it starts downloading the package from
the quickest location, and sends an error to the apt client. My script
will then get a complete list of packages to download, and the package
manager will exit. I will also make a wrapper for apt-get so that when
the download is finished, installation can proceed automatically.
Synaptic will require bug #80753 to be fixed so that the lock is only
made when changes are applied. It then also needs to integrate with the
download script to display progress and proceed with installation
automatically.
Ubuntu Software Centre would just need to integrate with the script
because it is not affected by bug #80753 anyway.
So I'm assigning this bug to me, but for Synaptic this solution is
blocked by bug #80753, so can someone please try to fix that.
[1] http://xyne.archlinux.ca/projects/pacserve/
[2] http://venator.ath.cx/dw/doku.php?id=linux:pkgdistcache
** Changed in: apt
Assignee: (unassigned) => James Haigh (james.r.haigh)
** Changed in: apt
Status: New => In Progress
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to synaptic in Ubuntu.
https://bugs.launchpad.net/bugs/830492
Title:
Downloads should not lock apt
Status in APT:
In Progress
Status in The synaptic package manager:
New
Status in “apt” package in Ubuntu:
New
Status in “synaptic” package in Ubuntu:
New
Bug description:
It should be possible to download while installing, or download 2
things at once.
Currently an apt-get command with '--download-only' will lock apt
(/var/lib/dpkg/lock). Synaptic even locks apt just by being open!
Examples:
* I might be updating my system. The update is still in the download stage, and I want to download and install a small package for something. Currently I would have to stop the download, install the package, and resume the download.
* I'm installing lots of application from the Software Centre. While 1 app is installing the next should be downloading.
* Run apt-get from command line while browsing software in Synaptic.
To avoid multiple instances of apt downloading the same file, each
partial file should have it's own lock (For example,
/var/cache/apt/archives/partial/inkscape_0.48.1-2ubuntu2_i386.deb
would have inkscape_0.48.1-2ubuntu2_i386.lock). It may also be
necessary to prevent updating package lists (sudo apt-get update) when
any download lock exists as well as apt's main lock.
To manage notifications about this bug go to:
https://bugs.launchpad.net/apt/+bug/830492/+subscriptions
More information about the foundations-bugs
mailing list