LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices

View Poll Results: What flags do you pass to pacman to install new software?
pacman -S 10 58.82%
pacman -Sy 7 41.18%
Multiple Choice Poll. Voters: 17. You may not vote on this poll

Reply
 
Search this Thread
Old 02-25-2011, 11:55 PM   #1
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 55
Anyone else 'pacman -Sy' instead of simply 'pacman -S'-ing packages?


How do you make use of pacman to install software? Personally, I would rather update the cache before I install, to ensure that I am installing the most up-to-date software possible. However, if you don't want to that's fine too. Please explain your votes.
 
Old 02-27-2011, 12:23 AM   #2
Novartum
Member
 
Registered: Feb 2011
Location: France
Distribution: Arch Linux
Posts: 32

Rep: Reputation: 4
It's a very bad idea to use -Sy and will lead to breakage without extreme vigilance. You'll end up mixing up all kinds of old and new versions of software/libraries which can result in dependency issues for various apps. Always use the -S flag and stick to system-wide updates (-Syu) unless you know what you are doing.

EDIT: Please see this thread - https://bbs.archlinux.org/viewtopic.php?id=89328

Arch developer on pacman -Sy :
Quote:
It can create dependency issues as Arch is designed only to have the latest versions of packages installed.

e.g. enable testing and install the latest firefox with "pacman -Sy firefox"... that will pull in the new versions of libjpeg and libpng which will break a lot of your applications that still require the old version. Updating all packages avoids that issue.

Issues with graphical packages is not so bad, but people got themselves into major trouble when updating readline (broken bash...)
Quote:
On a "stable release" distro where there are no library soname bumps, "pacman -Sy <pkg>" is perfectly safe. So it is not a bug as far as pacman is concerned.

On Arch, we only support the package versions that are currently in the repos. 'pacman -Sy <pkg>' can lead to a mixture of packages that are currently in the repos and some that are outdated so leads to an unsupported system... Its use is still not a bug and in fact I use it quite often when I do not do a full update, but I know exactly what I am doing and am prepared to fix breakage.

Last edited by Novartum; 02-27-2011 at 10:21 PM.
 
Old 03-02-2011, 05:03 AM   #3
Greenfuse
Member
 
Registered: Nov 2004
Distribution: gentoo, arch centos
Posts: 164

Rep: Reputation: 22
I had mostly used pacman -Sy to synchronise so whatever I was asking for what was in the repos. It was my understanding that I needed an up-to-date list or there would be an error if I attempted to install an outdated package which was no longer there.
 
Old 03-02-2011, 05:22 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,619
Blog Entries: 2

Rep: Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076
I always update my Arch system when I start it, so I think there is no need to install software with -Sy, I always use -S.
 
Old 03-02-2011, 01:10 PM   #5
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
I put my vote for pacman -S, since I don't refresh before installing something, but really I alias bauerbill

Code:
alias in='sudo bauerbill -S --aur'
 
Old 03-03-2011, 01:51 AM   #6
jspaces
LQ Newbie
 
Registered: Apr 2009
Location: Canada
Distribution: ArchLinux
Posts: 6

Rep: Reputation: 0
I usually use "pacman -Sy".
I build quite of few local packages and the cache requires the update in order to find it in my local repository.
I run "pacman -Syu" before installing any regular package(s) or building a package thus ensuring consistency.
 
Old 03-03-2011, 06:59 AM   #7
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,204

Rep: Reputation: Disabled
I always install with -Sy. And full update with -Syyu.
 
Old 03-04-2011, 07:21 AM   #8
posixculprit
Member
 
Registered: May 2010
Posts: 136

Rep: Reputation: 42
I use `pacman -S`. Always using `pacman -Sy` reminds me of `yum`. The last time I used Fedora/CentOS yum seemed to always start by refreshing the package lists. Perhaps there are ways to prevent this from happening, I didn't stay in Fedora-land long enough to care to find out.
 
Old 03-11-2011, 06:25 AM   #9
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,221
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
@ Novartum:

Quote:
It's a very bad idea to use -Sy and will lead to breakage without extreme vigilance. You'll end up mixing up all kinds of old and new versions of software/libraries which can result in dependency issues for various apps. Always use the -S flag and stick to system-wide updates (-Syu) unless you know what you are doing.
I fully concur, installing software should NEVER be automated. You MUST keep at least the depencencies in check.

Thor
 
Old 03-17-2011, 12:44 PM   #10
IgnorantGuru
LQ Newbie
 
Registered: Feb 2011
Location: 11,000 feet
Posts: 14

Rep: Reputation: 12
I frequently do -Sy to see what updates are available. So when I do install a package, my sync is usually already updated. But I've never had a problem doing it this way. If I did, I guess a full update would cure it.

But due to the lack of package security in Arch, I recommend adding packages with paccheck:
Code:
paccheck --install PACKAGELIST
which compares the database and packages on several mirrors to help avoid compromised mirrors.

Last edited by IgnorantGuru; 03-17-2011 at 12:46 PM.
 
Old 03-22-2011, 02:36 PM   #11
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,221
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
@ IgnorantGuru,

Yo! Tnx for paccheck, which I still have to get up and running. I installed it using the "install" command, running

Quote:
sudo paccheck
gives me "paccheck not found"

I added myself to the sudoers config (did not have sudo installed) but to no avail...any tips?

Tnx!

Thor

Edit
Got something out of it:

Quote:
THERE WERE DOWNLOAD FAILURES - This indicates unresponsive mirror(s) or
files missing on the mirror(s).

WARNING: USING MORE THAN ONE MIRROR IS RECOMMENDED

System update is NOT recommended until the above issues are addressed.
aarnet failed, it seemed. But all in all a safer thing. Now, what? Do I wait unitl something happens? Anything I can tweak from my end?

Last edited by Thor_2.0; 03-22-2011 at 02:53 PM.
 
Old 03-22-2011, 02:57 PM   #12
IgnorantGuru
LQ Newbie
 
Registered: Feb 2011
Location: 11,000 feet
Posts: 14

Rep: Reputation: 12
Quote:
Originally Posted by linusr@flanders View Post
@ IgnorantGuru,

Yo! Tnx for paccheck, which I still have to get up and running. I installed it using the "install" command
Hi, You don't need sudo to run paccheck - in fact it won't let you run it as root (unless you modify the script). So first just try "paccheck". If that doesn't work, perhaps /usr/local/bin is for some reason not in your path? You could also try installing it to /usr/bin - no harm in that...

Code:
wget http://downloads.sourceforge.net/project/ig-scripts/paccheck-0.8.12.sh
sudo install paccheck-0.8.12.sh /usr/bin/paccheck
(Script Installation Instructions here)

As for why sudo said paccheck not found, maybe /usr/local/bin isn't accessible by sudo on your system. But as I said you don't need sudo for paccheck. (If you really want to run it as root for some reason, after modifying the script so it won't say "do not run as root", you could use "sudo /usr/local/bin/paccheck".)

Also note that paccheck is in the AUR, though I recommend following the verify instructions prior to installing from the AUR.

Also, paccheck does use sudo within it to run pacman. If you want to use paccheck without sudo installed, use the --no-sync option, but you will need to run these commands first as root, prior to running paccheck each time:
Code:
pacman -Sy
pacman -w --noconfirm -Su
HTH
 
1 members found this post helpful.
Old 03-22-2011, 03:03 PM   #13
IgnorantGuru
LQ Newbie
 
Registered: Feb 2011
Location: 11,000 feet
Posts: 14

Rep: Reputation: 12
Quote:
Originally Posted by linusr@flanders View Post
aarnet failed, it seemed. But all in all a safer thing. Now, what? Do I wait unitl something happens? Anything I can tweak from my end?
I would use a few (3 or 4) mirrors for best results. These can be configured in /etc/paccheck/mirrorlist, as discussed here. If you only used one mirror and the download failed, then paccheck couldn't accomplish anything.

If most of the mirrors respond and you're satisfied with the results, then you can proceed to update your system (pacman -Su). If you have any question on interpreting the results, just let me know.
 
Old 03-23-2011, 12:33 PM   #14
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,221
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Hi IgnorantGuru,

Let me take you up on your generous offer:

Quote:
If you have any question on interpreting the results, just let me know.
Ehhh, how do I make a mirrorlist for pacckeck? By the way, the thing purrs like a kitten. Real sweet, let me say this!
Okay, after following the install instructs, I still do not have a file /etc/paccheck/mirrorlist, I may need to make one...I guess.

Sorry for my (many) questions...I use Linux for a while now, but every day it challenges me...just like being married, I guess...

Thor

Last edited by Thor_2.0; 03-23-2011 at 12:37 PM.
 
Old 03-23-2011, 01:05 PM   #15
IgnorantGuru
LQ Newbie
 
Registered: Feb 2011
Location: 11,000 feet
Posts: 14

Rep: Reputation: 12
Quote:
Originally Posted by linusr@flanders View Post
Okay, after following the install instructs, I still do not have a file /etc/paccheck/mirrorlist, I may need to make one...I guess.
Good point - I'll put a note about that in the install instructions. Unless you install using the AUR, you'll need to manually create that folder and file (as root):
Code:
mkdir /etc/paccheck
touch /etc/paccheck/mirrorlist
Then edit that file as root, and copy any mirrors you want to use from /etc/pacman.d/mirrorlist (paccheck accepts mirror entries in the same format as that file).

Also, just to be clear, if no mirrors are defined in /etc/paccheck/mirrorlist or its missing, paccheck uses its built-in config which includes a few mirrors. Mirror for full compare, if desired, can be specified on the command line with --compare or can be included in mirrorlist as compare=MIRROR.

Here is the default mirrorlist distributed with paccheck in the AUR:
Code:
# Compare pacman sync and package cache to these mirrors:
# Copy desired mirrors from /etc/pacman.d/mirrorlist

Server = http://mirror.aarnet.edu.au/pub/archlinux/$repo/os/$arch
Server = ftp://ftp5.gwdg.de/pub/linux/archlinux/$repo/os/$arch
Server = http://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch

# Example - Do full package download and compare on this mirror
#           (same as --compare command line option):
# Compare = ftp://ftp5.gwdg.de/pub/linux/archlinux/$repo/os/$arch
Quote:
Sorry for my (many) questions...
No problem - others usually have similar questions so answering them in a forum is good for everyone.

Last edited by IgnorantGuru; 03-23-2011 at 01:15 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing packages/ using pacman behind Firewall (Arch Linux) sd|| Arch 9 11-25-2009 09:46 AM
pacman troubles eagle65 Arch 7 06-19-2006 12:27 AM
Pacman carlosinfl Linux - Games 4 02-13-2006 03:46 PM
pacman alaios Linux - Games 1 08-20-2005 04:34 AM
pacman error sharky Arch 3 11-08-2004 05:45 AM


All times are GMT -5. The time now is 01:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration