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

feat(apt): add -f --fix-broken option to apt module #27162

Merged
merged 1 commit into from
Oct 8, 2018
Merged

feat(apt): add -f --fix-broken option to apt module #27162

merged 1 commit into from
Oct 8, 2018

Conversation

triat
Copy link
Contributor

@triat triat commented Jul 21, 2017

SUMMARY

Add the option to use --fix-broken from the apt packaging system with the state: fixed

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

module/packaging/apt

ANSIBLE VERSION
ansible 2.3.1.0
  config file =
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Dec 18 2016, 07:03:39) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Jul 21, 2017

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 core_review In order to be merged, this PR must follow the core review workflow. feature_pull_request module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jul 21, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Jul 21, 2017
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 29, 2017
@ansibot ansibot added the new_contributor This PR is the first contribution by a new community member. label Oct 18, 2017
@ansibot ansibot removed the new_contributor This PR is the first contribution by a new community member. label Nov 3, 2017
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 5, 2017
@ansibot
Copy link
Contributor

ansibot commented Dec 7, 2017

The test ansible-test compile --python 2.6 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: <<<<<<< HEAD

The test ansible-test compile --python 2.7 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: <<<<<<< HEAD

The test ansible-test compile --python 3.5 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: <<<<<<< HEAD

The test ansible-test compile --python 3.6 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: <<<<<<< HEAD

The test ansible-test compile --python 3.7 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: <<<<<<< HEAD

The test ansible-test sanity --test ansible-doc --python 2.6 [?] failed with the following error:

Command "ansible-doc apt" returned exit status 1.
>>> Standard Error
ERROR! module apt missing documentation (or could not parse documentation): Parsing produced an empty object.

The test ansible-test sanity --test ansible-doc --python 2.7 [?] failed with the following error:

Command "ansible-doc apt" returned exit status 1.
>>> Standard Error
ERROR! module apt missing documentation (or could not parse documentation): Parsing produced an empty object.

The test ansible-test sanity --test ansible-doc --python 3.5 [?] failed with the following error:

Command "ansible-doc apt" returned exit status 1.
>>> Standard Error
ERROR! module apt missing documentation (or could not parse documentation): Parsing produced an empty object.

The test ansible-test sanity --test ansible-doc --python 3.6 [?] failed with the following error:

Command "ansible-doc apt" returned exit status 1.
>>> Standard Error
ERROR! module apt missing documentation (or could not parse documentation): Parsing produced an empty object.

The test ansible-test sanity --test import --python 2.6 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.5 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.7 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.6 [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:2: SyntaxError: invalid syntax

The test ansible-test sanity --test pep8 [?] failed with the following errors:

lib/ansible/modules/packaging/os/apt.py:866:1: E122 continuation line missing indentation or outdented
lib/ansible/modules/packaging/os/apt.py:866:3: E225 missing whitespace around operator
lib/ansible/modules/packaging/os/apt.py:866:5: E227 missing whitespace around bitwise or shift operator
lib/ansible/modules/packaging/os/apt.py:869:1: E122 continuation line missing indentation or outdented
lib/ansible/modules/packaging/os/apt.py:869:3: E225 missing whitespace around operator
lib/ansible/modules/packaging/os/apt.py:869:5: E225 missing whitespace around operator
lib/ansible/modules/packaging/os/apt.py:869:8: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/packaging/os/apt.py:872:1: E122 continuation line missing indentation or outdented
lib/ansible/modules/packaging/os/apt.py:872:7: E225 missing whitespace around operator
lib/ansible/modules/packaging/os/apt.py:872:25: E225 missing whitespace around operator
lib/ansible/modules/packaging/os/apt.py:872:28: E225 missing whitespace around operator
lib/ansible/modules/packaging/os/apt.py:872:32: E226 missing whitespace around arithmetic operator

The test ansible-test sanity --test pylint [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:866:0: syntax-error invalid syntax (&lt;string&gt;, line 866)

The test ansible-test sanity --test validate-modules [?] failed with the following error:

lib/ansible/modules/packaging/os/apt.py:0:0: E401 Python SyntaxError while parsing module

click here for bot help

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Dec 7, 2017
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 15, 2017
@ansibot ansibot added the new_contributor This PR is the first contribution by a new community member. label Jan 24, 2018
@triat
Copy link
Contributor Author

triat commented Jan 30, 2018

Hey, do I need to do something more to the PR? Let me know if I can help you to integrate it easily. Thanks

@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 2, 2018
@maxamillion
Copy link
Contributor

@triat Thank you for the pull request! Apologies for the lag time on this, I'm currently going through the queue and trying to clean up stale PRs. I think the change looks fine but I would like to have some integration test(s) included. Thanks again.

@triat
Copy link
Contributor Author

triat commented Sep 20, 2018

Hey @maxamillion! Don't worry, when I saw the 1600~ PR waiting, I was not expecting a quick answer. Thanks for taking the time to review this one, I'll make the test(s) ASAP.

@maxamillion
Copy link
Contributor

@triat greatly appreciated, thanks again! :)

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 26, 2018
@mattclay
Copy link
Member

mattclay commented Oct 1, 2018

CI failure in integration tests: https://app.shippable.com/github/ansible/ansible/runs/85811/39/tests

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Oct 1, 2018
@triat
Copy link
Contributor Author

triat commented Oct 2, 2018

Hey @mattclay,I just rebased on devel, pushed to upgrade the PR and saw it was not passing anymore. I have to check but I hadn't the time right now to figure out why I can not run the test on my mac (also in a linux VM as I saw that it is recommended to run the tests on a linux OS)

@mattclay
Copy link
Member

mattclay commented Oct 2, 2018

@triat If you have Docker installed on your Mac you can run the test from your branch with:

bin/ansible-test integration apt --docker ubuntu1604 -v

@@ -1100,6 +1107,7 @@ def main():
force=force_yes,
dpkg_options=dpkg_options,
build_dep=state_builddep,
fixed=state_fixed,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are failing because state_fixed is undefined when p['state'] != 'fixed'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the check, that's actually pretty obvious looking at the code I've made!

@triat
Copy link
Contributor Author

triat commented Oct 2, 2018

I've been trying this command but I don't know what I've done to get it wrong. I ran it again and it was magically properly failing. Anyway, thanks again for the help, I've fixed the initialization and I'll have to write a test now.

Regarding this part, is there any recommendation if I need to install something with dpkg which will miss some dependencies that I'll then install through apt -f ?

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 2, 2018
@maxamillion
Copy link
Contributor

rebuild_merge

@ansibot ansibot merged commit 6ad9e1c into ansible:devel Oct 8, 2018
@dagwieers dagwieers added the packaging Packaging category label Mar 3, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants