changelog = parse_changelog.stdout
- cmd = ['grep-dctrl', '-n', '-s', 'Source,Version,Distribution,Section', '']
+ cmd = ['grep-dctrl', '-n', '-s', 'Source,Version,Distribution', '']
grep_dctrl = subprocess.Popen(
cmd,
shell=False,
distribution = distribution.strip()
logger.info('Package distribution is %s' % (distribution))
- section = grep_dctrl.stdout.readline()
- section = section.strip()
- logger.info('Package section is %s' % (section))
- if section == 'unknown':
- logger.error('debian/control sets "section" to unknown. This is not allowed, failing...')
+ section_error=False
+ for line in fileinput.input('debian/changelog'):
+ if line.lower() == 'section: unknown':
+ logger.error('debian/control sets "section" to unknown. This is not allowed, failing...')
+ section_error=True
+ if section_error:
raise Exception('debian/control sets "section" to unknown. This is not allowed, failing...')
exit_error()