Skip to content

Bug: top level directories are removed if there is only one #370

@smoser

Description

@smoser

stacker version

v0.30.1-15-gdc0ada0

Describe the bug

If you attempt to build the stacker.yaml below it will fail.
The reason is that the /files directory is stripped away in the 'mybuild' layer. The files 'subuid' and 'subgid' are directly in /.

$ stacker build --layer-type=squashfs --layer-type=tar
...
error: lstat /files/subuid: no such file or directory
error: execute failed: exit status 1
error: exit status 1
$ cat stacker.yaml 
mybuild:
  from:
    type: scratch
  import:
    - path: /etc/subuid
      dest: /files/
    - path: /etc/subgid
      dest: /files

mytest:
  from: 
    type: docker
    url: docker://ubuntu:latest
  import:
    - stacker://mybuild/files/subuid
    - stacker://mybuild/files/subgid
  run: |
    ls -l /stacker

To reproduce

No response

Expected behavior

No response

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions