Read-only file system when running snapcraft from snap

Bug #1740595 reported by Erik Lönroth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Undecided
Unassigned

Bug Description

* I'm trying to build a snap.

* I have snapcraft installed from "snap install snapcraft --classic"

When running

$ sudo snapcraft

The build fails with:

...
...
...
File "/root/build_django-gunicorn/parts/django-gunicorn/install/usr/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/snap/snapcraft/794/django-gunicorn'
Traceback (most recent call last):
  File "/snap/snapcraft/794/bin/snapcraft", line 11, in <module>
    load_entry_point('snapcraft==2.35', 'console_scripts', 'snapcraft')()
...
...
...

* I then remove the snap and replace it with the version from the os:
snapcraft, version 2.35

* Then, the build completed successfully:

Snapping 'django-gunicorn' |
Snapped django-gunicorn_0.1_amd64.snap

$ snap search snapcraft
Name Version Developer Notes Summary
snapcraft 2.35 canonical classic easily create snaps

More information:

* In my snapcraft.yaml, I have this:

...
...
...
parts:
  django-gunicorn:
    plugin: python
    source: .
    python-version: python3
    requirements: requirements.txt
    stage-packages: [libpq-dev,libssl-dev]
    prime:
      - -.venv
    install: |
      mkdir -p $SNAPCRAFT_PART_INSTALL/django-gunicorn
      python3 ./manage.py collectstatic --no-input
      cp -r ./* $SNAPCRAFT_PART_INSTALL/django-gunicorn/
...
...
...

Would this cause problems?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

This should no longer be a problem with Snapcraft 4.x (or 3.x)

Changed in snapcraft:
status: New → 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.