curtin vmtests warns about host apt config

Bug #1640527 reported by Ryan Harper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Triaged
Medium
Unassigned

Bug Description

when running vmtests on digglett where we have an "invalid" apt file present in /etc/apt/apt.conf.d/

curtin complains

2016-11-09 10:16:22,033 - vmtests - INFO - Target Tarball: yakkety amd64/hwe-y 20161105
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

Ryan Harper (raharper)
Changed in curtin:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ryan Harper (raharper) wrote :

From Scott:

http://paste.ubuntu.com/23451558/

=== modified file 'tools/launch'
--- tools/launch 2016-07-15 16:14:53 +0000
+++ tools/launch 2016-11-09 16:23:17 +0000
@@ -235,16 +235,17 @@

 find_apt_proxy() {
     # pick an apt proxy for the guest
- local out=""
+ local out="" r=""

     # if user set uncommon 'apt_proxy', then trust it
     [ -n "$apt_proxy" ] && echo "$apt_proxy" && return 0

     # see if the host has an apt proxy configured, and use it
     if command -v apt-config >/dev/null 2>&1; then
- out=$(apt-config shell x Acquire::HTTP::Proxy) &&
+ out=$(apt-config shell x Acquire::HTTP::Proxy 2>&1) ||
+ { r=$?; error "apt-config shell failed [$r]: $out"; return $r; }
         out=$(sh -c 'eval $1 && echo $x' -- "$out") && [ -n "$out" ] &&
- echo "$out" && return
+ echo "$out" && return
     fi

     return 1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.