Page 1 of 1

How to add local repository (Arch)

Posted: 07 Dec 2011, 03:42
by dedanna1029
The Arch wiki is horridly confusing on this. My computer is offline right now, so I've downloaded updates from school onto a usb stick - a folder for each, core, extra, and community. I also copied/pasted the wiki instructions to add a local repo, but none of it is working. I've commented out the Include /etc/pacman.d/mirrorlist lines from /etc/pacman.conf file. Now, where exactly do I put those folders for the local repos, and how? I've tried in each individual section of pacman.conf, I've tried them in the [custom] section for them, I always get errors on pacman -Syu. Thanks.

Re: How to add local repository (Arch)

Posted: 07 Dec 2011, 03:49
by dedanna1029
Fyi, on this I've even tried switching to each folder and doing a 'pacman -U *.*, and that errors out. It throws back a libarchive error. Is the format of the usb stick (FAT - has to be for school) doing this maybe? If so I'm up the creek. The school's computers are all Windows, with the exception of one Mac. Thanks.

Re: How to add local repository (Arch)

Posted: 07 Dec 2011, 05:26
by dedanna1029
Update: I'd misinterpretted a few things at the wiki. First I had to move the files onto my hard drive, then move all the pkg.tar.xz files into one folder. Then, I moved the core.db.tar.gz file in with them, and ran: 'repo-add /path/to/that/folder/core.db.tar.gz /path/to/that/folder/*.pkg.tar.xz'. That got the repo added, but I'm still loose on where and how to put it into pacman.conf. Thanks.

Re: How to add local repository (Arch)

Posted: 07 Dec 2011, 12:09
by viking60
This might help:
https://wiki.archlinux.org/index.php/Of ... f_Packages

Especially the part where you add your folder in pacman.conf

Code: Select all

[folder]
Server = file:///home/you/folder

And then syncronizing it with:

Code: Select all

pacman -Sy

Re: How to add local repository (Arch)

Posted: 08 Dec 2011, 03:30
by dedanna1029
That's pretty much what I've done and am still getting errors, so have screwed it up somewhere down the road. Pacman is still looking for each repo, and they're all commented out in pacman.conf but the one that I created. *sigh - Maybe something will click on it later. Thanks.

Re: How to add local repository (Arch)

Posted: 08 Dec 2011, 12:31
by viking60

Re: How to add local repository (Arch)

Posted: 09 Dec 2011, 02:31
by dedanna1029
Yeah, that's what I used, was those instructions.
The name of the db.tar.gz file is the repository name.

Is it just written like, "core.db.tar.gz", or just "core", or "core.db" (which it seems to want, but core.db.tar.gz was used)? And again, where in pacman.conf is it added?

Got examples? Thanks.

Re: How to add local repository (Arch)

Posted: 09 Dec 2011, 12:58
by viking60
Go three posts up and there you will see how to add in pacman.conf.
You set the name of your folder in []
[dedanas_Arch_folder]
and patch

Add it before [testing] in pacman.conf

As for the rest I can not say it any better than the Arch Wiki:
Simply store all of the built packages to be included in the repository in one directory, and execute the following command (where repo is the name of the custom repository):

Code: Select all

$ repo-add /path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz

Re: How to add local repository (Arch)

Posted: 10 Dec 2011, 17:47
by dedanna1029
viking60 wrote:Add it before [testing] in pacman.conf

This is the part I wanted to know. Thanks.

viking60 wrote:

Code: Select all

$ repo-add /path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz

Dun did. It's not working but probably because I have it in the wrong place in pacman.conf, and possibly in the wrong way, too.

Thanks a bunch. This helps.

Re: How to add local repository (Arch)

Posted: 15 Feb 2012, 10:08
by dedanna1029
Ok, so I am about to blow your mind here. Get out the guns and start shooting me.

Code: Select all

su
password
cd /path-to-where-updates-are
pacman -U *.*


Takes a few tries to weed out the ones you don't need, but it works very simply... You don't really *need* to add it as a repo...