changelog = parse_changelog.stdout
- cmd = ['grep-dctrl', '-n', '-s', 'Source,Version,Distribution', '']
+ cmd = ['grep-dctrl', '-n', '-s', 'Source,Version,Distribution,Section', '']
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...')
+ raise Exception('debian/control sets "section" to unknown. This is not allowed, failing...')
+ exit_error()
+
# enforce correct distribution in debian/changelog for master and hotfix branches
if (GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/')) and not distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates'):
logger_error('Distribution %s in debian/changelog did not match branch %s' % (distribution, options.distribution))