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

秦凡东 mail at arondight.me
Tue Feb 16 11:04:32 UTC 2016


HI

I always use zsh and this ocurred in zsh... And for same setting (both profile and shell), pacman 4.X is work well, but 5.0 will show alias error, I don't kown why...

_(:з」∠)_  


------------------ 原始邮件 ------------------
发件人: "Allan McRae";<allan at archlinux.org>;
发送时间: 2016年2月16日(星期二) 晚上6:54
收件人: "Discussion list for pacman development"<pacman-dev at archlinux.org>; 

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



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