You are not logged in.

#1 2006-05-03 06:38:34

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

What's the deal with pacman -Sy?

I've been wondering why it's not automated? Is there any reason not wanting to have latest repos (besides the time it takes to update)? And what does it really do? Just fetching the newer versions or new pacakges?

/Richard


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#2 2006-05-03 07:52:26

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: What's the deal with pacman -Sy?

Looking after multiple machines at our Cybercafé then I've already got the latest lists and packages on one, so subsequent PC updates don't even need a connection to the outside world.

Offline

#3 2006-05-03 08:00:16

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: What's the deal with pacman -Sy?

riwa wrote:

I've been wondering why it's not automated? Is there any reason not wanting to have latest repos (besides the time it takes to update)? And what does it really do? Just fetching the newer versions or new pacakges?

/Richard

Because of the time it takes. When you've got quite a few repos, it can take a little while. I generally dont want to be waiting for it when i'm trying to install a program quickly or I've already -sy'ed

James

Offline

#4 2006-05-03 11:00:58

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: What's the deal with pacman -Sy?

Er... to me the question is "why doesn't my arch computer automatically update?", which hasn't been answered yet.

Of course if you want it to, you can set it as a cron job.

The main reason it isn't automatic doesn't happen is the process is still interactive sometimes and things go wrong and its good to know what's happening. I think most of us would like to remain in control of the process; I only update when I know I have time to fix things, for example.

Dusty

Offline

#5 2006-05-03 11:06:28

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: What's the deal with pacman -Sy?

Because if it were automatic, Arch would've been called Arch XP. tongue


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#6 2006-05-03 12:06:53

syg00
Member
Registered: 2006-01-11
Posts: 31

Re: What's the deal with pacman -Sy?

FUBAR wrote:

Because if it were automatic, Arch would've been called Arch XP. tongue

... or maybe some Canonical variant.

Offline

#7 2006-05-03 14:11:28

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: What's the deal with pacman -Sy?

Most of the time I rely on -S instead of -Sy because i just don't feel like waiting.  Besides that, I don't update a lot.

Offline

#8 2006-05-03 18:36:07

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: What's the deal with pacman -Sy?

iphitus wrote:

Because of the time it takes.

Thanks. Was just wondering if there was anything I've missed.

Now to my real question, which most people bypassed thanks to my genius way of expressing myself in english.  :oops:

What does it do? Why should I ever do a pacman -Sy? (To not let the question slip away again!)


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#9 2006-05-03 21:08:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: What's the deal with pacman -Sy?

riwa wrote:

What does it do? Why should I ever do a pacman -Sy? (To not let the question slip away again!)

pacman -Sy will update the file lists for what packages a repo contains.  This takes some time, as you can see.  Using just 'pacman -S' does not refresh those files.  It assumes you have the most recent ones.

Take for instance:

pacman -Sy
pacman -S coreutils
pacman -S grub
pacman -S lilo
pacman -S screen
pacman -S pacman

Now compare that to:

pacman -Sy coreutils
pacman -Sy grub
pacman -Sy lilo
pacman -Sy screen
pacman -Sy pacman

The second will take *much* longer.  The point is that you don't need to update the DB files every time you grab a package.  In fact, most of the repos change once or twice a day.  If you install 30 packages in one day, would you want to resync every repo when you *know* things haven't changed?

Offline

#10 2006-05-03 21:24:42

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: What's the deal with pacman -Sy?

So I'm just refreshing my list? Thanks. And no, I wouldn't want to update if I downloaded 30 packages/day. However since I many days don't download any, I've found myself (unless fetching several packages in a row) pretty much always using -Sy. I have a really fast connection (100 mb) but to start downloading can sometimes take a long while. I've been wondering if there's a way to use only some repos without changing the configuration file. That would probably reduce my download speed considerably (I usually download at 3000+ kb/s from the swedish servers).


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#11 2006-05-03 23:53:01

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: What's the deal with pacman -Sy?

ok, the -y switch only resyncs to the database at your mirror. That is it downloads all the information given for each package which you need to be able to download and install a package correctly (think matching md5sums and correct package versions to exactly what should be in that mirror). So basically what phrakture was saying is if you install packages from the repo, use the -y switch at least once every 12 hours or so to be sure your database matches whats on the server.

Offline

#12 2006-05-04 00:21:23

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: What's the deal with pacman -Sy?

man pacman

Mmmm I love manpages.  I usually run pacman -Syu to update, but just pacman -S to install, I don't like waiting.

Offline

#13 2006-05-04 00:22:26

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: What's the deal with pacman -Sy?

You could always sort the lists which contains mirrors of the repositories either by hand or with a script. The lists are stored in /etc/pacman.d/

Some scripts that I am aware of:
sortmirrors.pl - sorts mirrors by ping-time and restores the list. (I guess this still is the offical script, you probably have it)repository_test.py - sorts mirrors by time it takes to download a specific file, doesn't restore the list, just prints out the result.
All this could be found in the following thread (+ some more):
http://bbs.archlinux.org/viewtopic.php? … sitorytest

Offline

#14 2006-05-04 08:09:06

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: What's the deal with pacman -Sy?

I made a daily cronjob for pacman -Sy and never use -y when I'm installing a package anymore.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#15 2006-05-04 08:54:57

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: What's the deal with pacman -Sy?

Well I have them sorted and always download from my country server. The thing I would like is some way to temporarly enable a repos. For example:

pacman -S --enable-community pkg_list

to use community for the moment. Then I could remove unstable and community from my repos list and decrease my regular waiting time a lot.


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#16 2006-05-04 09:11:46

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: What's the deal with pacman -Sy?

You could do this with an alternate config file that has the community repo enabled, like 'pacman --config /etc/pacman-comm.conf -Sy' (an alias might be handy)


1000

Offline

#17 2006-05-18 18:16:01

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: What's the deal with pacman -Sy?

I created an alternate pacman.conf file and reseted my regular one (to exclude community and instable). Then I did a normal -Syu (without the unstable/community repos) and MAN did it take time. It's still running (maybie 15 minutes or so) and I'll post the full output once it's done. I've been wondering if it's possible to have pacman breaking the connection to the repos if it doesn't respond after a set amount of time (so it just skips to the next in the list).

[edit]
Here's the output:

200034/home/riwa/# pacman -Syu
:: Synchronizing package databases...
connect: Connection timed out
error: cannot connect to ftp.ds.hj.se

failed downloading /current/os/i686/current.db.tar.gz from archlinux.antesis.org : HTTP/1.1 404 Not Found

connect: No route to host
error: cannot connect to ftp.rez-gif.supelec.fr
error: could not cwd to /pub/archlinux/current/os/i686/: 550 Failed to change di rectory.

 current                  [################] 100%      66K    14.9K/s  00:00:04
connect: Connection timed out
error: cannot connect to ftp.ds.hj.se

failed downloading /extra/os/i686/extra.db.tar.gz from archlinux.antesis.org: HT TP/1.1 404 Not Found

connect: No route to host
error: cannot connect to ftp.rez-gif.supelec.fr
error: cannot connect to ftp.archlinux.de
 extra                    [################] 100%     250K   161.8K/s  00:00:01

Targets: artwiz-fonts-1.3-3 ghostscript-8.15.2-1 hwd-4.8.2-1 pcre-6.6-3
         ttf-ms-fonts-1.3-8 xscreensaver-4.24-1

Total Package Size:   16.9 MB

Proceed with upgrade? [Y/n] Y

:: Retrieving packages from extra...
connect: Connection timed out
error: cannot connect to ftp.ds.hj.se

failed downloading /extra/os/i686/artwiz-fonts-1.3-3.pkg.tar.gz from archlinux.a ntesis.org: HTTP/1.1 404 Not Found


failed downloading /extra/os/i686/hwd-4.8.2-1.pkg.tar.gz from archlinux.antesis. org: HTTP/1.1 404 Not Found


failed downloading /extra/os/i686/ttf-ms-fonts-1.3-8.pkg.tar.gz from archlinux.a ntesis.org: HTTP/1.1 404 Not Found

connect: No route to host
error: cannot connect to ftp.rez-gif.supelec.fr
error: cannot connect to ftp.archlinux.de
 artwiz-fonts-1.3-3       [################] 100%      37K     2.2K/s  00:00:16
 hwd-4.8.2-1              [################] 100%      13K     3.1K/s  00:00:04
 ttf-ms-fonts-1.3-8       [################] 100%    3375K    96.5K/s  00:00:34

:: Retrieving packages from current...
connect: Connection timed out
error: cannot connect to ftp.ds.hj.se

failed downloading /current/os/i686/ghostscript-8.15.2-1.pkg.tar.gz from archlin ux.antesis.org: HTTP/1.1 404 Not Found


failed downloading /current/os/i686/pcre-6.6-3.pkg.tar.gz from archlinux.antesis .org: HTTP/1.1 404 Not Found


failed downloading /current/os/i686/xscreensaver-4.24-1.pkg.tar.gz from archlinu x.antesis.org: HTTP/1.1 404 Not Found

connect: No route to host
error: cannot connect to ftp.rez-gif.supelec.fr
error: cannot connect to ftp.archlinux.de
 ghostscript-8.15.2-1     [################] 100%    5789K   383.2K/s  00:00:15
 pcre-6.6-3               [################] 100%     273K     6.3K/s  00:00:43
 xscreensaver-4.24-1      [################] 100%    7823K   376.6K/s  00:00:20

checking package integrity... done.
loading package data... done.
checking for file conflicts... done.
upgrading artwiz-fonts... done.
Updating font cache... done.
upgrading ghostscript... done.
upgrading hwd... done.
Run 'hwd -u' to update pci, usb, and pcmcia tables.

upgrading pcre... done.
upgrading ttf-ms-fonts... done.
extracting fonts... done.
rebuilding font cache... done.
upgrading xscreensaver... done.

If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#18 2006-05-18 22:45:51

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: What's the deal with pacman -Sy?

Several mirrors in /etc/pacman.d/ are broken so look at http://wiki.archlinux.org/index.php/Mirrors and use one reliable server near to you. I've never used the Include lines in pacman.conf and always handpicked a server instead.


1000

Offline

Board footer

Powered by FluxBB