XMLTV / xmltv

Utilities to obtain, generate, and post-process TV listings data in XMLTV format
GNU General Public License v2.0
283 stars 93 forks source link

tv_find_grabbers returns duplicate grabbers on usrmerged systems #153

Closed mamarley closed 2 years ago

mamarley commented 2 years ago

XMLTV Version?

1.0.0

XMLTV Component?

tv_find_grabbers

What happened?

tv_find_grabbers returned two instances of each grabber, one in /usr/bin/ and one in /bin/. (On a usrmerged system (such as recent Debian and Ubuntu), /bin is a symlink to /usr/bin).

What did you expect to happen?

Only one instance of each grabber should be returned

Did you see any warnings/errors?

No

What steps are needed to reproduce this issue?

  1. Run tv_find_grabbers on a usrmerged system
  2. Note that two instances of each grabber are returned

Any other information?

No

What other software are you using?

Operating System: Linux

Perl Version: 5.32.1

garybuhrmaster commented 2 years ago

tv_find_grabber uses the PATH environment variable to determine which file systems to search. On proper usrmerged systems, the system default PATH should typically include /usr/bin and not also /bin in the PATH (which can also result in additional overhead in searching for binaries). Other distros that completed the usrmerge process have removed the bare /bin from the shell defaults. I believe a recent vote of the debian technical committee confirmed that with bookworm the goal is to finish the usrmerge conversion, and you should likely follow the progress (and open issues as needed) to remove /bin from the PATH in (likely) /etc/profile in debian. You can, of course, also override the PATH variable in your shell startup scripts to mitigate against the current debian configuration.

mamarley commented 2 years ago

Ah, darn, I didn't realize that those were still in PATH. I removed them and now it of course only finds one instance of each grabber. Sorry for the bother.