Why does pacman lock the database during downloads?

Something that's always irked me about pacman is the fact that it locks the package database during the download stages of package installation, before anything has actually been installed/committed. Is there a reason for this, and if not, would a suggestion/patch be acceptable?
Here's the scenario I'm encountering right now:
* Downloading large package in background
* Need to upgrade flash player (YouTube no longer accepts an older version I suppose, and lolcats are a necessity)
* I cannot do this quick upgrade due to the lock pacman has on the database while downloading said large package
Last edited by itsbrad212 (2012-03-24 00:36:31)

krigun wrote:
Sounds reasonable, but the following scenario may or may not be a problem:
You have package A B and C installed:
Run pacman -Syu (huge download, all three packages updated)
Simultaneously, you execute pacman -R A (basically modify the pacman DB)
Package A updated (reinstalled) by first process
Not sure how pacman is built, but it probably locks and reads the DB when started, and then does it's thing without worries. In any case, it does support resuming downloads, so you could just end the long running process, install whatever, and resume.
I think it's the same with apt-get.
That's an interesting point, although I'm guessing the package manager could check to make sure that all packages that it wants to update are present on the system right after it locks the db, and if for some (rare) reason that one is missing, skip it.
hadrons123 wrote:
What is that large package which you think is that big?
I think locking is present in all package managers in all distributions and it is  a good Idea, so that someone can't install and uninstall a package at different terminals at the same time, and end up with a messed up package manager .
Well in this case, it is eclipse (>200 MB), but there are a variety of other large packages in the repositories. What may be small to you may seem massive to those with slower connections.
How could it become messed up? I'm not proposing the database lock be eliminated, but rather wait until the actual installation process begins before locking it. It's no skin off anybody's ass if someone simply downloads packages simultaneously.

Similar Messages

  • Why does ipad go to sleep during download, why does ipad go to sleep during download

    MY IPAD WENT IS SLEEP DURING APP DOWNLOAD, THEN TURN ITSELF OFF WHY?

    They all do. It saves battery power. Always attach to the charger when downloading. The downloads don't stop, however.

  • Why does every time I try to download a app it's says my credit card security code is invalid but it's the right one?

    Why does every time I try to download a app it's says my credit card security code is invalid but it's the right one?

    Apple I.D. support:
    http://www.apple.com/support/appleid/
    FAQ about Apple I.D.
    http://support.apple.com/kb/he37

  • Why does it takes so long to download the new version of Itunes?

    why does it takes so long to download the new version of Itunes?

    Since you cannot download iTunes on an iPod touch, this would not seem to be the correct forum for this question. I'd suggest you post full details of your problem in either the iTunes for Mac forum or the iTunes for Windows forum, as applicable to your system.
    Regards.

  • Where does pacman saves the downloaded stuff?

    When I first installed a program, it installed but pacman needed to download things, I then remove it but... When I re-install it again, pacman doesn't need to download the things any more...
    Where does pacman store the downloaded stuff?
    How do I get rid of them?

    /var/cache/pacman/pkg
    pacman -Sc  or pacman -Scc   
    i recommend -Sc ,  -Scc can be harmful in the long run if you ever need to downgrade a package
    Last edited by jc61990 (2013-02-19 15:21:48)

  • HT1577 why does it take so long to download a film i have been quoted 18hours for that i may as well buy the film on cd

    Why does it take so long to download from itunes I have been quoted 18hours but on the actual device it took 4 hours .When other sites can download films etc at a quater of the time such as amozon takes 30 mins for a HD film to download

    Well, I can't exactly answer why it's taking too long but here's the average time estimate depending on your internet speed:
    http://support.apple.com/kb/HT1577
    I hope this helps.

  • Why does it take so long to download a saved movie from the cloud

    Why does it take so long to download a saved movie from the cloud

    Hi first off if your running  fcp 7 with compressor 3.5 and fcp x and compressor 4 on the same drive you may run into problems
    as you now have a mix up between Qmasters  which caused me lots of problems when i did any back ground Rendering via compressor of FCP-X
    i had to completly remove compressor 3.5 and compressor 4 then put compressor 4 back on again  as the shared rendering out of FCP-X seems to loose the plot with both versions on the same on the same drive there is an app
    Here
    http://www.digitalrebellion.com/fcsremover/
    which you can get allows you to get rid of certain bits of FCS and FCP-X correctly as you may know deleting the app is,nt the whole story as you need to remove the pref etc as well
    but its really clearing out every thing to do with qmaster thats is the thing here thats what causes all the issues
    really you should follow apple install instructions for FCP -X install ( and put it on separate volumes ) and i know they say there is a way to get every thing working on the same drive ...but it did,nt work for me like you i had massive render times and that 3x crash error
    any way
    once i had remove done my remove C3.5 ,C4 and reinstall C4 only it worked straight away from FCP-X using all the cores on my machine
    get some thing like istats or run activity monitor to make sure Fcp-x is using all your cores to render and you can actually see if its doing anything at all instead of waiting 5 hours for an error
    if you want to use multi core in compressor 4 you have to go into the new apple qmaster tab  and setup up a quick cluster etc
    On another note i alway use Optimized media when doing the import as while you editing its back ground render every thing into pro res making it a much nice codec to compress down to H264 which you need for the ATV
    i hope that helps a bit ,some else may have a better solution but worked for me
    thanks
    G

  • Why does 'pacman' produce purely informational output?

    My apologies if this dead horse has already been beaten. A brief search didn't turn up any forum topics that addressed this issue.
    Many Unix programs adhere to the dictum that successful execution should produce no output unless something interesting or surprising happened. The canonical example is running 'ls' on an empty directory.
    'pacman' doesn't follow this design philosophy even if the '--quiet' switch is given.
    # pacman -Syq
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    multilib is up to date
    As I understand it, the rationale is the desire to be able to use programs in a pipe. If the output contains purely informational text, then every program that uses that program's output has first to throw away the informational text.
    Of course it's easy enough to quieten 'pacman'
    pacman -Sy | sed '/^:: /d'
    or even
    pacman -Sy | sed '/^:: \|is up to date$/d'
    So, I have a two part question: Why does 'pacman' produce purely informational text and why doesn't the '--quiet' switch really quieten 'pacman'?
    Thanks for any insight.

    I used firefox as an example of the differences between using query and search with and without the '-quiet' switch:
    [karol@black ~]$ pacman -Q firefox
    firefox 3.6.13-1
    [karol@black ~]$ pacman -Qq firefox
    firefox
    [karol@black ~]$ pacman -Ss firefox
    extra/firefox 3.6.13-1 [0,74 MB] [installed]
    Standalone web browser from mozilla.org
    extra/firefox-i18n 3.6.13-1 [4,47 MB]
    Language packs for Firefox
    extra/totem-plugin 2.32.0-3 [0,14 MB]
    Totem mozilla/firefox plugin
    community/arch-firefox-search 0.7-6 [0,00 MB] [installed]
    Firefox Arch search engines (AUR, Pkgs, BBS, Wiki, etc.)
    community/firefox-adblock-plus 1.3.3-1 [0,30 MB]
    plugin for firefox which block ads and banners
    community/firefox-noscript 2.0.9.8-1 [0,37 MB]
    plugin for firefox which disables script
    community/firefox-spell-ru 0.4.3-3 [0,50 MB]
    Russian spellchecker dictionary for Firefox
    unarch/firebrand 3.6-2 [0,00 MB]
    A script to brand Firefox without recompiling.
    unarch/swiftfox-athlon64 3.6.8-1 [9,42 MB]
    Swiftfox is a prebuilt version of Firefox3, optimized for Athlon64 processors.
    unarch/swiftfox-i686 3.6.8-1 [9,43 MB]
    Swiftfox is a prebuilt version of Firefox3, optimized for i686 architectures.
    unarch/swiftfox-prescott 3.6.8-1 [9,10 MB]
    Swiftfox is a prebuilt version of Firefox3, optimized for Core Solo/Duo processors.
    archlinuxfr/swiftfox-i686-fr 3.6.13-1 [9,51 MB]
    Mozilla Firefox optimized build for OLD AMD and INTEL processors on x86 architecture (French version)
    archlinuxfr/swiftweasel-amd-pgo 3.5.6-2 [9,59 MB]
    Mozilla Firefox optimized build for AMD processors on x86 architecturei (with xulrunner 1.9.1.7).
    archlinuxfr/swiftweasel-amd-pgo-fr 3.5.6-2 [9,60 MB]
    Mozilla Firefox optimized build for AMD processors on x86 architecture (French version) (with xulrunner 1.9.1.7).
    archlinuxfr/swiftweasel-intel-pgo-fr 3.5.6-1 [3,92 MB]
    Mozilla Firefox optimized build for INTEL processors on x86 architecture (French version).
    archlinuxfr/wto 1.0.3-3 [0,01 MB]
    web tv orange sans firefox et enregistreur en python
    cake/firefox 3.6-1 [0,95 MB] [installed: 3.6.13-1]
    Mozilla.org Web Browser
    cinan/firefox-pgo 3.6.8-2 [9,11 MB]
    Mozilla Firefox customizable web browser (XULRunner independent, PGO optimized, 64-bit TraceMonkey)
    cinan/mozplugger 1.14.1-1 [0,04 MB]
    A Mozilla & Firefox multimedia plugin.
    rfad/firefox-pgo 3.0.10-1 [8,09 MB]
    Mozilla Firefox. XULRunner independent. And optimized for faster use :)
    [karol@black ~]$ pacman -Ssq firefox
    firefox
    firefox-i18n
    totem-plugin
    arch-firefox-search
    firefox-adblock-plus
    firefox-noscript
    firefox-spell-ru
    firebrand
    swiftfox-athlon64
    swiftfox-i686
    swiftfox-prescott
    swiftfox-i686-fr
    swiftweasel-amd-pgo
    swiftweasel-amd-pgo-fr
    swiftweasel-intel-pgo-fr
    wto
    firefox
    firefox-pgo
    mozplugger
    firefox-pgo
    I think this is how the switch is meant to work. I posted a link to a bug/feature request that deals with a similar issue to what you report here.
    Maybe info about every repo - even if it's up to date - is printed for the sake of consistency?

  • HT1267 Why does itunes lock up my computer when I connect my iphone to it?

    Why does itunes lock up my computer when I connect my iphone?

    Hi Jimbob1985,
    If you are having issues with your devices not being recognized in iTunes on your Windows machine, you may find the following article helpful:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Regards,
    - Brenden

  • Why does it take 3 hours to download a movie

    Why does it take 3 hours to download a movie on apple tv?  Is there a solution??

    What kind of internet connection speed do you have?
    If you have 3Mbps DSL like I do, and are renting movies on either Apple TV model in HD Format, then it will take quite a while. Actually 3 Hours for an HD Movie would be failry fast here at my home. They are just large files. If I'm going to rent an HD movie, I will usually rent it earlier in the day and watch it when I'm ready.
    If you have an adequate internet connection, and just want to rent movies on the fly and don't care about HD, on the AppleTV v2 you can go to Settings / General / iTunes Store / Video Resolution... and select Standard Definition. With our 3Mbps DSL connection, when we rent a movie it is generally "Ready to Play..." within about 2 minutes at the most (enough time to grab a beer and get comfortable)
    As far as I know, Standard Definition movies still show on the same menu as the HD version with the ATV v1. I preferred that menu format myself because you didn't have to change the option in settings when you wanted to go back and forth.

  • Why does my lock screen glow green?

    Why does my lock screen glow green? It does it quite often, no affects on  the phone.

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • HT1600 Why does it take so long to download movies

    Why does it take so long to download movies

    Welcome to the Apple Community.
    The first thing to check would be your internet download speed, you can do this atwww.speedtest.net.
    1080p HD movies require a recommended speed of 8 Mbps, 720p HD movies require a recommended speed of 6 Mbps, while SD movies require a recommended speed of 2.5 Mbps.

  • Why does Acrobat XI PRO freeze during save or save as tasks in Window 8?

    Why does Acrobat XI PRO freeze during save or save as tasks in Window 8?  It is intermittent, but CHRONIC, and I am forced to "repair" the installation, or reboot by computer.  This has been a problem since upgrading to Windows 8 and installing the only Acrobat XI update.  Feedback most welcome and appreciated, but an Adobe FIX would be the best solution.

    10/4 to all, same problem here with Save or Save As in Acrobat XI Pro using Win 8 Pro, is it Adobe or Win 8 or both causing the problem.
    FYI, I just retired and am trying to archive/reduce my printed material and pictures to pdf, this continuing problem is really the pits.................

  • Why does it say "The configuration data for this product is corrupt. Contact your support personnel." when trying to install itunes64installer on my b4 bit windows 7 acer pc? Any help would be much appreciated...

    Why does it say "The configuration data for this product is corrupt. Contact your support personnel." when trying to install itunes64installer on my b4 bit windows 7 acer pc? Any help would be much appreciated...

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Why does Face Time keep disconnecting during calls. Screen freezes up., why does Face Time keep disconnecting during calls. Screen freezes up.

    Why does Face Time keep disconnecting during calls?  The screen freezes after just a few seconds on Face Time and disconnects.

    Close All Open Apps...  Perform a Reset... Try again...
    Reset  (No Data will be Lost)
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    Also... See Here  >  Troubleshooting FaceTime
    Mac  http://support.apple.com/kb/TS4185

Maybe you are looking for