Why updates overwrites Vim that built from source?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I build Vim from source, and install it with checkinstall. Soon after Software&Updates warned there is an update for Vim. But after the installation, Vim path is altered and another build take its place and my build from source disappeared. Any idea what is going on?










share|improve this question

















  • 1





    The "update" installed a new copy of vim. If you want to have a different one, install it in a different directory. If you don't want it to be overwritten, tell the packaging system to hold/pin the package.

    – Thomas Dickey
    Jan 6 at 18:38















1















I build Vim from source, and install it with checkinstall. Soon after Software&Updates warned there is an update for Vim. But after the installation, Vim path is altered and another build take its place and my build from source disappeared. Any idea what is going on?










share|improve this question

















  • 1





    The "update" installed a new copy of vim. If you want to have a different one, install it in a different directory. If you don't want it to be overwritten, tell the packaging system to hold/pin the package.

    – Thomas Dickey
    Jan 6 at 18:38













1












1








1








I build Vim from source, and install it with checkinstall. Soon after Software&Updates warned there is an update for Vim. But after the installation, Vim path is altered and another build take its place and my build from source disappeared. Any idea what is going on?










share|improve this question














I build Vim from source, and install it with checkinstall. Soon after Software&Updates warned there is an update for Vim. But after the installation, Vim path is altered and another build take its place and my build from source disappeared. Any idea what is going on?







debian vim






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 6 at 17:49









ademadem

1061




1061







  • 1





    The "update" installed a new copy of vim. If you want to have a different one, install it in a different directory. If you don't want it to be overwritten, tell the packaging system to hold/pin the package.

    – Thomas Dickey
    Jan 6 at 18:38












  • 1





    The "update" installed a new copy of vim. If you want to have a different one, install it in a different directory. If you don't want it to be overwritten, tell the packaging system to hold/pin the package.

    – Thomas Dickey
    Jan 6 at 18:38







1




1





The "update" installed a new copy of vim. If you want to have a different one, install it in a different directory. If you don't want it to be overwritten, tell the packaging system to hold/pin the package.

– Thomas Dickey
Jan 6 at 18:38





The "update" installed a new copy of vim. If you want to have a different one, install it in a different directory. If you don't want it to be overwritten, tell the packaging system to hold/pin the package.

– Thomas Dickey
Jan 6 at 18:38










2 Answers
2






active

oldest

votes


















1














One of two things happened:



  1. You used the same package name as your distro did, but your distro update package has a higher version. So the package manager happily "upgraded" your custom build to your distro's version. Solution: remove your distro's package & use a different name for your local package (such as local-vim). If you must use the same name (e.g., due to dependencies), then use a higher version. For example, on Debian, you could add an epoch.


  2. You installed your vim-from-source into /usr, and the files from your distro's package use the same names. Thus your files were overwritten. Less likely, as a lot of package managers would yell pretty loudly about this... Solution is to use a different path (like /opt or /usr/local) or not install your distro package.






share|improve this answer






























    1














    I build Vim, so it is installed in a custom directory. I call configure like this:



    configure --prefix=/usr/local/mybuild/vim --mandir=/usr/local/mybuild/vim/share/man --without-local-dir ...


    then I do



    make
    make test
    make install


    the executable is then /usr/local/mybuild/vim/bin/vim.



    To update the alternative links I executed the following. This is only needed once, not after every make install.



    update-alternatives --install /usr/bin/editor editor /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/eview eview /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/evim evim /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/ex ex /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/gview gview /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/gvim gvim /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/gvimdiff gvimdiff /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/rgview rgview /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/rgvim rgvim /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/rview rview /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/rvim rvim /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/vi vi /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/view view /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/vim vim /usr/local/mybuild/vim/bin/vim 1200
    update-alternatives --install /usr/bin/vimdiff vimdiff /usr/local/mybuild/vim/bin/vim 1200


    I have chosen a high priority (1200), so that system-installs will not replace the links.



    Now Vim is /usr/bin/vim, which is a link to /etc/alternatives/vim, which in turn is a link to /usr/local/mybuild/vim/bin/vim. So calling vim starts my private build of Vim.



    To see how the alternatives for vim are configured, you can run update-alternatives --display vim. On my machine it produces the following output:



    $ update-alternatives --display vim
    vim - auto mode
    link best version is /usr/local/mybuild/vim/bin/vim
    link currently points to /usr/local/mybuild/vim/bin/vim
    link vim is /usr/bin/vim
    /usr/bin/vim.basic - priority 30
    /usr/bin/vim.gtk3 - priority 50
    /usr/local/mybuild/vim/bin/vim - priority 1200





    share|improve this answer
























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492861%2fwhy-updates-overwrites-vim-that-built-from-source%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      One of two things happened:



      1. You used the same package name as your distro did, but your distro update package has a higher version. So the package manager happily "upgraded" your custom build to your distro's version. Solution: remove your distro's package & use a different name for your local package (such as local-vim). If you must use the same name (e.g., due to dependencies), then use a higher version. For example, on Debian, you could add an epoch.


      2. You installed your vim-from-source into /usr, and the files from your distro's package use the same names. Thus your files were overwritten. Less likely, as a lot of package managers would yell pretty loudly about this... Solution is to use a different path (like /opt or /usr/local) or not install your distro package.






      share|improve this answer



























        1














        One of two things happened:



        1. You used the same package name as your distro did, but your distro update package has a higher version. So the package manager happily "upgraded" your custom build to your distro's version. Solution: remove your distro's package & use a different name for your local package (such as local-vim). If you must use the same name (e.g., due to dependencies), then use a higher version. For example, on Debian, you could add an epoch.


        2. You installed your vim-from-source into /usr, and the files from your distro's package use the same names. Thus your files were overwritten. Less likely, as a lot of package managers would yell pretty loudly about this... Solution is to use a different path (like /opt or /usr/local) or not install your distro package.






        share|improve this answer

























          1












          1








          1







          One of two things happened:



          1. You used the same package name as your distro did, but your distro update package has a higher version. So the package manager happily "upgraded" your custom build to your distro's version. Solution: remove your distro's package & use a different name for your local package (such as local-vim). If you must use the same name (e.g., due to dependencies), then use a higher version. For example, on Debian, you could add an epoch.


          2. You installed your vim-from-source into /usr, and the files from your distro's package use the same names. Thus your files were overwritten. Less likely, as a lot of package managers would yell pretty loudly about this... Solution is to use a different path (like /opt or /usr/local) or not install your distro package.






          share|improve this answer













          One of two things happened:



          1. You used the same package name as your distro did, but your distro update package has a higher version. So the package manager happily "upgraded" your custom build to your distro's version. Solution: remove your distro's package & use a different name for your local package (such as local-vim). If you must use the same name (e.g., due to dependencies), then use a higher version. For example, on Debian, you could add an epoch.


          2. You installed your vim-from-source into /usr, and the files from your distro's package use the same names. Thus your files were overwritten. Less likely, as a lot of package managers would yell pretty loudly about this... Solution is to use a different path (like /opt or /usr/local) or not install your distro package.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 6 at 20:00









          derobertderobert

          72.9k8153210




          72.9k8153210























              1














              I build Vim, so it is installed in a custom directory. I call configure like this:



              configure --prefix=/usr/local/mybuild/vim --mandir=/usr/local/mybuild/vim/share/man --without-local-dir ...


              then I do



              make
              make test
              make install


              the executable is then /usr/local/mybuild/vim/bin/vim.



              To update the alternative links I executed the following. This is only needed once, not after every make install.



              update-alternatives --install /usr/bin/editor editor /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/eview eview /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/evim evim /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/ex ex /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/gview gview /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/gvim gvim /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/gvimdiff gvimdiff /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/rgview rgview /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/rgvim rgvim /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/rview rview /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/rvim rvim /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/vi vi /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/view view /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/vim vim /usr/local/mybuild/vim/bin/vim 1200
              update-alternatives --install /usr/bin/vimdiff vimdiff /usr/local/mybuild/vim/bin/vim 1200


              I have chosen a high priority (1200), so that system-installs will not replace the links.



              Now Vim is /usr/bin/vim, which is a link to /etc/alternatives/vim, which in turn is a link to /usr/local/mybuild/vim/bin/vim. So calling vim starts my private build of Vim.



              To see how the alternatives for vim are configured, you can run update-alternatives --display vim. On my machine it produces the following output:



              $ update-alternatives --display vim
              vim - auto mode
              link best version is /usr/local/mybuild/vim/bin/vim
              link currently points to /usr/local/mybuild/vim/bin/vim
              link vim is /usr/bin/vim
              /usr/bin/vim.basic - priority 30
              /usr/bin/vim.gtk3 - priority 50
              /usr/local/mybuild/vim/bin/vim - priority 1200





              share|improve this answer





























                1














                I build Vim, so it is installed in a custom directory. I call configure like this:



                configure --prefix=/usr/local/mybuild/vim --mandir=/usr/local/mybuild/vim/share/man --without-local-dir ...


                then I do



                make
                make test
                make install


                the executable is then /usr/local/mybuild/vim/bin/vim.



                To update the alternative links I executed the following. This is only needed once, not after every make install.



                update-alternatives --install /usr/bin/editor editor /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/eview eview /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/evim evim /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/ex ex /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/gview gview /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/gvim gvim /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/gvimdiff gvimdiff /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/rgview rgview /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/rgvim rgvim /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/rview rview /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/rvim rvim /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/vi vi /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/view view /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/vim vim /usr/local/mybuild/vim/bin/vim 1200
                update-alternatives --install /usr/bin/vimdiff vimdiff /usr/local/mybuild/vim/bin/vim 1200


                I have chosen a high priority (1200), so that system-installs will not replace the links.



                Now Vim is /usr/bin/vim, which is a link to /etc/alternatives/vim, which in turn is a link to /usr/local/mybuild/vim/bin/vim. So calling vim starts my private build of Vim.



                To see how the alternatives for vim are configured, you can run update-alternatives --display vim. On my machine it produces the following output:



                $ update-alternatives --display vim
                vim - auto mode
                link best version is /usr/local/mybuild/vim/bin/vim
                link currently points to /usr/local/mybuild/vim/bin/vim
                link vim is /usr/bin/vim
                /usr/bin/vim.basic - priority 30
                /usr/bin/vim.gtk3 - priority 50
                /usr/local/mybuild/vim/bin/vim - priority 1200





                share|improve this answer



























                  1












                  1








                  1







                  I build Vim, so it is installed in a custom directory. I call configure like this:



                  configure --prefix=/usr/local/mybuild/vim --mandir=/usr/local/mybuild/vim/share/man --without-local-dir ...


                  then I do



                  make
                  make test
                  make install


                  the executable is then /usr/local/mybuild/vim/bin/vim.



                  To update the alternative links I executed the following. This is only needed once, not after every make install.



                  update-alternatives --install /usr/bin/editor editor /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/eview eview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/evim evim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/ex ex /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/gview gview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/gvim gvim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/gvimdiff gvimdiff /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rgview rgview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rgvim rgvim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rview rview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rvim rvim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/vi vi /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/view view /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/vim vim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/vimdiff vimdiff /usr/local/mybuild/vim/bin/vim 1200


                  I have chosen a high priority (1200), so that system-installs will not replace the links.



                  Now Vim is /usr/bin/vim, which is a link to /etc/alternatives/vim, which in turn is a link to /usr/local/mybuild/vim/bin/vim. So calling vim starts my private build of Vim.



                  To see how the alternatives for vim are configured, you can run update-alternatives --display vim. On my machine it produces the following output:



                  $ update-alternatives --display vim
                  vim - auto mode
                  link best version is /usr/local/mybuild/vim/bin/vim
                  link currently points to /usr/local/mybuild/vim/bin/vim
                  link vim is /usr/bin/vim
                  /usr/bin/vim.basic - priority 30
                  /usr/bin/vim.gtk3 - priority 50
                  /usr/local/mybuild/vim/bin/vim - priority 1200





                  share|improve this answer















                  I build Vim, so it is installed in a custom directory. I call configure like this:



                  configure --prefix=/usr/local/mybuild/vim --mandir=/usr/local/mybuild/vim/share/man --without-local-dir ...


                  then I do



                  make
                  make test
                  make install


                  the executable is then /usr/local/mybuild/vim/bin/vim.



                  To update the alternative links I executed the following. This is only needed once, not after every make install.



                  update-alternatives --install /usr/bin/editor editor /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/eview eview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/evim evim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/ex ex /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/gview gview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/gvim gvim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/gvimdiff gvimdiff /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rgview rgview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rgvim rgvim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rview rview /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/rvim rvim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/vi vi /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/view view /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/vim vim /usr/local/mybuild/vim/bin/vim 1200
                  update-alternatives --install /usr/bin/vimdiff vimdiff /usr/local/mybuild/vim/bin/vim 1200


                  I have chosen a high priority (1200), so that system-installs will not replace the links.



                  Now Vim is /usr/bin/vim, which is a link to /etc/alternatives/vim, which in turn is a link to /usr/local/mybuild/vim/bin/vim. So calling vim starts my private build of Vim.



                  To see how the alternatives for vim are configured, you can run update-alternatives --display vim. On my machine it produces the following output:



                  $ update-alternatives --display vim
                  vim - auto mode
                  link best version is /usr/local/mybuild/vim/bin/vim
                  link currently points to /usr/local/mybuild/vim/bin/vim
                  link vim is /usr/bin/vim
                  /usr/bin/vim.basic - priority 30
                  /usr/bin/vim.gtk3 - priority 50
                  /usr/local/mybuild/vim/bin/vim - priority 1200






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 6 at 22:14

























                  answered Jan 6 at 22:03









                  RalfRalf

                  3278




                  3278



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492861%2fwhy-updates-overwrites-vim-that-built-from-source%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown






                      Popular posts from this blog

                      Peggy Mitchell

                      Palaiologos

                      The Forum (Inglewood, California)