Upgrade to Debian 11 Bullseye - register-python-argcomplete not found

246 views
Skip to first unread message

cortex...@gmail.com

unread,
Sep 6, 2021, 6:41:58 AM9/6/21
to Barman, Backup and Recovery Manager for PostgreSQL
Debian 11 removed python 2 version.
When logging to server, there are such errors:
-bash: register-python-argcomplete: command not found

SOMESERVER ~ # grep argcomplete /etc/bash_completion.d/*
/etc/bash_completion.d/barman:eval "$(register-python-argcomplete barman)"

Argcomplete is now python 3 version:

i   bash-completion                                                                                - programmable completion for the bash shell
i A python3-argcomplete                                                                            - bash tab completion for argparse (for Python 3)

Abhijit Menon-Sen

unread,
Sep 6, 2021, 6:49:55 AM9/6/21
to pgba...@googlegroups.com
On Mon, Sep 6, 2021 at 4:12 PM cortex...@gmail.com
<cortex...@gmail.com> wrote:
>
> SOMESERVER ~ # grep argcomplete /etc/bash_completion.d/*
> /etc/bash_completion.d/barman:eval "$(register-python-argcomplete barman)"

Use a newer version of Barman.

$ cat scripts/barman.bash_completion
eval "$((register-python-argcomplete3 barman ||
register-python-argcomplete barman) 2>/dev/null)"

-- Abhijit

cortex...@gmail.com

unread,
Sep 7, 2021, 3:49:16 AM9/7/21
to Barman, Backup and Recovery Manager for PostgreSQL
# apt-cache policy barman
barman:
  Installed: 2.13-1.pgdg110+1
  Candidate: 2.13-1.pgdg110+1
  Version table:
 *** 2.13-1.pgdg110+1 995
        995 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages
        100 /var/lib/dpkg/status

There is no newer version. Barman package was originally installed years ago and upgraded as new versions arrived. Probably some upgrade missed changing the script definition.

Abhijit Menon-Sen

unread,
Sep 7, 2021, 4:13:25 AM9/7/21
to pgba...@googlegroups.com
On Tue, Sep 7, 2021 at 1:19 PM cortex...@gmail.com
<cortex...@gmail.com> wrote:
>
> # apt-cache policy barman
> barman:
> Installed: 2.13-1.pgdg110+1
> Candidate: 2.13-1.pgdg110+1
> Version table:
> *** 2.13-1.pgdg110+1 995
> 995 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages
> 100 /var/lib/dpkg/status

Does your /etc/bash_completion.d/barman actually belong to the barman
package? The current package installs
/usr/share/bash-completion/completions/barman.

-- Abhijit

cortex...@gmail.com

unread,
Sep 8, 2021, 5:57:57 AM9/8/21
to Barman, Backup and Recovery Manager for PostgreSQL
# ls -al /etc/bash_completion.d/
total 32
drwxr-xr-x   2 root root  4096 Aug 18  2020 .
drwxr-xr-x 122 root root 12288 Sep  1 14:59 ..
-rw-r--r--   1 root root    45 May 23  2018 barman

I don't have access to old deb packages, so can't 200% confirm it, but i didn't found any package with "barman" in name on deb webpages from stretch to bullseye. I deleted it, because there is version in /usr/share...
Reply all
Reply to author
Forward
0 new messages