Skip to content

Commit ce02d59

Browse files
committed
If force=true, ignore python-apt's advice
This lets you downgrade packages, for instance.
1 parent fb4854e commit ce02d59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packaging/os/apt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def install_deb(m, debs, cache, force, install_recommends, dpkg_options):
333333
if pkg.compare_to_version_in_cache() == pkg.VERSION_SAME:
334334
continue
335335
# Check if package is installable
336-
if not pkg.check():
336+
if not pkg.check() and not force:
337337
m.fail_json(msg=pkg._failure_string)
338338

339339
# add any missing deps to the list of deps we need

0 commit comments

Comments
 (0)