I want to be able to set a custom package name when installing a package using dpkg from source. Running this command:

dpkg -i /path/to/deb/ruby-2.2.0.deb

installs the package as:

ruby-2.2.0 2.2.0

I'd like to have this install as just ruby, since the version is listed in the next column anyway. Would help out with writing some serverspec tests. I've checked the man for dpkg but don't see it as an option there. Is this possible?

  • why do you need to deviate from the OS stablished naming convention in this way? what problem does it solve? are you aware that there are other ruby versions available and that you can choose the default by using the update-alternatives system? – dawud Mar 30 '15 at 22:30
  • I'm in the process of writing some serverspec tests and one of the specs to check if a particular version of ruby is installed seems redundant. Right now, it looks like describe package ('ruby-2.2.0') do it { should be_installed have_version('2.2.0')} end – PurrBiscuit Mar 30 '15 at 23:59
  • didn't mean to post that so soon, here's what I left out:...where the version is not needed in the first line. I'd prefer it to be in the have_version line. Also, don't want multiple versions of ruby on our servers. I do use rbenv to manage mulitple ruby versions in development on my workstation however. – PurrBiscuit Mar 31 '15 at 0:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.