You are not logged in.

#1 2008-10-17 15:04:34

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

PLEASE READ BEFORE UPGRADING

What pacman is: Pacman is a very versatile package manager with a wide array of available switches to perform nearly every conceivable function of package management.

What pacman is not: Pacman is not an automatic system maintenance program. System maintenance is left to you, the power user. Pacman will not upgrade, modify, nor change system configuration files.
In short, Pacman will not automatically reconfigure your system for you. (This is a k.i.s.s. feature, not a flaw.)

Use the --overwrite switch sparingly, if you know exactly what you are doing.
Forcibly overwriting files can potentially cause varying degrees of breakage. There are times when it is perfectly safe, and is even recommended, in specific circumstances. Check the Arch home page for Latest News, to see if an --overwrite option is advised for a package upgrade issue.

Think before upgrading.
The power user must be prepared to set aside some time for attention to system upgrade. Arch is a bleeding-edge, rolling release, and it is designed to be used as such..However, keep in mind that system upgrade is an interactive process, sometimes requiring user intervention, which leads us to the next point,

Read before upgrading.
Check the front page Arch news, Announcement lists, and optionally the forum and Mailing Lists, before hitting enter. Bookmark them. The Arch devs and community are quite vigilant about providing information and possible known issues during an upcoming upgrade. Take advantage of these resources.

Read pacman's output while upgrading.
The devs have placed pertinent information in the package install output for a reason. The 'fire and forget' mentality may be ok for some users, but if you are still learning the ropes, it is safest to pay more than the usual attention to pacman's output.

Most importantly...
Using these guidelines will prepare you for more seamless upgrades in the future.
The more often you perform upgrades, the faster you will become accustomed to them, and the general process of Arch system maintenance. Arch does not require an unbalanced amount of 'work' to keep it running, merely an eye for details that will be acquired by good upgrading practices.

We must walk before we can run. Therefore, get familiar with pacman (read the man page), system upgrade and maintenance from a 'bottom-to-top' approach as opposed to a 'top-down' approach.

Enjoy, and welcome to Arch.

Last edited by WorMzy (2020-11-05 23:27:52)

Offline

#2 2008-10-17 16:01:38

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: PLEASE READ BEFORE UPGRADING

and suscribe to the arch-announce mailing list

Offline

#3 2008-10-17 16:13:16

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: PLEASE READ BEFORE UPGRADING

Read also about downgrading packages.

Offline

#4 2008-10-17 17:06:47

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

Re: PLEASE READ BEFORE UPGRADING

Great post, Misfit!

Could you also add something to the effect of "Check the front page news, or arch-announce lists frequently" ?

Offline

#5 2008-10-17 17:41:11

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: PLEASE READ BEFORE UPGRADING

phrakture wrote:

Great post, Misfit!

Could you also add something to the effect of "Check the front page news, or arch-announce lists frequently" ?

Thanks...
...and done.

Offline

#6 2008-10-17 18:05:12

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: PLEASE READ BEFORE UPGRADING

Maybe emphasize SUBSCRIBE TO THIS MAILING LIST IF YOU ENABLE [TESTING] in the "Read before upgrading" section.


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#7 2008-10-17 18:08:46

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

Re: PLEASE READ BEFORE UPGRADING

If you've time, then subscribe to it anyway (even if not using [testing]) since it
gives a look-out on the possible transitions in the next fortnight into [extra] or
[core], so you get to know what's coming before a pacman -Syu.

Offline

#8 2008-10-17 19:06:04

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: PLEASE READ BEFORE UPGRADING

Misfit138 wrote:

Read before upgrading
Check the front page Arch news, Announcement lists, and optionally the forum and Mailing Lists, before hitting enter. Bookmark them. The Arch devs and community are quite vigilant about providing information and possible known issues during an upcoming upgrade. Take advantage of these resources.

Absolutely the best advice. While every possible issue might not make it in here, pretty much anything major and obvious does (klibc upgrade, etc.). My upgrade command:

[nogoma@alfheim[3268]:~]% alias|grep pacup
pacup='pacup.rb && sudo pacman -Suy'

Where pacup.rb is a simple script that pulls and displays any announcements from the Latest News RSS feed since my last full system upgrade. Great for catching any announcements I missed in the forums or mailing lists!


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#9 2008-10-17 20:16:48

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: PLEASE READ BEFORE UPGRADING

Great post big_smile


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#10 2008-10-17 21:02:01

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: PLEASE READ BEFORE UPGRADING

And yet people still ask the same questions... Ahhh, the pointlessness of life...
Perhaps this thread will be read by only those that search before posting anyway wink

Offline

#11 2008-10-18 04:01:22

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: PLEASE READ BEFORE UPGRADING

It's an awesome set of pacman rules, Misfit. I like it. Hopefully people will get a better idea of using pacman before commenting.

While you are at it, you were mentioning that "Pacman will not upgrade, modify, nor change system configuration files." Shouldn't you be more specific, like adding more information about configuring with .pacnew/.pacsave files? I can see what you are originally talking about, but some others might not, especially new users imo.

Offline

#12 2008-10-18 05:19:02

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: PLEASE READ BEFORE UPGRADING

nogoma: can you post the code the pacup.rb script?

thanks, I'd like to implement it.

Offline

#13 2008-10-18 13:27:27

pete-the-meat
Member
From: Scotland
Registered: 2008-08-14
Posts: 26

Re: PLEASE READ BEFORE UPGRADING

I wish I had read this yesterday before I did -Syuf - how much easier my life would have been sad

lesson learnt


That looks like a much better way of trying to do what I was trying to do than trying to do what I was trying to do...

Offline

#14 2008-10-18 14:05:36

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: PLEASE READ BEFORE UPGRADING

Sticky?


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#15 2008-10-18 14:19:32

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: PLEASE READ BEFORE UPGRADING

nogoma wrote:

My upgrade command:

[nogoma@alfheim[3268]:~]% alias|grep pacup
pacup='pacup.rb && sudo pacman -Suy'

Where pacup.rb is a simple script that pulls and displays any announcements from the Latest News RSS feed since my last full system upgrade. Great for catching any announcements I missed in the forums or mailing lists!

Very useful.. Better then my way of checking my feed reader before doing an upgrade lol
Can you show us the code?


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#16 2008-10-18 15:50:04

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: PLEASE READ BEFORE UPGRADING

rson451 wrote:

Sticky?

Stickied. wink

Offline

#17 2008-10-20 04:01:51

clrtxt
Member
Registered: 2008-10-19
Posts: 3

Re: PLEASE READ BEFORE UPGRADING

I've updated the relevant section of the Beginner's Guide to include your advice about reading the News and Mailing Lists before upgrading.  Good stuff smile

Last edited by clrtxt (2008-10-20 04:02:30)

Offline

#18 2008-10-20 15:55:20

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: PLEASE READ BEFORE UPGRADING

Dieter@be wrote:
nogoma wrote:

My upgrade command:

[nogoma@alfheim[3268]:~]% alias|grep pacup
pacup='pacup.rb && sudo pacman -Suy'

Where pacup.rb is a simple script that pulls and displays any announcements from the Latest News RSS feed since my last full system upgrade. Great for catching any announcements I missed in the forums or mailing lists!

Very useful.. Better then my way of checking my feed reader before doing an upgrade lol
Can you show us the code?

Updated version found a few posts down
Sure, although it's pretty simplistic. Particularly, I wrote this for my personal use, so stuff like the pacman log path is hard coded, and it assumes the log messages are in english. Also, it just goes from the last time of you -Syu'd, regardless of whether you cancelled the upgrade or not. Feel free to tailor to your own needs! Only requirement is ruby.

#!/usr/bin/env ruby
require 'rss'
require 'time'

last_update = File.open('/var/log/pacman.log', 'r') do |f|
  Time.parse f.readlines.select { |i| i =~ /starting full/ }.last
end

feed = RSS::Parser.parse('http://www.archlinux.org/feeds/news/')
items = feed.items.select { |i| i.pubDate >= last_update }
if items.count == 0
  puts "No news items since last upgrade at #{last_update}"
else
  items.each do |fi|
    puts "#{fi.title.chomp} @ #{fi.pubDate}\n\t#{fi.description}"
  end
end

Last edited by nogoma (2008-12-05 13:54:57)


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#19 2008-11-15 13:05:26

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

Re: PLEASE READ BEFORE UPGRADING

Suggestion:
Change this post's subject to "ABOUT PACMAN AND UPGRADES" and include the content of this post: http://bbs.archlinux.org/viewtopic.php?id=56373

Last edited by Xyne (2008-11-15 13:05:37)


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

Offline

#20 2008-11-15 13:55:18

ArchArael
Member
Registered: 2005-06-14
Posts: 504

Re: PLEASE READ BEFORE UPGRADING

@nogoma Thank you...your script is really useful. smile

Offline

#21 2008-11-15 14:05:55

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: PLEASE READ BEFORE UPGRADING

Sheez, next thing you'll be asking us to post bugreports before getting that clever bot at bbs.archlinux.org to do our troubleshooting for us...

Offline

#22 2008-11-15 14:08:20

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: PLEASE READ BEFORE UPGRADING

nogoma wrote:

Sure, although it's pretty simplistic. Particularly, I wrote this for my personal use, so stuff like the pacman log path is hard coded, and it assumes the log messages are in english. Also, it just goes from the last time of you -Syu'd, regardless of whether you cancelled the upgrade or not. Feel free to tailor to your own needs! Only requirement is ruby.

It's maybe simple, but does the job just fine for me smile Thanks
One little suggestion: maybe you could incorporate a 'safety buffer', eg instead of making last_update the exact time of the last update, you could make it the time of the last update minus one day/week or so.  Because messages from shortly before the last upgrade could still be relevant.  Also because the time in the logfile is not the exact moment you ran pacup.rb, you could miss a message because of this race-condition.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#23 2008-11-16 21:44:19

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

Re: PLEASE READ BEFORE UPGRADING

Actually, it would be much better to post an edited version of Misfit's OP (perhaps under a slightly different name), to close the topic immediatedly, and to sticky that. After all, this is directly adressed to people who simply don't read enough. They will read even less when you expect them to crawl through >20 comments.

Offline

#24 2008-11-26 07:02:48

kaola_linux
Member
From: Bacolod City/Philippines
Registered: 2008-09-23
Posts: 513

Re: PLEASE READ BEFORE UPGRADING

Very informative....I always upgrade my arch system if updates are available...heheh

So far no crash or whatsoever, but this post changed my mind...Thanks alot...


Netbook (Acer Aspire One 110 || 160gb SATA HD || 1.5gb ram): archlinux i686 / KDEmod 4.3
Registered Linux User # 481212 / Machine Registration # 390468
"In a world without walls and fences, who needs windows and gates?"

Offline

#25 2008-12-05 13:53:45

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: PLEASE READ BEFORE UPGRADING

Found this thread again after it was linked from yet another 'please have pacman tell me what's going on' thread; here's the latest version of my pacup.rb (incorporating a couple of suggestions from up above):

#!/usr/bin/env ruby
require 'rss'
require 'time'

DEFAULT_LOG_FILE = '/var/log/pacman.log'
FEED_URL = 'http://www.archlinux.org/feeds/news/'
BUFFER_MINS = 60*24
@log = nil

def log_file
  if @log.nil?
    @log = DEFAULT_LOG_FILE
    File.open('/etc/pacman.conf', 'r') do |f|
      lf = f.readlines.select { |i| i !~ /^#/ and i =~ /LogFile/ }
      unless lf.empty?
        _log = lf[0].split(/=/)[1].strip
        @log = _log if File.exists? _log and File.readable? _log
      end
    end
  end
  @log
end

unless File.exists? log_file and File.readable? log_file
  raise "Unable to locate or read log file #{log_file}"
end

last_update = File.open(log_file, 'r') do |f|
  Time.parse f.readlines.select { |i| i =~ /starting full/ }.last
end

last_update = last_update - 60*BUFFER_MINS

feed = RSS::Parser.parse(FEED_URL)
items = feed.items.select { |i| i.pubDate >= last_update }
if items.count == 0
  puts "No news items since #{last_update}"
else
  items.each do |fi|
    puts <<EOI
#{fi.title.chomp} @ #{fi.pubDate}
#{fi.description}

EOI
  end
end

You can set a window of time to include log messages for (BUFFER_MINS, set to a days worth of messages before your last full upgrade), and it now parses pacman.conf to find the location of your logfile if you've set a custom one. Still english-specific, though...


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

Board footer

Powered by FluxBB