apt: fix deb=file with --diff does not show diff on upgrades (#3826)
This commit is contained in:
parent
a85d9930c5
commit
b7265d7b28
1 changed files with 2 additions and 2 deletions
|
@ -381,8 +381,8 @@ def parse_diff(output):
|
||||||
# check for start marker from apt-get
|
# check for start marker from apt-get
|
||||||
diff_start = diff.index('Reading state information...')
|
diff_start = diff.index('Reading state information...')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
# show everything
|
||||||
diff_start = -1
|
diff_start = -1
|
||||||
diff.insert(0, 'Unexpected apt output for --diff. Showing everything:')
|
|
||||||
try:
|
try:
|
||||||
# check for end marker line from both apt-get and aptitude
|
# check for end marker line from both apt-get and aptitude
|
||||||
diff_end = (i for i, item in enumerate(diff) if re.match('[0-9]+ (packages )?upgraded', item)).next()
|
diff_end = (i for i, item in enumerate(diff) if re.match('[0-9]+ (packages )?upgraded', item)).next()
|
||||||
|
@ -538,7 +538,7 @@ def install_deb(m, debs, cache, force, install_recommends, allow_unauthenticated
|
||||||
if 'prepared' in diff:
|
if 'prepared' in diff:
|
||||||
diff['prepared'] += '\n\n' + out
|
diff['prepared'] += '\n\n' + out
|
||||||
else:
|
else:
|
||||||
diff = out
|
diff = parse_diff(out)
|
||||||
if "stderr" in retvals:
|
if "stderr" in retvals:
|
||||||
stderr = retvals["stderr"] + err
|
stderr = retvals["stderr"] + err
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue