Skip to content

install: does not remove path from files #1823

@SuperSandro2000

Description

@SuperSandro2000

While compiling python3 in nixpkgs I noticed that install does not properly work:

Python uses the similar commands to the following command autogenerated by autoconf to install files:

/store/7rj52iy8gvdwkrca5k35a7i4hhdgf90c-uutils-coreutils-0.0.4/bin/install -c -m 644 ./Lib/unittest/runner.py /nix/store/bg19k3h973swd0745mhhp5snzijz7hx3-python3-3.8.8/lib/python3.8/unittest

but install converts that to a wrong path and then prints that the directory does not exist:

install: error: cannot install './Lib/unittest/runner.py' to '/nix/store/bg19k3h973swd0745mhhp5snzijz7hx3-python3-3.8.8/lib/python3.8/unittest/./Lib/unittest/runner.py': the source path is not an existing regular file

A minimal reproduce is:

mkdir -p Lib/unittest lib/unittest
touch Lib/unittest/runner.py
install ./Lib/unittest/runner.py lib/unittest
install: error: cannot install './Lib/unittest/runner.py' to 'lib/unittest/./Lib/unittest/runner.py': No such file or directory (os error 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions