# #
###############################################################################
+import errno
import os
import uuid
Sets up the environment by installing some basic packages
"""
# XXX this needs to be unique for each distribution
- snapshot_path = "/tmp/pakfire-snapshot.tar"
+ snapshot_path = "/var/cache/pakfire/snapshot-XXX.tar.zst"
# Restore the snapshot if available
try:
self.pakfire.restore_snapshot(snapshot_path)
- except FileNotFoundError:
- pass
+
+ # Ignore if no snapshot was present
+ except IOError as e:
+ if e.code == errno.ENOENT:
+ pass
+ else:
+ raise
# Install any updates and essential packages
# If there have been updates, or on a fresh install, re-create the snapshot