Package Details: pacman-cage 2.9.9-7

Git Clone URL: (read-only)
Package Base: pacman-cage
Description: Creates a loopbacked filesystem to give better response times when using pacman
Upstream URL:
Licenses: GPL3
Submitter: Vithon
Maintainer: None
Last Packager: swiftgeek
Votes: 83
Popularity: 0.000006
First Submitted: 2009-12-06 20:57
Last Updated: 2015-06-10 16:55

Dependencies (0)

Required by (1)

Sources (3)

Latest Comments

swiftgeek commented on 2015-01-04 23:20

sync will kill `pacman-db-upgrade` performance, run:
mount -o remount,async,noatime /var/lib/pacman
before issuing `pacman-db-upgrade`

Det commented on 2014-09-15 16:04

Uploaded without the duplicated checksums.

It also removed the out-of-date flag from June, whatever that was for.

SanskritFritz commented on 2014-08-27 18:48

It doesn't replace the files. Is replaces the folder the files are in. There is always a risk while doing such a thing, but it's minor, many of us use this package for years now. When there is a problem, like the loop filesystem doesn't get mounted, pacman just gives an error, no harm is done. Oh and one more thing: you do backups do you?

hzy199411 commented on 2014-08-27 17:18

is there any risk using this loop filesystem to replace default pacman db files?

Det commented on 2013-05-27 23:10

Because it's sort of like using "sleep 1" in the beginning of the package().

luolimao commented on 2013-05-27 20:09

Yeah, but why does it matter that larger sums are used? The time difference isn't significant.

Det commented on 2013-05-27 05:04

Are you still alive?

Det commented on 2013-04-23 21:24

Lol. As it seems like I had the old version of the PKGBUILD in Chrome's cache: nowhere.

But the checksums are still duplicated, and they're both unnecessarily large. Even with SHA-1 the best collision attack thus far is estimated with a complexity of 2^61:

That's 2.3 quintillion operations (10^18:

luolimao commented on 2013-04-23 20:58

Where does it mention the rc script?

Det commented on 2013-04-23 13:13

Hmm, why do you have both sha256 and sha512sums? In practice even sha1 would suffice.

Also the source section still mentions the rc script, which doesn't exist anymore. The commented install line is also unnecessary.

luolimao commented on 2013-04-21 22:42

Got rid of that rc script+references and the .service extension. But yeah, it does help on my system (although the speed gains aren't THAT dramatic). It shrinks the time down by about 15s.

Det commented on 2013-04-21 22:28

Lol. End of discussion.

swiftgeek commented on 2013-04-21 21:23

There is a difference for me and my 10 years old HDDs. Without cage 1st access can take >60s, with it's usually <10s.

Det commented on 2013-04-21 21:09

The .service suffix isn't really necessary anymore since systemd-188 (released last August):, while the uncage script still mentions the old rc.conf.

But I was just thinking just how much do we still need this thing. It was back in March 2011 when Allan and falconindy both said there wasn't much benefit to it anymore: That was during pacman 3.5. Now we're at 4.1.

In fact I was timing this thing with "time pacman -Ss/-Qq/-Syu" and none of them were any faster. Though the fact that I have an SSD scales things down a bit.

luolimao commented on 2013-02-05 22:55

Although, I caught a few typos that I wouldn't have otherwise, so this wasn't completely fruitless.

luolimao commented on 2013-02-05 22:47

Yes, the pacman database must exist, not pacman.db; it takes /var/lib/pacman and packages it into /var/lib/pacman.db. Therefore, if you have /var/lib/pacman/, then it should run, since the parent dirs would exist already, and pacman.db is a file newly generated by the script...

luolimao commented on 2013-02-05 22:38

Sorry, I misread your message earlier; however, it seems to work for me just fine... but yes, the database must exist beforehand.

luolimao commented on 2013-02-05 22:01

Really? Do you have e2fsprogs installed?

msx commented on 2013-02-05 21:16

pacman-cage isn't working for here:
# journalctl -xn
feb 05 18:11:22 heybeavis bash[6651]: /sbin/e2fsck: No such file or directory while trying to open /var/lib/pacman.db

Do I need to manually generate the database before running the unit for the first time?

luolimao commented on 2012-09-11 19:29


Xavion commented on 2012-09-11 04:02

Thanks for doing that, but you should probably install "pacmandb.service" in "/usr/lib/systemd/system/" instead.

luolimao commented on 2012-09-11 00:05

Considering the recent frenzy about systemd becoming the new de facto standard, I agree. It's enabled by default now.

Xavion commented on 2012-09-11 00:01

Please enable the 'systemd' service line in your PKGBUILD by default. Anyone who hasn't moved to 'systemd' yet is clearly behind the times.

luolimao commented on 2012-08-23 12:11

Added it in, thanks.

swiftgeek commented on 2012-06-08 00:47

Slightly updated pacmandb.service

swiftgeek commented on 2012-05-18 17:55

Please use this in pacmandb.rc, to get rid of boot-up errors: pacman -Qv 2> /dev/null

- pacmanlog=$(pacman -Qv | grep "Log File" | cut -d ":" -f2)
+ pacmanlog=$(pacman -Qv 2> /dev/null | grep "Log File" | cut -d ":" -f2)
————————————————————————WITHOUT FIX—————————————————————————————————————
warning: database file for 'extra' does not exist
warning: database file for 'community' does not exist
warning: database file for 'multilib' does not exist
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : None
————————————————————————WITH FIX————————————————————————————————————————
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : None

Anonymous comment on 2012-02-24 15:17

I have tested .service file from and have found that it works fine.
Please add it into package.

swiftgeek commented on 2012-01-13 18:11

Really quick&dirty unit file
based on lvm unit from
Please let me know if it's working ;)

swiftgeek commented on 2012-01-13 17:27

Please add .service file to make "pacmandb" script run smoothly under systemd.

Anonymous comment on 2011-12-26 19:13

Please add .service file to make "pacmandb" script run smoothly under systemd.

Anonymous comment on 2011-06-09 03:07

I'm just wondering how to make pacman-cage update /var/lib/pacman.bak on the fly to reflect all the changes in the loopbacked filesystem. If something crazy happens all we have to do is unmount the loopbacked filesystem and rename /var/lib/pacman.bak to /var/lib/pacman. It is a good idea, right?

Anonymous comment on 2011-03-24 08:02

pacman 3.5.1-1 is now in core :)

Vithon commented on 2011-03-18 01:19

pacman 3.5.0-1 is still in [testing], so the change will be done when the package is moved into [core].
Thanks for the fix, by the way.

Anonymous comment on 2011-03-17 16:45

The latest pacman 3.5.0-1 breaks the pacman -v command used to find the log file, but if you use pacman -Qv it works as a perfect substitute.

SanskritFritz commented on 2011-02-15 13:59

Vithon: thanks for the changes.

ilpianista commented on 2011-02-05 10:27

Vithon: arch could be 'any', license is an array and you could replace build() with package()

SanskritFritz commented on 2011-02-01 08:30

Thanks, msx, what you are saying it so true. My brother-in-law screwed his installation too with this, nevertheless I use the package for over a year now without any problems. It happened to me once that the mount failed, but restarting the daemon helped there as well.

msx commented on 2011-02-01 04:42

Hey everybody, this is a warning message:


I want to warn you about using this hack with *caution* and only if you know what you're doing, not like me that used this without paying attention and now I'm paying for that, lol!

That's right: I managed to totally screw-up my packages database and now repairing it requires at least the same work as install the whole system again (yuck!) so I'm going for the later looking to implement new optimization tips from the start (see for instance) and end with a more polished system.

Anyways, if you handle this cool hack with caution it works great, it's awesomely fast and it delivers what it promise, however if you do things the blind way you know where to go for the installation ISO xD


SanskritFritz commented on 2010-12-06 20:46

Hmm, actually true, what speaks against using simply pacman-cage and pacman-uncage in the package?

Anonymous comment on 2010-12-06 18:50

I am a robot. This is not an official message. AUR guidelines suggest to not include binaries. Examples:
Feel free to disregard this as you would any other comment. This robot will not post here again.