How to update .deb from local files and ignore dependensies?

Hi all again.

I’ve a Debian server with installed Foundation DB 7 .
According to FDB architecture, you need to install two packages on server:

  • foundationdb-clients-7.3.63
  • foundationdb-server-7.3.63

I did fresh install with this code, using locally downloaded packages:

................................
- name: Install by APT | Package installation (version {{ package_version }})
  ansible.builtin.apt:
    deb: "{{ ansible_user_dir }}/{{ item.path | basename }}"
    state: present
    install_recommends: true
  with_items: "{{ deb_names.files | sort(attribute='path') }}"
  become: true

And it works fine.

But when I try to update these packages with locally downloaded files from 7.3.63 → 7.3.69 with the same code on this Debian server I got an error:

fdb.server:
item={'path': 'files/foundationdb-clients_7.3.69-1_amd64.deb'}
    "msg": "Breaks existing package 'foundationdb-server' dependency foundationdb-clients (= 7.3.63-1)"
item={'path': 'files/foundationdb-server_7.3.69-1_amd64.deb'}:
    "msg": "Dependency is not satisfiable: foundationdb-clients (= 7.3.69-1)"

When I did it on RedHat server - there is no problem with option " skip_broken: true".

Could you, please, help to solve this?

Since you are using a loop (with_items), your code is trying to update one package at a time which is not possible. Both packages must be updated in one go with one call to the apt package manager because they are mutually dependent.

Now, you seem to have hit a limitation in the apt module. The module can accept list of packages in it’s name parameter but deb parameter does not accept a list - only a single path/string. This is according to the documentation - I have not dug into the source code to see if there is some extra handling for deb parameter. If deb parameter supported a list of package paths like the name parameter, then this would be easy to solve.

That being said, I think your only solution is to use the shell module and call apt install shell command line with both packages specified in the command line.

1 Like

Thank you very much for detailed description.
I think so, that shell module is one acceptable method.