You are not logged in.

#1 2010-08-17 08:48:13

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Don't Blame Pacman, a Cautionary Tale

I couldn't sleep so I got up to pacman -Syu. I was confused when I saw this:

$ pacman -Q ghc
ghc 6.12.1-4

$ pacman -Sup
:: Starting full system upgrade...
error: failed to prepare transaction (could not satisfy dependencies)
:: haskell-mtl: requires ghc=6.12.1
:: haskell-utf8-string: requires ghc=6.12.1
:: haskell-x11-xft: requires ghc=6.12.1
:: xmonad: requires ghc=6.12.1

At first I thought my package db was somehow corrupted (I've been using clyde lately). When I decided it was ok I moved on to blaming pacman because it's not smart enough to realize that in this case v6.12.1-4 is the same as v6.12.1; I was amazed that there were no bug reports for this yet (it's 2AM at this point). I decided I'd play it cool and write a patch to fix this.

After 2 hours cloning pacman from git, getting it to build and then hunting for the bug in its source, I ran

$ pacman -Sup --debug | grep ghc
debug: new version of 'ghc' found (6.12.1-4 => 6.12.3-1)
debug: adding package ghc-6.12.3-1 to the transaction targets
error: failed to prepare transaction (could not satisfy dependencies)
debug: checkdeps: package ghc-6.12.3-1
debug: checkdeps: package ghc-6.12.3-1
debug: checkdeps: transaction would break 'ghc=6.12.1' dependency of 'haskell-mtl'
debug: checkdeps: transaction would break 'ghc=6.12.1' dependency of 'haskell-utf8-string'
debug: checkdeps: transaction would break 'ghc=6.12.1' dependency of 'haskell-x11-xft'
debug: checkdeps: transaction would break 'ghc=6.12.1' dependency of 'xmonad'
:: haskell-mtl: requires ghc=6.12.1
:: haskell-utf8-string: requires ghc=6.12.1
:: haskell-x11-xft: requires ghc=6.12.1
:: xmonad: requires ghc=6.12.1

That made it obvious there was no bug to start with; pacman wasn't comparing version 6.12.1 against 6.12.1-4 but rather 6.12.3-1.

Kids, when you debug, always blame the data before the code.

Offline

#2 2010-08-17 09:02:05

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,411
Website

Re: Don't Blame Pacman, a Cautionary Tale

man pacman wrote:

Bugs? You must be kidding, there are no bugs in this software.

tongue

Offline

#3 2010-08-17 09:34:22

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

Re: Don't Blame Pacman, a Cautionary Tale

Hmm, the lesson here is:

"Don't judge a pacman by it's output."

Last edited by Acecero (2010-08-17 09:35:16)

Offline

#4 2010-08-18 18:34:40

dibon
Member
From: Norway
Registered: 2010-07-05
Posts: 4

Re: Don't Blame Pacman, a Cautionary Tale

I'm kinda new to Arch Linux and has this exact problem.

Is there a way to do the upgrade, or do I need to wait for the dependencies to sort out in newer versions?

If not, how can I at least upgrade other packets which doesn't have dependency problem? Pacman just quits when it notices the dep. problem as stated by OP.

Offline

#5 2010-08-18 18:46:36

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Don't Blame Pacman, a Cautionary Tale

dibon wrote:

how can I at least upgrade other packets which doesn't have dependency problem? Pacman just quits when it notices the dep. problem as stated by OP.

//blue/0/~/ grep IgnorePkg /etc/pacman.conf
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg   = ghc haskell-mtl haskell-utf8-string haskell-x11 haskell-x11-xft

Last edited by brisbin33 (2010-08-18 18:47:00)

Offline

#6 2010-08-18 20:19:35

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Don't Blame Pacman, a Cautionary Tale

Ignoring ghc only will work.

Offline

Board footer

Powered by FluxBB