moz-phab fails auto update on Windows
Categories
(Conduit :: moz-phab, defect, P2)
Tracking
(Not tracked)
People
(Reporter: emk, Assigned: zalun)
Details
(Keywords: conduit-triaged)
Attachments
(1 file)
$ moz-phab
Updating libphutil...
Update of libphutil not required
Updating arcanist...
Update of arcanist not required
Upgrading to version 0.1.71
Collecting MozPhab
Downloading https://files.pythonhosted.org/packages/e1/ca/2f5936ad3263c6b230ad634760629f3d11f2f3c47128d19e6259834ce402/MozPhab-0.1.71.tar.gz (56kB)
|████████████████████████████████| 61kB ...
Requirement already satisfied, skipping upgrade: setuptools in d:\mozilla-build\python3\lib\site-packages (from MozPhab) (41.4.0)
Installing collected packages: MozPhab
Found existing installation: MozPhab 0.1.68
Uninstalling MozPhab-0.1.68:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] アクセスが拒否されました。: 'd:\\mozilla-build\\python3\\scripts\\moz-phab.exe'
Consider using the `--user` option or check the permissions.
CommandError: command 'd:\mozilla-build\python3\python3.exe' failed to complete successfully
$ moz-phab
Cannot open d:\mozilla-build\python3\Scripts\moz-phab-script.py
$
I had to run pip3 install MozPhab
to recover.
This is a different issue from bug 1591048.
Comment 1•4 years ago
|
||
Hmm, interesting - how did you install MozPhab
the first time? Did you pip3 install MozPhab
, was it installed from mach bootstrap
/mach vcs-setup
, or did you install it manually?
Also, FWIW, is d:\\mozilla-build\\python3\\scripts
only writable by an admin?
Reporter | ||
Comment 2•4 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] from comment #1)
Hmm, interesting - how did you install
MozPhab
the first time? Did youpip3 install MozPhab
, was it installed frommach bootstrap
/mach vcs-setup
, or did you install it manually?
I installed moz-phab manually when it was a one-file script.
(By the way, will ./mach bootstrap
install MozPhab
? It only shows a URL about an installation instruction for me.)
Also, FWIW, is
d:\\mozilla-build\\python3\\scripts
only writable by an admin?
It is writable by all users. pip3 install MozPhab
installed MozPhab
to that directory without any problems.
Comment 3•4 years ago
|
||
I installed moz-phab manually when it was a one-file script.
:emk, Is the moz-phab
at d:\\mozilla-build\\python3\\scripts\\moz-phab.exe
the one that you installed manually, or have you since done pip install MozPhab
(and pip
put it there)?
(By the way, will ./mach bootstrap install MozPhab? It only shows a URL about an installation instruction for me.)
IIRC ./mach bootstrap
used to install moz-phab itself, but I could be mistaken.
Looking into our self-upgrade code, I'm seeing this
self_file = Path(__file__).resolve()
user_file = Path(site.getuserbase()).resolve() / "bin" / self_file.name
if self_file == user_file:
command.append("--user")
This looks like it could be a *nix-specific assumption? I'm going to leave this ticket for zalun/glob, who are more familiar with the self-update implementation :)
Reporter | ||
Comment 4•4 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] from comment #3)
I installed moz-phab manually when it was a one-file script.
:emk, Is the
moz-phab
atd:\\mozilla-build\\python3\\scripts\\moz-phab.exe
the one that you installed manually, or have you since donepip install MozPhab
(andpip
put it there)?
It was moz-phab
(no extension, a python script.) I created %userprofile%\phabricator
directory manually and put the moz-phab
file manually. The install instruction at that point said that I can put the script anywhere as long as the %PATH%
is set correctly.
The script automatically updated to the multi-file version a while ago. Auto-update worked several times until I encounter this bug.
Assignee | ||
Updated•4 years ago
|
user_file = Path(site.getuserbase()).resolve() / "bin" / self_file.name
This looks like it could be a *nix-specific assumption?
I had to find the scripts path for another project; here's code that works on MacOS, Linux, and MozillaBuild:
from distutils.dist import Distribution
d = Distribution()
d.parse_config_files()
i = d.get_command_obj('install', create=True)
i.user = False
i.finalize_options()
scripts_path = i.install_scripts
Setting i.user = True
will return the path to --user
installed scripts.
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 6•4 years ago
•
|
||
Today this happened again. I guess this will happen ever time moz-phab updates.
Assignee | ||
Comment 7•4 years ago
|
||
Comment hidden (obsolete) |
Reporter | ||
Comment 9•4 years ago
|
||
$ moz-phab self-update
Updating libphutil...
libphutil updated
Updating arcanist...
Update of arcanist not required
Collecting MozPhab
Downloading https://files.pythonhosted.org/packages/17/25/1c0b9c654d9bd623404c5b561a65e255c3beba67c52d6786e7a135523c2b/MozPhab-0.1.73.tar.gz (57kB)
|████████████████████████████████| 61kB 3.8MB/s
Requirement already satisfied, skipping upgrade: setuptools in d:\mozilla-build\python3\lib\site-packages (from MozPhab) (41.4.0)
Installing collected packages: MozPhab
Found existing installation: MozPhab 0.1.72
Uninstalling MozPhab-0.1.72:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] アクセスが拒否されました。: 'd:\\mozilla-build\\python3\\scripts\\moz-phab.exe'
Consider using the `--user` option or check the permissions.
CommandError: command 'd:\mozilla-build\python3\python3.exe' failed to complete successfully
Run moz-phab again with '--trace' to show the stack trace
$ moz-phab self-update
Cannot open d:\mozilla-build\python3\Scripts\moz-phab-script.py
$
Reporter | ||
Comment 10•4 years ago
|
||
$ pip3 install MozPhab
Collecting MozPhab
Downloading https://files.pythonhosted.org/packages/17/25/1c0b9c654d9bd623404c5b561a65e255c3beba67c52d6786e7a135523c2b/MozPhab-0.1.73.tar.gz (57kB)
|████████████████████████████████| 61kB 1.3MB/s
Requirement already satisfied: setuptools in d:\mozilla-build\python3\lib\site-packages (from MozPhab) (41.4.0)
Installing collected packages: MozPhab
Running setup.py install for MozPhab ... done
Successfully installed MozPhab-0.1.73
WARNING: You are using pip version 19.3; however, version 20.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
$
Reporter | ||
Comment 11•4 years ago
|
||
I still get this error everytime I upgrade moz-phab via moz-phab itself. (pip3 install
works.)
Assignee | ||
Comment 12•4 years ago
|
||
This one?
$ moz-phab self-update
Cannot open d:\mozilla-build\python3\Scripts\moz-phab-script.py
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 13•4 years ago
|
||
For the first time, I get
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] アクセスが拒否されました。: 'd:\\mozilla-build\\python3\\scripts\\moz-phab.exe'
Consider using the `--user` option or check the permissions.
CommandError: command 'd:\mozilla-build\python3\python3.exe' failed to complete successfully
Run moz-phab again with '--trace' to show the stack trace
This error breaks the existing installation. Therefore, if I rerun the command, I get
Cannot open d:\mozilla-build\python3\Scripts\moz-phab-script.py
until I run pip3 install MozPhab
to repair the install.
Reporter | ||
Comment 14•4 years ago
|
||
Upgrading to version 0.1.85 succeeded without any errors!
Description
•