pulsepm / pulse

Unofficial package manager written in python.
MIT License
4 stars 0 forks source link

[BUG]: Ensure resource bug (?) #80

Closed Ykpauneu closed 1 month ago

Ykpauneu commented 2 months ago

Describe the bug Taken from Discord conversation:

There's also another issue. What if 1 package relies on Y-Less's fork of crashdetect and another package relies on Zeex's crashdetect?

For instance, my project relies on Y-Less's crashdetect but some dependency tries to get Zeex's one and it causes an error (or at least I guess that's what causes it, I haven't looked deep into it):

No tag, commit, or branch was specified in the requirements for openmultiplayer/omp-stdlib. The default branch name will be used!
Package pawn-lang/samp-stdlib (open.mp) was not found, it will be installed..
Installing: pawn-lang/samp-stdlib (open.mp)..
Found dependencies for pawn-lang/samp-stdlib (sampctl)!
Found installed package: openmultiplayer/omp-stdlib..
Package pawn-lang/pawn-stdlib (open.mp) was not found, it will be installed..
Installing: pawn-lang/pawn-stdlib (open.mp)..
Found dependencies for pawn-lang/pawn-stdlib (sampctl)!
Found installed package: openmultiplayer/omp-stdlib..
Traceback (most recent call last):
  File "/Projects/pulse/pulse.py", line 4, in <module>
    pulse()
  File "/Projects/pulse/venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Projects/pulse/venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Projects/pulse/venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Projects/pulse/venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Projects/pulse/venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Projects/pulse/pulse/package/package_ensure.py", line 19, in ensure
    return ensure_packages()
  File "/Projects/pulse/pulse/package/package_ensure.py", line 93, in ensure_packages
    ensure_resource(resource, local_package_path, package_type)
  File "/Projects/pulse/pulse/package/package_ensure.py", line 167, in ensure_resource
    for file in os.listdir(plugin_path):
FileNotFoundError: [Errno 2] No such file or directory: '/.local/share/pulsepm/plugins/Zeex/samp-plugin-crashdetect'