You are not logged in.

#1 2020-10-20 05:20:28

MountainX
Member
Registered: 2016-02-08
Posts: 371

[SOLVED] option to sync-refresh (-Sy) only one private repository db?

I am building a few of my own packages and adding them to a private repository. I have that repo configured in /etc/pacman.conf. During testing / learning / experimenting, I would like to be able to sync-refresh just that one repository's databases. While in the midst of testing a package I'm building, I don't want to be forced to upgrade my whole system. Yet, I do want to do things like this:

pacman -Sl $repo

However, that command will show outdated info for my repository unless I run pacman -Sy first. However, the wiki says:

When installing packages in Arch, avoid refreshing the package list without upgrading the system.

What is the right approach for exploring a private repo without disrupting the entire system? I do build my packages in a chroot, but then I install them into a private repository on my system.

EDIT: apg gave a good solution:

pacsync $repo

Last edited by MountainX (2020-10-23 03:26:54)

Offline

#2 2020-10-20 10:32:07

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] option to sync-refresh (-Sy) only one private repository db?

I have made it  a habit to run checkupdates (comes with pacman-contrib) before and after building packages.

If there are updates and I don't want to run a full pacman -Syu, I test with pacman -U instead of putting new build in my repo .

Once my system is uptodate I then add the new version to my private repo and run pacman -Syu to update all pacman db files.

Last edited by Lone_Wolf (2020-10-20 10:33:36)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2020-10-20 11:19:04

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] option to sync-refresh (-Sy) only one private repository db?

If you really want to update your local repository, you could do it behind the back of pacman. I wouldn't recommend that if you don't know what you are doing.

[ -e /var/lib/pacman/db.lck ] || sudo cp /my/repo/myaur.db /var/lib/pacman/sync/myaur.db

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2020-10-20 13:40:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: [SOLVED] option to sync-refresh (-Sy) only one private repository db?

Or just have pacman.conf specific for your private repo that doesn't list the primary repositories, then:

pacman --config /path/to/private_repo_pacman.conf -Sy

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2020-10-20 17:24:58

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] option to sync-refresh (-Sy) only one private repository db?

pacsync $repo

Offline

#6 2020-10-21 22:18:06

MountainX
Member
Registered: 2016-02-08
Posts: 371

Re: [SOLVED] option to sync-refresh (-Sy) only one private repository db?

apg wrote:
pacsync $repo

Thank you! I'm glad to know about this. Will try it today.

Offline

Board footer

Powered by FluxBB