skypher/paktahn

problem installing cabal2arch

Closed this issue · 1 comments

gour commented

Hi!

Here is the log of the session showing how paktahn could be improved when dealing with 'unexpected'...

[gour@gaura-nitai paktahn] paktahn cabal2arch
INFO: Cache is out of date, refreshing.
INFO: Building cache for db "local"... done.
INFO: Building cache for db "gaur"... done.
INFO: Building cache for db "core"... done.
INFO: Building cache for db "extra"... done.
INFO: Building cache for db "community"... done.
INFO: Writing cache meta data... done.
INFO: Writing cache contents... done.
1 aur/cabal2arch 0.6-1 [installed]
Create Arch Linux packages from Cabal packages
=> -----------------------------------------------------------
=> Enter numbers (e.g. '1,2-5,6') of packages to be installed.
=> -----------------------------------------------------------
[1-1] => 1
INFO: Package "cabal2arch" is already installed, skipping.
Installing package "cabal2arch" from AUR.
--2009-08-14 07:54:14-- http://aur.archlinux.org/packages/cabal2arch/cabal2arch.tar.gz
Resolving aur.archlinux.org... 208.92.232.29
Connecting to aur.archlinux.org|208.92.232.29|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 596 [application/x-tgz]
Saving to: `cabal2arch.tar.gz'

100%[======================================================================================================>] 596 --.-K/s in 0s

2009-08-14 07:54:15 (27,0 MB/s) - `cabal2arch.tar.gz' saved [596/596]

cabal2arch
cabal2arch/PKGBUILD
Edit PKGBUILD (Y/n) n

Continue building "cabal2arch" (Y/n) y
INFO: Package "gmp" is already installed, skipping.
Installing binary package "gmp" from repository "core".
warning: gmp-4.3.1-2 is up to date -- skipping
local database is up to date
INFO: Package "ghc" is already installed, skipping.
Installing binary package "ghc" from repository "extra".
warning: ghc-6.10.4-1 is up to date -- skipping
local database is up to date
Installing package "haskell-cabal" from AUR.
--2009-08-14 07:54:23-- http://aur.archlinux.org/packages/haskell-cabal/haskell-cabal.tar.gz
Resolving aur.archlinux.org... 208.92.232.29
Connecting to aur.archlinux.org|208.92.232.29|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-08-14 07:54:24 ERROR 404: Not Found.

Download via wget failed with status 1. Retry? (y/n) y
--2009-08-14 07:54:30-- http://aur.archlinux.org/packages/haskell-cabal/haskell-cabal.tar.gz
Resolving aur.archlinux.org... 208.92.232.29
Connecting to aur.archlinux.org|208.92.232.29|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-08-14 07:54:31 ERROR 404: Not Found.

Download via wget failed with status 1. Retry? (y/n) n
tar: haskell-cabal.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors

Unpacking failed with status 2. Retry? (y/n) n

Date/time: 2009-08-14-07:54An unhandled error condition has been signalled: System call error 2 (No such file or directory)

0: (SB-DEBUG::MAP-BACKTRACE #<CLOSURE (LAMBDA (SB-DEBUG::FRAME)) {1004900B09}>)[:EXTERNAL]
1: (BACKTRACE 1152921504606846975 #<SYNONYM-STREAM :SYMBOL TERMINAL-IO {10002007A1}>)
2: (TRIVIAL-BACKTRACE:PRINT-BACKTRACE-TO-STREAM #<SYNONYM-STREAM :SYMBOL TERMINAL-IO {10002007A1}>)
3: (TRIVIAL-BACKTRACE:PRINT-BACKTRACE #<SB-POSIX:SYSCALL-ERROR {10048F8F71}>)[:EXTERNAL]
4: (PAKTAHN::DEFAULT-ERROR-HANDLER #<SB-POSIX:SYSCALL-ERROR {10048F8F71}>)
5: (SIGNAL #<SB-POSIX:SYSCALL-ERROR {10048F8F71}>)[:EXTERNAL]
6: (ERROR SB-POSIX:SYSCALL-ERROR)[:EXTERNAL]
7: (SB-POSIX:SYSCALL-ERROR)
8: (PAKTAHN::CHDIR "haskell-cabal")
9: (PAKTAHN::INSTALL-AUR-PACKAGE "haskell-cabal")
10: (PAKTAHN::INSTALL-PACKAGE "haskell-cabal" :DB-NAME NIL :FORCE NIL)
11: (PAKTAHN::INSTALL-DEPENDENCIES ("gmp" "ghc" "haskell-cabal" "haskell-puremd5"))
12: (PAKTAHN::INSTALL-AUR-PACKAGE "cabal2arch")
13: (PAKTAHN::INSTALL-PACKAGE "cabal2arch" :DB-NAME "aur" :FORCE NIL)
14: (PAKTAHN::SEARCH-AND-INSTALL-PACKAGES "cabal2arch")
15: (PAKTAHN::MAIN ("cabal2arch"))
16: (PAKTAHN::CORE-MAIN)
17: ((LABELS SB-IMPL::RESTART-LISP))

debugger invoked on a SB-POSIX:SYSCALL-ERROR in thread #<THREAD "initial thread" RUNNING {100425C021}>: System call error 2 (No such file or directory)

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

(no restarts: If you didn't do this on purpose, please report it as a bug.)

(SB-POSIX:SYSCALL-ERROR)
0]

Yes, indeed. The current AUR pipe has largely undefined error handling semantics. Failure of download process should interrupt the whole chain. After that the user should be asked whether he wishes to skip the root package (i.e. the package he originally requested to install) and continue with the other root packages in the queue.