Skip to content

[FEAT] Alternate Handling Process for missing packages in APT #1149

@vincemulhollon

Description

@vincemulhollon

Is this a new feature request?

  • I have searched the existing issues

Name of mod

Universal Package Installer

Wanted change

For the APT handler. If and only if current design "apt install" fails exit code other than 0, then repeatedly loop over the list of packages one package at a time.

Reason for change

  • Provide a list of packages, perhaps "libpcre3 wget".
  • If libpcre3 does not exist in your current distro, this error out in logs about "unable to locate package libpcre3" and does NOT install wget
  • Looping "apt install" over a list of packages would NORMALLY be slow so by default don't do that.
  • A reasonable response to an installation unable to find failure would be if current design apt install fails, then and only then loop over the list of packages one at a time.

The above is somewhat contrived example but its possible to create a list of packages where one is present in the -ubuntu- tagged images and is not present in the -debian- tagged images so its a minor stumbling block when switching images etc.

Proposed code change

I have no idea. Just being honest here. Best of luck to you and your efforts are appreciated.

If I had to do this in a shell script I'd do something like this or maybe use xargs

while IFS= read -r package; do sudo apt -y -other-options-too install "$package"; done < packages_list.txt.or.whatever

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions