Skip to content

Commit

Permalink
Fix a bug in 'remove obsoleting package from depends of package it ob…
Browse files Browse the repository at this point in the history
…soletes'

Fix a bug in 'remove obsoleting package from depends of package it
obsoletes' code.  This wasn't applying correctly if the dependency
wasn't the first one, and left extraneous whitespace when it was.
  • Loading branch information
jon-turney committed Apr 9, 2024
1 parent 13248b3 commit 6898782
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions calm/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,10 @@ def add_needed_obsoletes(needed):

for (ov, ohints) in packages[o].version_hints.items():
if 'depends' in ohints:
depends = ohints['depends'].split(',')
depends = ohints['depends'].split(', ')
if p in depends:
depends = [d for d in depends if d != p]
packages[o].version_hints[ov]['depends'] = ','.join(depends)
packages[o].version_hints[ov]['depends'] = ', '.join(depends)
logging.debug("removed obsoleting '%s' from the depends: of package '%s'" % (p, o))
else:
logging.debug("can't ensure package '%s' doesn't depends: on obsoleting '%s'" % (o, p))
Expand Down

0 comments on commit 6898782

Please sign in to comment.