Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] all: "Access is denied" in os.rename() on Windows #5359

Closed
klimkin opened this issue Apr 28, 2021 · 1 comment · Fixed by #5410, #5411, #5412, #5415 or #5416
Closed

[package] all: "Access is denied" in os.rename() on Windows #5359

klimkin opened this issue Apr 28, 2021 · 1 comment · Fixed by #5410, #5411, #5412, #5415 or #5416
Labels
bug Something isn't working

Comments

@klimkin
Copy link
Contributor

klimkin commented Apr 28, 2021

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: almost all packages affected
  • Operating System+version: Windows 10
  • Compiler+version: MSVC 16
  • Conan version: conan 1.35.2
  • Python version: Python 3.8.7

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os_build=Windows
os=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
compiler.runtime=MD
build_type=Release

Steps to reproduce (Include if Applicable)

This is a known issue. Solution provided by conan-io/conan#6774
However most recipes still use os.rename() and not tools.rename().

Log

b2/4.2.0: Configuring sources in C:\Users\xxx\.conan\data\b2\4.2.0\_\_\source
ERROR: b2/4.2.0: Error in source() method, line 58
os.rename(extracted_dir, "source")
PermissionError: [WinError 5] Access is denied: 'build-4.2.0' -> 'source'
@klimkin klimkin added the bug Something isn't working label Apr 28, 2021
@uilianries
Copy link
Member

@klimkin Thank you for reporting, we can add it to Hooks and prevent future errors.

adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
adklimki pushed a commit to klimkin/conan-center-index that referenced this issue May 3, 2021
conan-center-bot pushed a commit that referenced this issue May 4, 2021
* libiconv: replace os.rename with tools.rename

Fixes #5359 for libiconv.

* Update recipes/libiconv/all/conanfile.py

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>

* Remove reduntant tools.rename

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
conan-center-bot pushed a commit that referenced this issue May 4, 2021
* bzip2: replace os.rename with tools.rename

Fixes #5359 for bzip2.

* Update recipes/bzip2/all/conanfile.py

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>

* Update recipes/bzip2/all/conanfile.py

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
conan-center-bot pushed a commit that referenced this issue May 4, 2021
conan-center-bot pushed a commit that referenced this issue May 4, 2021
conan-center-bot pushed a commit that referenced this issue May 6, 2021
* zlib: replace os.rename with tools.rename

Fixes #5359 for zlib/1.2.11.

* Simplify using tools.get with strip_root=True

* Fix error when renaming into the same filename
AlvaroFS pushed a commit to AlvaroFS/conan-center-index that referenced this issue May 7, 2021
* libiconv: replace os.rename with tools.rename

Fixes conan-io#5359 for libiconv.

* Update recipes/libiconv/all/conanfile.py

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>

* Remove reduntant tools.rename

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
AlvaroFS pushed a commit to AlvaroFS/conan-center-index that referenced this issue May 7, 2021
* bzip2: replace os.rename with tools.rename

Fixes conan-io#5359 for bzip2.

* Update recipes/bzip2/all/conanfile.py

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>

* Update recipes/bzip2/all/conanfile.py

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
AlvaroFS pushed a commit to AlvaroFS/conan-center-index that referenced this issue May 7, 2021
AlvaroFS pushed a commit to AlvaroFS/conan-center-index that referenced this issue May 7, 2021
AlvaroFS pushed a commit to AlvaroFS/conan-center-index that referenced this issue May 7, 2021
* zlib: replace os.rename with tools.rename

Fixes conan-io#5359 for zlib/1.2.11.

* Simplify using tools.get with strip_root=True

* Fix error when renaming into the same filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment