-
Notifications
You must be signed in to change notification settings - Fork 158
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
package_ensure() doesn't work on Ubuntu 10.04 #4
Comments
Hi! This output doesn't mean that nginx is not installed, it's just the standard output from dpkg -s (package status) when the package is not found. Did you run it again to check if the output was different? |
Hello Sébastien! diff --git a/cuisine/cuisine.py b/cuisine/cuisine.py
index b9d6f98..05cd3dd 100644
--- a/cuisine/cuisine.py
+++ b/cuisine/cuisine.py
@@ -218,7 +218,7 @@ def package_install( package, update=False ):
def package_ensure( package ):
"""Tests if the given package is installed, and installes it in case it's not
already there."""
- if run("dpkg -s %s | grep 'Status:' ; true" % package).find("installed") == -1:
+ if run("dpkg-query -W -f='${Status}' %s ; true" % package).find("installed") == -1:
package_install(package)
def command_ensure( command, package=None ): |
Thanks a lot, I updated with you changes and pushed it. Let me know if this works. |
yeah, thanks! |
Hi!
Seems package_ensure(package_name) doesn't work on Ubuntu 10.04:
Code:
Output:
The text was updated successfully, but these errors were encountered: