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

Installing .deb package does not handle recursive dependencies #23735

Closed
moloney opened this issue May 14, 2015 · 5 comments
Closed

Installing .deb package does not handle recursive dependencies #23735

moloney opened this issue May 14, 2015 · 5 comments
Assignees
Labels
expected-behavior intended functionality Question The issue is more of a question rather than a bug or a feature request
Milestone

Comments

@moloney
Copy link

moloney commented May 14, 2015

I came across issue #10107, but only direct dependencies are handled. Having salt do this recursive dependency checking seems like we are trying to recreate functionality already built in to apt.

@tweenk
Copy link

tweenk commented May 16, 2015

This issue is completely wrong, please close it. The module works as intended.

apt-get, the high level package manager, resolves dependencies, but cannot install standalone files - only files which are in repositories. dpkg, the low level package manager, installs .deb files directly but does not handle dependency resolution. To correctly install a standalone .deb file, you need to first install its dependencies with apt-get (which will take care of recursively resolving dependencies) and then install the file itself with dpkg. This is exactly what the module does right now.

@jfindlay jfindlay added Question The issue is more of a question rather than a bug or a feature request expected-behavior intended functionality labels May 18, 2015
@jfindlay jfindlay added this to the Blocked milestone May 18, 2015
@jfindlay jfindlay self-assigned this May 18, 2015
@jfindlay
Copy link
Contributor

@moloney, you can either host the package in a repository so that you can use the apt state to install it (and handle dependencies), or figure out what the full dependency list is and create states that install them along with your package. The dpkg util cannot handle recursive deps, and from what I know, apt cannot handle package files.

@tweenk
Copy link

tweenk commented May 18, 2015

@jfindlay No, it's not necessary to create any states that install the dependencies.

When Salt installs a .deb file, its list of dependencies is read, each of them is installed with apt-get and marked as an automatic dependency with apt-mark, and finally the .deb file is installed with dpkg.

The only thing I'm not sure about is whether only newly installed dependencies are marked as automatically installed, or all of them are marked as such. The second behavior would be a bug.

PS I did not write the above code, I only read it. :)

@moloney
Copy link
Author

moloney commented May 18, 2015

Sorry, there was some user error involved here. Initially I was missing a needed .deb which caused subsequent apt-get calls to spit out errors, even after I included it. After resetting everything to a clean state things work as expected. Sorry for the noise!

@moloney moloney closed this as completed May 18, 2015
@jfindlay
Copy link
Contributor

@tweenk, thanks for the explanation. @moloney, I'm glad you got this sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expected-behavior intended functionality Question The issue is more of a question rather than a bug or a feature request
Projects
None yet
Development

No branches or pull requests

3 participants