Skip to content

Non-zero return code for launchpad (and possibly debian) #49

Open
@mariuszskon

Description

@mariuszskon

If at least one download fails for launchpad, the return code is non-zero. This does not happen for other categories like rpm. This inconsistency breaks automated scripts which use the return code unless if all errors are ignored which is probably not a good idea.

$ ./get launchpad
Will download or update for:
	* launchpad ; Requirements are met
Downloading/updating launchpad
Launchpad: Series impish
...
Getting launchpad-ubuntu-glibc-hoary
  -> Location: https://launchpad.net/ubuntu/+source/glibc/2.3.2.ds1-20ubuntu14/+build/95476/+files/libc6_2.3.2.ds1-20ubuntu14_i386.deb
  -> ID: libc6_2.3.2.ds1-20ubuntu14_i386
  -> Downloading package
Failed to download package from https://launchpad.net/ubuntu/+source/glibc/2.3.2.ds1-20ubuntu14/+build/95476/+files/libc6_2.3.2.ds1-20ubuntu14_i386.deb
Getting launchpad-ubuntu-glibc-hoary
  -> Location: https://launchpad.net/ubuntu/+source/glibc/2.3.2.ds1-20ubuntu15/+build/179595/+files/libc6_2.3.2.ds1-20ubuntu15_i386.deb
  -> ID: libc6_2.3.2.ds1-20ubuntu15_i386
  -> Already have this version, 'rm /home/mariusz/.libc-database/db/libc6_2.3.2.ds1-20ubuntu15_i386.*' to force
Launchpad: Series warty
Getting launchpad-ubuntu-glibc-warty
  -> Location: https://launchpad.net/ubuntu/+source/glibc/2.3.2.ds1-13ubuntu2.2/+build/73022/+files/libc6_2.3.2.ds1-13ubuntu2.2_i386.deb
  -> ID: libc6_2.3.2.ds1-13ubuntu2.2_i386
  -> Already have this version, 'rm /home/mariusz/.libc-database/db/libc6_2.3.2.ds1-13ubuntu2.2_i386.*' to force
Getting launchpad-ubuntu-glibc-warty
  -> Location: https://launchpad.net/ubuntu/+source/glibc/2.3.2.ds1-13ubuntu2.3/+build/179681/+files/libc6_2.3.2.ds1-13ubuntu2.3_i386.deb
  -> ID: libc6_2.3.2.ds1-13ubuntu2.3_i386
  -> Already have this version, 'rm /home/mariusz/.libc-database/db/libc6_2.3.2.ds1-13ubuntu2.3_i386.*' to force
Getting launchpad-ubuntu-glibc-warty
  -> Location: https://launchpad.net/ubuntu/+source/glibc/2.3.2.ds1-13ubuntu2/+build/57040/+files/libc6_2.3.2.ds1-13ubuntu2_i386.deb
  -> ID: libc6_2.3.2.ds1-13ubuntu2_i386
  -> Already have this version, 'rm /home/mariusz/.libc-database/db/libc6_2.3.2.ds1-13ubuntu2_i386.*' to force
$ echo $?
1

This seems to be because some of the get_all_* functions have a sleep .1 after each download, but launchpad and debian do not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions