Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow multiple matching solvables in print-reldeps #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nphilipp
Copy link
Member

No description provided.

if len(found) > 1:
if (i > 0):
print()
print("Solution #{}:".format(i + 1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will make things non-parseable...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it's actually not solution in any way ;)

@nphilipp
Copy link
Member Author

@ignatenkobrain Heh, I just stumbled over this while trying out the different depchase functions and ran into this:

(depchase) nils@gibraltar:~/src/modularity/depchase (master)> depchase -c repos.cfg -a x86_64 print-reldeps bash
Traceback (most recent call last):
  File "/home/nils/.virtualenvs/depchase/bin/depchase", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/nils/src/modularity/depchase/depchase", line 495, in <module>
    cli(obj={})
  File "/home/nils/.virtualenvs/depchase/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/nils/.virtualenvs/depchase/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/nils/.virtualenvs/depchase/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/nils/.virtualenvs/depchase/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/nils/.virtualenvs/depchase/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/nils/.virtualenvs/depchase/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/nils/src/modularity/depchase/depchase", line 482, in print_reldeps
    assert len(found) == 1, "More matching solvables were found, {}".format(found)
AssertionError: More matching solvables were found, [<Solvable #2173 bash-4.4.12-6.fc27.x86_64>, <Solvable #65594 bash-4.4.12-9.fc27.x86_64>]
(depchase) nils@gibraltar:~/src/modularity/depchase (master)>

With my changes to show all solvables, I get this output:

(depchase) nils@gibraltar:~/src/modularity/depchase (master--print-reldeps-multiple)> depchase -c repos.cfg -a x86_64 print-reldeps bash
Solution #1:
requires: rtld(GNU_HASH)
requires: libdl.so.2()(64bit)
requires: libc.so.6(GLIBC_2.15)(64bit)
requires: libdl.so.2(GLIBC_2.2.5)(64bit)
requires: libtinfo.so.6()(64bit)
requires: filesystem >= 3

Solution #2:
requires: rtld(GNU_HASH)
requires: libdl.so.2()(64bit)
requires: libdl.so.2(GLIBC_2.2.5)(64bit)
requires: libc.so.6(GLIBC_2.15)(64bit)
requires: libtinfo.so.6()(64bit)
requires: filesystem >= 3
(depchase) nils@gibraltar:~/src/modularity/depchase (master--print-reldeps-multiple)>

What would be a better way to coping with this? Print the "smallest" solvable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants