epiphany icon indicating copy to clipboard operation
epiphany copied to clipboard

[Ubuntu] Simplify APT commands flow in download-requirements.py

Open to-bar opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. Current flow for a package is:

  1. apt-cache show
  2. apt-cache policy
  3. apt-cache depends
  4. apt download

It looks like apt-cache policy may be replaced by apt-cache show, which seems to return the candidate version at the top, for example:

apt-cache policy filebeat | grep Candidate
  Candidate: 7.17.5

vs

apt-cache show filebeat | grep Version | head -1
Version: 7.17.5

Describe the solution you'd like Refactor get_package_info method in ansible/playbooks/roles/repository/files/download-requirements/src/command/debian/apt_cache.py to not use __get_package_candidate_version. The latter probably can be removed.

Describe alternatives you've considered Keep current flow if necessary.

Additional context n/a


DoD checklist

  • Changelog
    • [ ] updated
    • [ ] not needed
  • COMPONENTS.md
    • [ ] updated
    • [ ] not needed
  • Schema
    • [ ] updated
    • [ ] not needed
  • Backport tasks
    • [ ] created
    • [ ] not needed
  • Documentation
    • [ ] added
    • [ ] updated
    • [ ] not needed
  • [ ] Feature has automated tests
  • [ ] Automated tests passed (QA pipelines)
    • [ ] apply
    • [ ] upgrade
    • [ ] backup/restore
  • [ ] Idempotency tested
  • [ ] All conversations in PR resolved
  • [ ] Solution meets requirements and is done according to design doc
  • [ ] Usage compliant with license

to-bar avatar Aug 02 '22 14:08 to-bar