You are not logged in.

#1 2007-12-29 05:42:25

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

How to Use CacheDir in pacman(solved by Ramses DE Norre)

Desire to load to a cachedir located in flash drive from pacman download.

What is the command line for such operation and where might the pacman.conf be modified?

Last edited by lilsirecho (2007-12-29 21:55:57)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2007-12-29 07:56:37

gradgrind
Member
From: Germany
Registered: 2005-10-06
Posts: 921

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

See pacman manpage:

--cachedir dir
              Specify   an   alternative   package  cache  location  (default  is
              "/var/cache/pacman/pkg/"). This should not be used unless you  know
              what you are doing.

You don't need to modify pacman.conf, it has nothing to do with the cache dir.

Offline

#3 2007-12-29 17:18:56

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

gradgrind wrote:

See pacman manpage:

--cachedir dir
              Specify   an   alternative   package  cache  location  (default  is
              "/var/cache/pacman/pkg/"). This should not be used unless you  know
              what you are doing.

You don't need to modify pacman.conf, it has nothing to do with the cache dir.

Could you elaborate? What you are saying is confusing.

You can specify the cache dir either with CacheDir in pacman.conf, or with the --cachedir option.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#4 2007-12-29 17:28:54

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

This is the problem with the cachedir in command line use...

[root@n6re ~]# pacman -S cachedir /media/disk/cache/pkg thunderbird
error: 'cachedir': not found in sync db

Something isn't right....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2007-12-29 17:41:49

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

Another shot at it.....

[root@n6re ~]# pacman -Swf cachedir /media/disk/Cache/pkg' thunderbird
>

EDIT:  The pacman entry is correct...I don't know what I am doing!!!!!!!  Will pacman work correctly with a flash drive directory?

EDIT:  Is there a ...repo-add....?

Pacman is full of non-examples of how to....

Last edited by lilsirecho (2007-12-29 18:05:24)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#6 2007-12-29 21:08:09

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

lilsirecho wrote:
[root@n6re ~]# pacman -S cachedir /media/disk/cache/pkg thunderbird
error: 'cachedir': not found in sync db

Something isn't right....

You're telling pacman to install the packages cachedir, /media/disk/cache/pkg and thunderbird, options and flags are denoted with dashes. Try this line:

pacman --cachedir /media/disk/cache/pkg -S thunderbird

I also have the feeling that you are actually looking for this:

pacman -U /media/disk/cache/pkg/<thunderbird package filename>

Last edited by Ramses de Norre (2007-12-29 21:09:11)

Offline

#7 2007-12-29 21:40:13

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

Ramses de Norre;

Thanks for reply.

pacman -U.....used for local repo installs.

My need is for loading the repo (cachedir) in a flash drive from pacman sources; core,extra,community.....

At present, I load pacman to normal cache in /var/cache/pacman/pkg with ..pacman -Sw...  No install.

Then I copy to flash drive cache as .pkg.tar.gz and install from that source using ...pacman -Udf.... as I find need for the pkg.

This is used in conjunction with a Live flash drive install of FaunOS to reduce the size of the flash drive install device but yet provide the quick install of any package that is in another flash drive containing the .pkg.tar.gz.

Thus, I wish to eliminate the copy step and install directly to a cachedir but there is no info on how to do this in man pacman...just a stupid remark about knowing what you are doing!!!

Eventually, I would expect to use the same flash drive for both  OSinstall and pacman cache install after boot-up.

Thus, I have the hope that cachedir will be the vehicle to accomplish the caching of packages not yet installed.

There is no source that describes its use!!!!%%%$$$###@@@**!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2007-12-29 21:55:06

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

Ramses de Norre;

Wish to thank you for the other posting regarding the cachedir.

The following entry in terminal resulted in the correct transfer of thunderbird...

[root@n6re ~]# pacman --cachedir '/mnt/sda1_rmv/Cache/pkg' -Sw thunderbird
resolving dependencies... done.

Targets: thunderbird-2.0.0.9-2

Total Package Size:   10.63 MB

Proceed with download? [Y/n] y
:: Retrieving packages from extra...
 thunderbird               10.6M   84.8K/s 00:02:08 100%
checking package integrity... done.
[root@n6re ~]#

The thunderbird package resides in the flash drive pkg folder.

Many thanks for the insight into the cachedir arrangement in pacman commands.

This is the first I have seen regarding cachedir and it is great!!

Happy New Year!!!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#9 2007-12-30 06:51:03

gradgrind
Member
From: Germany
Registered: 2005-10-06
Posts: 921

Re: How to Use CacheDir in pacman(solved by Ramses DE Norre)

shining wrote:
gradgrind wrote:

See pacman manpage:

--cachedir dir
              Specify   an   alternative   package  cache  location  (default  is
              "/var/cache/pacman/pkg/"). This should not be used unless you  know
              what you are doing.

You don't need to modify pacman.conf, it has nothing to do with the cache dir.

Could you elaborate? What you are saying is confusing.

You can specify the cache dir either with CacheDir in pacman.conf, or with the --cachedir option.

Thanks for the clarification - I hadn't got as far as the pacman.conf man-page (oops). I imagine this might be a more comfortable way of doing it in some cases.

Offline

Board footer

Powered by FluxBB