Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#26663 - [ABS] In abs script, empty mirrorlist array causes error.

Attached to Project: Arch Linux
Opened by David J. Haines (dhaines) - Friday, 28 October 2011, 13:49 GMT
Last edited by Dave Reisner (falconindy) - Friday, 07 September 2012, 16:52 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If the abs cannot fill the mirrorlist array, it returns the following:


==> Downloading tarballs...
==> core...
/usr/bin/abs: line 183: [: -ne: unary operator expected
tar (child): core.abs.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

instead of what it should:


==> Downloading tarballs...
==> core...
==> ERROR: Download failed
==> extra...
==> ERROR: Download failed
==> community...
==> ERROR: Download failed
==> multilib...
==> ERROR: Download failed

The reason for this is that the local variable "ret" is created, but never assigned a value, if the for loop that steps through the mirrorlist never runs, i.e. the mirrorlist is empty. After the for loop, ret is tested and, because it has no value, abs throws the above error.

Either ret should be assigned a value right off the bat (not 0, as that would defeat the download failure test) or the download failure test should be "if [ -z $ret ] || [ $ret -ne 0 ]".
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 07 September 2012, 16:52 GMT
Reason for closing:  Fixed
Additional comments about closing:  extra/abs-2.4.4

Loading...