[pacman-dev] [Pacman v5.0.0] alias: -g: invalid option

Allan McRae allan at archlinux.org
Tue Feb 16 10:54:47 UTC 2016


On 16/02/16 20:49, 秦凡东 wrote:
> Hi
> 
> When I install/uninstall/upgrade some package, pacman will report "alias: -g: invalid option". This is only for pacman 5.0, and everything is well for pacman 4.X.
> 
> These `alias -g` are from my profile for zsh, `alias -g` is avaliable in zsh, but not in bash. I noticed that pacman will run **bash** sometime. I think this is the reason of this issue.
> 
> For more info you can see:
> https://github.com/Arondight/profile/blob/master/zsh/.zsh/alias/global_alias.zsh
> and (I do not good at English so I write in Chinese)
> https://github.com/Arondight/profile/issues/1
> 
> Here is the log:
> 
> debug: updating database
> debug: adding database entry 'libreoffice-fresh'
> debug: writing libreoffice-fresh-5.1.0-1 DESC information back to db
> debug: writing libreoffice-fresh-5.1.0-1 FILES information back to db
> debug: adding entry 'libreoffice-fresh' in 'local' cache
> debug: executing ". /tmp/alpm_K4Tgli/.INSTALL; post_install 5.1.0-1"
> debug: executing "/usr/bin/bash" under chroot "/"
> /home/ispeller/.zsh/alias/global_alias.zsh: line 13: alias: -g: invalid option
> alias: usage: alias [-p] [name[=value] ... ]
> /home/ispeller/.zsh/alias/global_alias.zsh: line 20: alias: -g: invalid option
> alias: usage: alias [-p] [name[=value] ... ]
> /home/ispeller/.zsh/alias/global_alias.zsh: line 21: alias: -g: invalid option
> alias: usage: alias [-p] [name[=value] ... ]
> /home/ispeller/.zsh/alias/global_alias.zsh: line 22: alias: -g: invalid option
> alias: usage: alias [-p] [name[=value] ... ]
> /home/ispeller/.zsh/alias/global_alias.zsh: line 23: alias: -g: invalid option
> alias: usage: alias [-p] [name[=value] ... ]
> debug: call to waitpid succeeded
> 
> I don't kown whether it is a bug, I am very sorry if this is not a bug.

I'd say not a bug...  pacman is calling bash to run the install
scriptlets.  My guess is you are sourcing your zsh config in a bash
specific file.

Allan


More information about the pacman-dev mailing list