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

fix quoting of package name #25

Merged
merged 2 commits into from
Aug 31, 2019
Merged

fix quoting of package name #25

merged 2 commits into from
Aug 31, 2019

Conversation

hvariant
Copy link
Contributor

when installing packages such as lib32-libstdc++5

@kewlfft
Copy link
Owner

kewlfft commented Aug 31, 2019

thanks for your contribution, quote is in urllib.parse, can you use urllib.parse module instead?

@hvariant
Copy link
Contributor Author

sorry, I misread the documentation

@hvariant
Copy link
Contributor Author

lemme fix it

@kewlfft
Copy link
Owner

kewlfft commented Aug 31, 2019

have you tested it successfully ?

@hvariant
Copy link
Contributor Author

wait, it seems that in Python 2 it's urllib.quote, and they moved the function to urllib.parse.quote in Python 3

@kewlfft
Copy link
Owner

kewlfft commented Aug 31, 2019

yes and this is python 3

@hvariant
Copy link
Contributor Author

oh okay, I assume the code will work but I can do some more local testing in a bit

@kewlfft
Copy link
Owner

kewlfft commented Aug 31, 2019

yes please

@hvariant
Copy link
Contributor Author

Okay the change is working for me, here are the relevant bits from my playbook result:

TASK [add aur_builder user] ******************************************************************************************************************************************************************
ok: [vm-my-archbox.ir.local] => {"append": false, "changed": false, "comment": "", "group": 998, "home": "/home/aur_builder", "move_home": false, "name": "aur_builder", "shell": "/bin/bash", "state": "present", "uid": 1001}

TASK [allow aur_builder to run sudo without password] ****************************************************************************************************************************************
ok: [vm-my-archbox.ir.local] => {"backup": "", "changed": false, "msg": ""}

TASK [install lib32-libstdc++5 from AUR] *****************************************************************************************************************************************************
ok: [vm-my-archbox.ir.local] => {"changed": false, "helper": "makepkg", "msg": "package(s) already installed", "rc": 0}

and the playbook:

- name: add aur_builder user
  user:
    name: aur_builder
    group: wheel
  become: yes
  become_method: sudo

- name: allow aur_builder to run sudo without password
  lineinfile:
    path: /etc/sudoers.d/11-install-aur_builder
    line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
    create: yes
    validate: 'visudo -cf %s'
  become: yes
  become_method: sudo

- name: install lib32-libstdc++5 from AUR
  aur:
    use: makepkg
    name:
      - lib32-libstdc++5
  become: yes
  become_method: sudo
  become_user: aur_builder

@kewlfft kewlfft merged commit 9f52f50 into kewlfft:master Aug 31, 2019
@hvariant
Copy link
Contributor Author

thank you @kewlfft for merging

@hvariant hvariant deleted the fix-package-name-quote branch August 31, 2019 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants