You are not logged in.

#1 2013-09-25 16:34:09

sanjuchopra
Member
From: Gurgaon,INDIA
Registered: 2010-08-01
Posts: 33

[Solved] Pacman how to update database for some specific repository

I have two questions

1. how to update a specific repository database? when i use pacman -Sy it update all the repository ie. core , extra, community. Is there any option so that i sync database for some specific repository.I know it can be done by commenting other repos in pacman.conf. But if there is some specific flag in pacman , it would be better than changing the pacman.conf.

2.  I used Archbang earlier, in arch bang when i used pacman -Sy. only the repository which has updated since my last sync was only updating.I was getting message core is up to date, extra is upto date.But in Arch linux everyting i use pacman -Sy it update the database for all the repository.Is there any option so that pacman does not update the database for repository which is already up to date?

Last edited by sanjuchopra (2013-09-25 16:52:08)

Offline

#2 2013-09-25 16:43:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [Solved] Pacman how to update database for some specific repository

1. Don't use -Sy. Don't just update one database, software from [community] will be linked to software from [extra] and [core], so just updating [community] will cause problems. Partial updates are not supported. -Syu
2. Don't use -Sy. Pacman will already skip any databases that don't need updated exactly as you describe. The only way it will force downloading an already up-to-date database is if you use two y's: -Syyu.

Last edited by Scimmia (2013-09-25 16:44:31)

Offline

#3 2013-09-25 16:44:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Pacman how to update database for some specific repository

'pacman -Sy' doesn't update databases that are already up to date. Maybe you're using some aliases or functions instead of the /usr/bin/pacman.

$ sudo pacman -Sy
:: Synchronizing package databases...
 testing                                                                19.2 KiB   231K/s 00:00 [########################################################] 100%
 community-testing is up to date
 core                                                                  105.4 KiB   355K/s 00:00 [########################################################] 100%
 extra                                                                1444.5 KiB   679K/s 00:02 [########################################################] 100%
 community                                                            2015.3 KiB   455K/s 00:04 [########################################################] 100%
 xyne-i686 is up to date
 infinality-bundle is up to date
 infinality-bundle-any is up to date
$ sudo pacman -Sy
:: Synchronizing package databases...
 testing is up to date
 community-testing is up to date
 core is up to date
 extra is up to date
 community is up to date
 xyne-i686 is up to date
 infinality-bundle is up to date
 infinality-bundle-any is up to date

Why do you want to update just one database?

Why do you run 'pacman -Sy' and not 'pacman -Syu' in the first place?

Offline

#4 2013-09-25 16:50:29

sanjuchopra
Member
From: Gurgaon,INDIA
Registered: 2010-08-01
Posts: 33

Re: [Solved] Pacman how to update database for some specific repository

Why do you want to update just one database?
I have slow internet connection so sometime  pacman update core , and extra but stuck at community,in those cases i wanted to update some specific repository.

But i have got your points.

Offline

#5 2013-09-25 16:51:21

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Pacman how to update database for some specific repository

See https://bugs.archlinux.org/task/15561 and https://bugs.archlinux.org/task/16132


If your connection is so slow that updating just package databases is a PITA, how do you update the packages themselves?

Last edited by karol (2013-09-25 16:52:18)

Offline

#6 2013-09-25 16:54:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [Solved] Pacman how to update database for some specific repository

sanjuchopra wrote:

Why do you want to update just one database?
I have slow internet connection so sometime  pacman update core , and extra but stuck at community,in those cases i wanted to update some specific repository.

But i have got your points.

Just run pacman -Syu again, it won't re-download the databases it already downloaded.

Offline

#7 2013-09-25 17:11:37

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [Solved] Pacman how to update database for some specific repository

Some mirrors do not send (correct) HTTP headers. If pacman redownloads all of the database each time you run it, even if you have just downloaded new databases, then you should try switching mirrors.

As pointed out, partial updates are not supported and can break your system through broken dependencies. Nevertheless, if you have successfully downloaded a few and just want to get the rest then there is no danger. To do that, you can just manually download the databases in /var/lib/pacman/sync. To partially automate this, install pm2ml (pacman to metalink). Create the db download metalink in a directory with

$ pm2ml -y > /path/to/metalink

then do something like this:

$ cd /var/lib/pacman/sync
aria2c -M /path/to/metalink

If everything downloads correctly then you're done. If only some of the databases download correctly, remove them from the metalink and run the aria2c command again. If you pass it the "-c" option then it should continue downloading partially downloaded databases.

If you want fully automatic, it wouldn't be too difficult to create a script with e.g. pyalpm to keep trying until each database has been downloaded.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB