Skip to content

Commit

Permalink
find: better error message for sub-package ordering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
liushuyu committed Dec 5, 2023
1 parent 4728f6c commit e0d2192
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion acbs/find.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import logging
from typing import List, Dict, Optional

from acbs.const import TMP_DIR
Expand Down Expand Up @@ -118,8 +119,12 @@ def check_package_groups(packages: List[ACBSPackageInfo]):
continue
if base_slug in groups_seen:
if groups_seen[base_slug] > pkg.group_seq:
raise ValueError('Package {} (in {}) has a different sequential order (#{}) after dependency resolution (should be #{})'.format(
logging.error('Package {} (in {}) has a different sequential order (#{}) after dependency resolution (should be #{})'.format(
pkg.name, base_slug, pkg.group_seq, groups_seen[base_slug] + 1))
logging.error('This might indicate a dependency cycle between the sub-packages (needs bootstrapping?) ...')
logging.error('... or maybe the sub-package should be named {}-{:02d}'.format(pkg.name, groups_seen[base_slug] + 1))
logging.error('Please check which situation this package is in and fix it.')
raise ValueError('Specified sub-package order contradicts with the dependency resolution results')
else:
groups_seen[base_slug] = pkg.group_seq

Expand Down

0 comments on commit e0d2192

Please sign in to comment.