Consecutive runs of rockcraft pack fail
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Hi!
I've came across an error when trying to pack for second time an image containing a part that creates a group and a user. The first run is successful but the second one throws an error stating that the group already exists. When running `rockcraft clean` the `pack` succeeds again
```
Executing action
:: + addgroup --gid 2000 indico
:: addgroup: The group `indico' already exists.
'overlay-script' in part 'add-user' failed with code 1.
```
The rockcraft.yaml is as follows:
```
name: indico
summary: Indico rock
description: Indico OCI image for the Indico charm
version: "1.0"
base: bare
build-base: ubuntu:22.04
license: Apache-2.0
platforms:
amd64:
parts:
add-user:
plugin: nil
overlay-script: |
addgroup --gid 2000 indico
adduser --system --gid 2000 --uid 2000 --home /srv/indico indico
```
Thank you
Evaluation history
No evaluation history available.