PBR

PBR does not properly handle spaces in data_files globs

Bug #1810934 reported by Will Szumski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Fix Released
Undecided
Will Szumski

Bug Description

with `pip install . -v`:

```
    error: can't copy 'ansible/roles/yatesr.timezone/templates/timezone-Arch': doesn't exist or not a regular file
error
Cleaning up...
  Removing source in /tmp/pip-req-build-r5m3_D
Removed build tracker '/tmp/pip-req-tracker-ihfGYU'
Command "/home/centos/kayobe-venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-r5m3_D/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ROaeUT/install-record.txt --single-version-externally-managed --compile --install-headers /home/centos/kayobe-venv/include/site/python2.7/kayobe" failed with error code 1 in /tmp/pip-req-build-r5m3_D/
```

```
(kayobe-venv) [centos@wjs-kayobe kayobe]$ ls ansible/roles/yatesr.timezone/templates/
timezone-Archlinux.j2 timezone-Arch Linux.j2 timezone-Debian.j2 timezone-RedHat.j2
```

```
(kayobe-venv) [centos@wjs-kayobe kayobe]$ pip freeze | grep pbr
pbr==5.1.1
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to pbr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/629161

Changed in pbr:
assignee: nobody → Will Szumski (willjs)
status: New → In Progress
Changed in pbr:
assignee: Will Szumski (willjs) → Mark Goddard (mgoddard)
Changed in pbr:
assignee: Mark Goddard (mgoddard) → Will Szumski (willjs)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to pbr (master)

Reviewed: https://review.opendev.org/629161
Committed: https://git.openstack.org/cgit/openstack/pbr/commit/?id=50356da8393abdb47cc6c64de4fa387d8499cbc4
Submitter: Zuul
Branch: master

commit 50356da8393abdb47cc6c64de4fa387d8499cbc4
Author: Will Szumski <email address hidden>
Date: Tue Jan 8 12:13:56 2019 +0000

    Fix white space handling in file names

    Previously, when using data_files with a glob that matched a file with
    whitespace in the name, pip would error with a message that the file
    does not exist, e.g:

        error: can't copy 'ansible/roles/yatesr.timezone/templates/timezone-Arch': doesn't exist or not a regular file

    The problem was that ansible/roles/yatesr.timezone/templates/timezone-Arch
    was a truncated form of the actual filename:

        ansible/roles/yatesr.timezone/templates/timezone-Arch Linux.j2

    Note the space in the filename and that it has been split on this space.

    This change allows you to use a glob that matches files with whitespace
    in the name. It does this by quoting the path.

    Change-Id: Id2cc32e4e40c1f834b19756e922118d8526358d3
    Fixes-Bug: 1810934

Changed in pbr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.