[pacman-dev] [Pacman v5.0.0] alias: -g: invalid option
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... 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. ------------------ /************************* * 秦凡东 * arondight.me * @Arondight *************************/
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... 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
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@archlinux.org>; 发送时间: 2016年2月16日(星期二) 晚上6:54 收件人: "Discussion list for pacman development"<pacman-dev@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... 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
On Tue, Feb 16, 2016 at 12:04 PM, 秦凡东 <mail@arondight.me> wrote:
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...
_(:з」∠)_
From what you describe this problem, it seems you haven't properly split up your shell's different configurations without having one leak into any other, and not source .zshrc in .bashrc or such things, which are clearly the wrong thing to do. Your shell knows very well what to
source on its own. For the sake of being able to get rid of the errors, instead you could try wrapping your use of alias -g in your config with [[ -n "$BASH_VERSION" ]] && alias ... or if [[ ...as previously... ]]; then alias...; fi cheers! mar77i
HI Thack you very much I follow your idea and now everything is well. I made an mistake on a if statements. https://github.com/Arondight/profile/commit/48f13ebb36bb81a3967d790550c6484a... 这是我的锅 _(:з」∠)_ ------------------ /************************* * 秦凡东 * arondight.me * @Arondight *************************/ ------------------ 原始邮件 ------------------ 发件人: "Martti Kühne";<mysatyre@gmail.com>; 发送时间: 2016年2月16日(星期二) 晚上7:16 收件人: "Discussion list for pacman development"<pacman-dev@archlinux.org>; 主题: Re: [pacman-dev]回复: [Pacman v5.0.0] alias: -g: invalid option On Tue, Feb 16, 2016 at 12:04 PM, 秦凡东 <mail@arondight.me> wrote:
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...
_(:з」∠)_
From what you describe this problem, it seems you haven't properly split up your shell's different configurations without having one leak into any other, and not source .zshrc in .bashrc or such things, which are clearly the wrong thing to do. Your shell knows very well what to source on its own. For the sake of being able to get rid of the errors, instead you could try wrapping your use of alias -g in your config with [[ -n "$BASH_VERSION" ]] && alias ... or if [[ ...as previously... ]]; then alias...; fi cheers! mar77i
participants (3)
-
Allan McRae
-
Martti Kühne
-
秦凡东