From ce02d596510fdac470b3d89007e79a90b921da80 Mon Sep 17 00:00:00 2001 From: Henry Finucane Date: Fri, 14 Nov 2014 16:27:20 -0800 Subject: [PATCH] If force=true, ignore python-apt's advice This lets you downgrade packages, for instance. --- packaging/os/apt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/os/apt.py b/packaging/os/apt.py index 5c557900b76..c18661d19df 100644 --- a/packaging/os/apt.py +++ b/packaging/os/apt.py @@ -333,7 +333,7 @@ def install_deb(m, debs, cache, force, install_recommends, dpkg_options): if pkg.compare_to_version_in_cache() == pkg.VERSION_SAME: continue # Check if package is installable - if not pkg.check(): + if not pkg.check() and not force: m.fail_json(msg=pkg._failure_string) # add any missing deps to the list of deps we need