Broken Symlinks when Ubuntu 24.04 with Python plugin and `override-prime` is used
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
The [fix for Ubuntu 24.04 with Python plugin](https://github.com/canonical/rockcraft/pull/498) doesn't work when `override-prime` is used. Doesn't even work when we use `craftctl default` in the `override-prime`.
### To Reproduce
Write a rock with Ubuntu 24.04 and Python plugin and do something in `override-prime`.
### Environment
Multipass
Ubuntu 22.04
Rockcraft 1.5.3
### rockcraft.yaml
```shell
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: indico
summary: Indico rock
description: Indico OCI image for the Indico charm
version: "1.0"
base: ubuntu@24.04
build-base: ubuntu@24.04
license: Apache-2.0
platforms:
amd64:
parts:
add-user:
plugin: nil
overlay-script: |
chmod 755 $CRAFT_OVERLAY/etc
groupadd -R $CRAFT_OVERLAY --gid 2000 indico
useradd -R $CRAFT_OVERLAY --system --gid 2000 --uid 2000 --home /srv/indico indico
indico:
plugin: python
build-environment:
- UWSGI_EMBED_PLUGINS: stats_pusher_statsd
python-packages:
- setuptools
- wheel
- indico==3.3.1
- indico-plugin-payment-paypal==3.3
- indico-plugin-piwik
- indico-plugin-storage-s3
- python3-saml
- uwsgi
- ./anonymize
- ./autocreate
source: plugins
build-packages:
- build-essential
- libpq-dev
- libsasl2-dev
- libxmlsec1-dev
- pkg-config
- wget
stage-packages:
- python3-venv
- python3-dev
- build-essential
- ca-certificates
- git-core
- libglib2.0-data
- libpq-dev
- libsasl2-dev
- locales
- logrotate
- pkg-config
- postgresql-client
- shared-mime-info
- texlive-fonts-recommended
- texlive-plain-generic
- texlive-xetex
- libpangocairo-1.0-0 # required for python3.12
overlay-packages:
- libxmlsec1-dev
stage-snaps:
- celery-prometheus-exporter/latest/edge
- gtrkiller-statsd-prometheus-exporter/latest/edge
override-prime: |
mkdir -p --mode=775 $CRAFT_PART_INSTALL/srv/indico/{archive,cache,custom,etc,log,tmp}
cp $CRAFT_PART_INSTALL/lib/python3.12/site-packages/indico/web/indico.wsgi $CRAFT_PART_INSTALL/srv/indico/indico.wsgi
cp -R $CRAFT_PART_INSTALL/lib/python3.12/site-packages/indico/web/static $CRAFT_PART_INSTALL/srv/indico/
chown -R 2000:2000 $CRAFT_PART_INSTALL/srv/indico
cp /etc/ssl/certs/ca-certificates.crt $CRAFT_PART_INSTALL/etc/ssl/certs/ca-certificates.crt
craftctl default
copy-config:
plugin: dump
source: .
organize:
start-indico.sh: srv/indico/start-indico.sh
etc/logrotate.conf: srv/indico/logrotate.conf
permissions:
- owner: 2000
group: 2000
- path: srv/indico/start-indico.sh
mode: "544"
- path: etc/
mode: "755"
prime:
- etc/*
- srv/indico/start-indico.sh
- srv/indico/logrotate.conf
```
### Relevant log output
```shell
.
```
Evaluation history
No evaluation history available.