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