snapcraft fails when two parts have the same file in the stage keyword

Bug #1686484 reported by Leo Arias
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rocket.Chat
New
Undecided
Unassigned
Snapcraft
New
Undecided
Unassigned

Bug Description

When two parts have the same stage entry, like this:

parts:
  part1:
    # See 'snapcraft plugins'
    plugin: dump
    stage: [test]
  part2:
    plugin: dump
    stage: [test]

Running snapcraft will fail in the stage step like this:

Preparing to pull part2
Pulling part2
Preparing to pull part1
Pulling part1
Preparing to build part2
Building part2
Preparing to build part1
Building part1
[Errno 2] No such file or directory: '/root/parts/part1/install/test'

The problem is that in lifecycle.py we have this:

for step in common.COMMAND_ORDER[0:step_index]:
    if step == 'stage':
        pluginhandler.check_for_collisions(self.config.all_parts)

It means that it will check for collisions even on parts that haven't been staged.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

But you seem to be getting those errors in the build step, not the stage step...

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.