Skip to content

Commit 7f3dad4

Browse files
author
Derek
committed
fix(gnome): use --user for pip/pipx upgrade, not --break-system-packages
Install latest pip/pipx to user's ~/.local/bin directory instead of modifying system packages. This is cleaner and safer.
1 parent e41e605 commit 7f3dad4

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

ansible/roles/dfe_developer/tasks/gnome_common.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,23 @@
4848
changed_when: false
4949
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
5050

51-
# Distro-packaged pip/pipx can be outdated. Upgrade to latest via pip.
52-
# --break-system-packages allows modifying system Python packages.
51+
# Distro-packaged pipx can be outdated (Ubuntu 24.04 has 1.4.3).
5352
# community.general.pipx requires >= 1.7.0 for application parameter.
54-
- name: Upgrade pip to latest
55-
ansible.builtin.pip:
56-
name: pip
57-
state: latest
58-
extra_args: --user --break-system-packages
53+
# Install latest pip/pipx to user's ~/.local/bin (does NOT modify system packages)
54+
- name: Install latest pip to user directory
55+
ansible.builtin.command:
56+
cmd: python3 -m pip install --user --upgrade pip
5957
become: false
6058
become_user: "{{ dfe_actual_user }}"
59+
changed_when: false
6160
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
6261

63-
- name: Upgrade pipx to latest
64-
ansible.builtin.pip:
65-
name: pipx
66-
state: latest
67-
extra_args: --user --break-system-packages
62+
- name: Install latest pipx to user directory
63+
ansible.builtin.command:
64+
cmd: python3 -m pip install --user --upgrade pipx
6865
become: false
6966
become_user: "{{ dfe_actual_user }}"
67+
changed_when: false
7068
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
7169

7270
- name: Install gnome-extensions-cli via pipx

0 commit comments

Comments
 (0)