file:// and ssh:// protocols do not allow for failed gets

Bug #1735014 reported by TJ on 2017-11-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debootstrap (Ubuntu)
Undecided
Unassigned

Bug Description

A user on #ubuntu reported failure of debootstrap to fetch the Release file; hanging whilst trying to deal with an InRelease file that doesn't exist when using ssh:// protocol.

scp: /opt/repository/isi/archive/15.11.6/trusty/dists/trusty/InRelease: No such file or directory
mv: cannot stat '/tmp/tmp-cache/var/lib/apt/lists/partial/debootstrap.invalid_dists_trusty_InRelease': No such file or directory
sed: can't read /tmp/tmp-cache/var/lib/apt/lists/debootstrap.invalid_dists_trusty_InRelease: No such file or directory
scp: /opt/repository/isi/archive/15.11.6/trusty/dists/trusty/InRelease: No such file or directory
mv: cannot stat '/tmp/tmp-cache/var/lib/apt/lists/partial/debootstrap.invalid_dists_trusty_InRelease': No such file or directory
sed: can't read /tmp/tmp-cache/var/lib/apt/lists/debootstrap.invalid_dists_trusty_InRelease: No such file or directory
scp: /opt/repository/isi/archive/15.11.6/trusty/dists/trusty/InRelease: No such file or directory
mv: cannot stat '/tmp/tmp-cache/var/lib/apt/lists/partial/debootstrap.invalid_dists_trusty_InRelease': No such file or directory
sed: can't read /tmp/tmp-cache/var/lib/apt/lists/debootstrap.invalid_dists_trusty_InRelease: No such file or directory

This seems to be due to a problem in functions::just_get() for both ssh:// and file:// protocols where the 'get' is assumed to have succeeded and hard-codes a "return 0".

I think these should be returning the exit code of the scp and cp commands respectively.

Suggested patch attached

Affects 16.04 and 17.10. Apparently doesn't affect 14.04.

TJ (tj) wrote :
description: updated
Changed in debootstrap (Ubuntu):
status: New → Confirmed
description: updated

The attachment "just_get(): return exit code of scp and cp" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: added: artful xenial
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers