Skip to content

apt_package should support local installation of deb packages providing a less horrible interface than apt itself #5760

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

Closed
lamont-granquist opened this issue Jan 25, 2017 · 5 comments

Comments

@lamont-granquist
Copy link
Contributor

see #5685

the typical way that ubuntu/debian admins install a local package on the command line and get depsolving is to either:

  • apt-get install -f ./package.deb and have that fail
  • apt-get -yf install when the former fails

or to:

  • copy the deb to /var/cache/apt/archives/
  • apt-get install package

see https://unix.stackexchange.com/questions/159094/how-to-install-a-deb-file-by-dpkg-i-or-by-apt

we should fix it so that users can just:

apt_packge ./package.deb

and have it work the same way that yum supports localinstall of rpms transparently.

@lamont-granquist lamont-granquist added this to the Accepted Minor milestone Jan 25, 2017
@coderanger
Copy link
Contributor

I've always done this through https://launchpad.net/gdebi not apt.

@lamont-granquist
Copy link
Contributor Author

that would get messy to have apt_package depend on that though.

@jugatsu
Copy link
Contributor

jugatsu commented Jan 28, 2017

How about dpkg -i for local installs? Example from ansible apt module below
https://github.com/ansible/ansible-modules-core/blob/devel/packaging/os/apt.py#L588

@coderanger
Copy link
Contributor

@jugatsu That doesn't install deps and is already available via dpkg_package.

@renchap
Copy link
Contributor

renchap commented Apr 16, 2018

Starting with Debian Stretch apt install ./package.deb now works as expected and install the package dependencies.
The apt_package resource does not allow source to be defined, so you can not use this feature.

The provider should be changed so you can do something like:

apt_package "mypackage" do
  action :install
  source "/var/cache/mypackage.deb"
end

It should work out of the box (with a recent apt) once the check in the current provider is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants