Use standard errno codes in return from _alpm_archive_fgets
commitcc25576f8b54b3e975949ac7991a193053b519bc
authorDan McGee <dan@archlinux.org>
Fri, 3 Jun 2011 19:37:51 +0000 (3 14:37 -0500)
committerDan McGee <dan@archlinux.org>
Fri, 3 Jun 2011 19:37:51 +0000 (3 14:37 -0500)
tree546febcbf96be529f4326b526841ca4c2ec8c9de
parente68f5d9a30671419c853b255b32b2e9d0239c9f1
Use standard errno codes in return from _alpm_archive_fgets

This allows us to not require the context (e.g. handle) when calling
this function. Also beef up the checks in the two callers of this
function to bail if the last return code is not ARCHIVE_EOF, which is
the expected value.

This requires a change to one of the pactest return codes and the
overall result of the test, but results in a much safer operating
condition whereby invalid database entries will stop the operation.

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/be_package.c
lib/libalpm/be_sync.c
lib/libalpm/util.c
test/pacman/pactest.py
test/pacman/tests/smoke002.py