[Bug 830492] Re: Downloads should not lock apt

Julian Andres Klode juliank at ubuntu.com
Sun Aug 21 12:18:04 UTC 2011


(a) synaptic needs an exclusive lock in order to work. If you install a
package while running synaptic, synaptic might produce random garbage,
crash, or whatever else, because the cache it uses does not reflect the
reality.

 (b) Locking single download files would be too complicated, we can
either lock the complete download stage or not. Otherwise, things start
getting crazy when two applications want to download the same file.

 (c) If you are updating your system, you obviously can't do other
changes in the meantime, as then the system state changes, and the
update can get broken. Imagine you install B while upgrading your system
which in turns installs A, and A conflicts with B. Now, if you install B
in the background, APT would try to install A as part of the upgrade and
fail.

Not locking downloads while installing might be possible to add at the
moment, but then there's also work to download & install in parallel
which renders this impossible again (because we need to lock downloads
and installs, as we are doing both at the same time).

-- 
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:
  New
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