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
Make manpages work #845
Comments
What does this ticket mean? Does it mean making If that's what this is asking for, is it as simple as setting |
I believe that's what it was. It would be nice to not require setting an environment variable, but I couldn't figure out a way to do it. |
Maybe another way would be to create a script |
Yeah, that would work. Another way is to build a custom man that searches the environment manpath by default as a conda package. The script bin/man would be the simplest. What would be the best way to ship it? As a simple The advantage of not requiring an environment variable is that it "just works". No need to source the activate script or put something in your bash profile. |
There are two types of users, I think:
|
I think
On OS/X and some Python distros (Ubuntu 16), if a conda |
I somehow missed that MANPATH_MAP thing. So if it just works without setting any environment variables, conda should install manpages for itself. The code to generate them is already there in conda-docs (it's a side effect of the way these pages are generated). It does rely on IIRC, a symlink on Linux shouldn't be a big deal because conda writes through symlinks, so any package that has files in man/ would be installed to share/man/ just fine (please correct me if this is wrong). |
Isn't the issue here broader than just conda's own man pages? Tons of conda packages contain man pages of their own; they should become available when those packages are installed in the active environment. |
It might already be doing the right thing as @jzwinck points out because not executing command:
(cd '/zopt/conda2/envs/nanshenv/share/man' && (echo ".ll 14.1i"; echo ".nr LL 14.1i"; /bin/cat '/zopt/conda2/envs/nanshenv/share/man/man1/xz.1') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | (/usr/bin/less -is || true)) In other words, it found the In short, maybe this should be closed as it already works? |
cc @scopatz (figured you might find this interesting) |
The other issue here is to ship conda's manpages with conda. |
@jakirkham, please see my comment above. It already works on some platforms but not others, depending on how the system's |
If man isn't configured properly there isn't much conda can do, unless they want to ship their own man package. Setting environment variables automatically is finicky at best (you have to activate an environment). I think the best thing for conda to do would be to add documentation on how to configure it properly if it isn't. |
@asmeurer That isn't my view. I think people who use multiple environments are told to use I'm not familiar with the I don't think claiming that "man is not configured properly" on mega-popular distros like Ubuntu 14.04 or RHEL6 is going to help most Conda users. |
@jzwinck this is about the manpages for conda itself. No activate commands are required to use conda. Most conda users, probably even most conda users who are advanced enough to use |
Am in a similar boat as well. Something in activation does something screwy on our cluster, which effects users trying to start NoMachine. So we have to limp along on environment variables alone. |
@asmeurer Your comment to me on 22 Aug 2016 said that this issue is about manpages for I am confused about what this issue is for. What I personally am interested in is having |
I think it's for both. Maybe it should be split. The original motivation was for manpages for conda itself. |
Looked at this a little more. man supposedly looks in "nearby" directories (from
But I couldn't get it to work at all. Anyone know what I might be doing wrong here? I don't have Setting
So Another option would be to ship a conda package for |
Whatever solution gets picked, it would be really important to make sure this didn't somehow mess up the user's ability to search through standard system locations as well. The last thing we want is a user to run something like |
Hmm, apparently |
So I found out why my "nearby" wasn't working. Apparently my
(yes I have a lot of garbage on my PATH, but the important thing is it found Can others confirm that this works? If so, then this already works out of the box, and if it doesn't, then the solution is "go unset |
On my Ubuntu 18.04 man pages for So it searches in What is the recommended way to make this work? I also have some gentoo HPCs with conda, would be great to have them working too.. |
To me it looks like To reproduce: Do a
But:
Somehow I can't imagine that something as old and basic as man-db will have a bug like this, the code that is doing the lookup is 17 years old.. |
I'm running conda 4.5.12 out of an Ubuntu 18.04.1 container and I'm seeing the Maybe mandb is giving up after finding the first match of
|
At this point, almost all of the infrastructure (recipes) omits manpages from packages. It would be noble to get this to work, but I'm afraid it may be quite a lot of effort (and would require a community-led effort, as I can't see an enterprise need driving the Anaconda team's effort here). |
FWIW, I'm going to mention it to the mandb maintainer and just hardcode some manpaths and generally be irritated about it. |
Amazingly, I've already head back and there's now a fix in the master branch for man-db, though who knows if 18.04 will ever see it. The system works! |
Colin Watson (the maintainer of man-db) indeed seems to have fixed this bug. |
@jvhaarst - do you know which version is required? |
The commit is here and looking at dates the last release was 2.8.5 which was about two weeks before, so I'd guess 2.8.6, whenever that is. |
FIY this tutorial fixed it for me on HPC with CentOS (I will now test few other machines with Gentoo, OpenSUSE, and Ubuntu 18.04). I did:
Now man pages for packages from base conda environment work as expected (I will check environments later but I assume that would be separate issue anyway). Update: So on CentOS and Ubuntu the command |
Closing this as a duplicate of #642 |
@beeankha I don't really agree that the linked issue is a duplicate of this one, however I just tested man pages for programs I installed with Edit: I tested it on my laptop with elementary OS 6.1 (based on Ubuntu 20.04). In the past, Ubuntu would need the full fix I mentioned above. |
Gotcha, thank you for the clarification, @janxkoci , and sorry about mislabeling this issue as a duplicate! |
No description provided.
The text was updated successfully, but these errors were encountered: