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

bash completion installed files #1012

Closed
bioinfornatics opened this issue Jul 30, 2015 · 2 comments
Closed

bash completion installed files #1012

bioinfornatics opened this issue Jul 30, 2015 · 2 comments

Comments

@bioinfornatics
Copy link
Contributor

Dear,

A same build workflow give a different results maybe that depends of cmake version.

some time files are installed into: (with cmake cmake-3.3.0)

"${CONF_INST_DIR}/bash_completion.d"

output line:

-- Install configuration: ""
-- Installing: /builddir/build/BUILDROOT/ldc-0.15.2.beta2-72.fc24.i386/usr/bin/ldc2
-- Installing: /builddir/build/BUILDROOT/ldc-0.15.2.beta2-72.fc24.i386/usr/bin/ldmd2
-- Installing: /builddir/build/BUILDROOT/ldc-0.15.2.beta2-72.fc24.i386/etc/ldc2.conf
-- Installing: /builddir/build/BUILDROOT/ldc-0.15.2.beta2-72.fc24.i386/etc/bash_completion.d
-- Installing: /builddir/build/BUILDROOT/ldc-0.15.2.beta2-72.fc24.i386/etc/bash_completion.d/ldc2

and some times into (with cmake cmake-3.2.2)

/usr/share/bash-completion/completions

output line:

-- Install configuration: ""
-- Installing: /home/jmercier/rpmbuild/BUILDROOT/ldc-0.15.2.beta2-72.fc22.x86_64/usr/bin/ldc2
-- Installing: /home/jmercier/rpmbuild/BUILDROOT/ldc-0.15.2.beta2-72.fc22.x86_64/usr/bin/ldmd2
-- Installing: /home/jmercier/rpmbuild/BUILDROOT/ldc-0.15.2.beta2-72.fc22.x86_64/etc/ldc2.conf
-- Installing: /home/jmercier/rpmbuild/BUILDROOT/ldc-0.15.2.beta2-72.fc22.x86_64/usr/share/bash-completion/completions
-- Installing: /home/jmercier/rpmbuild/BUILDROOT/ldc-0.15.2.beta2-72.fc22.x86_64/usr/share/bash-completion/completions/ldc2

could you to uniform the target directory please as they are some strange behavior.

$ grep -R bash_completion.d
CMakeLists.txt:        set(BASH_COMPLETION_COMPLETIONSDIR "${CONF_INST_DIR}/bash_completion.d")
CMakeLists.txt:    install(DIRECTORY bash_completion.d/ DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR})
build/cmake_install.cmake:file(INSTALL DESTINATION "/usr/share/bash-completion/completions" TYPE DIRECTORY FILES "/home/jmercier/rpmbuild/BUILD/ldc-0.15.2-beta2-src/bash_completion.d/")

Regards

@dnadlinger
Copy link
Member

If you look at the context of the first grep hit

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    find_package(bash-completion QUIET)
    if(NOT BASH_COMPLETION_FOUND)
        set(BASH_COMPLETION_COMPLETIONSDIR "${CONF_INST_DIR}/bash_completion.d")
        if(LINUX_DISTRIBUTION_IS_GENTOO)
            set(BASH_COMPLETION_COMPLETIONSDIR "/usr/share/bash-completion")
        endif()
    endif()
    install(DIRECTORY bash_completion.d/ DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR})
endif()

you see that we try to use the CMake bash-completion package to determine the install path if it is available.

If that path is not correct on your system, I suggest fixing its CMake package.

@bioinfornatics
Copy link
Contributor Author

Thank you, I added bash-completion package as required at build time to solve this issue.

Thank you again @klickverbot

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

No branches or pull requests

2 participants