aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2014-08-10 21:00:49 -0400
committerDevan Franchini <twitch153@gentoo.org>2014-08-15 17:42:41 -0400
commitc3b6f7c9de1bd5723cd132e2ed66a9e8e557f22a (patch)
treeea0f12be371995c79b365e67df28ddc04466c3e3 /layman/api.py
parentMigrates run_command to utily.py (diff)
downloadlayman-c3b6f7c9de1bd5723cd132e2ed66a9e8e557f22a.tar.gz
layman-c3b6f7c9de1bd5723cd132e2ed66a9e8e557f22a.tar.bz2
layman-c3b6f7c9de1bd5723cd132e2ed66a9e8e557f22a.zip
Adds layman-mounter utility script
api.py: Adds Mounter() initialization in the LaymanAPI. constants.py: Adds MOUNT_TYPES to constants to keep track of mountable overlay classes. archive.py: Adds check to unmount overlays if they are being synced.
Diffstat (limited to 'layman/api.py')
-rwxr-xr-xlayman/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/layman/api.py b/layman/api.py
index bae6972..0f43f28 100755
--- a/layman/api.py
+++ b/layman/api.py
@@ -27,6 +27,7 @@ from layman.overlays.source import require_supported
#from layman.utils import path, delete_empty_directory
from layman.compatibility import encode
from layman.utils import verify_overlay_src
+from layman.mounter import Mounter
if sys.hexversion >= 0x30200f0:
STR = str
@@ -68,6 +69,10 @@ class LaymanAPI(object):
self._error_messages = []
self.sync_results = []
+ self.config.set_option('mounts', Mounter(self._get_installed_db,
+ self.get_installed,
+ config=self.config))
+
def is_repo(self, ovl):
"""validates that the ovl given is a known repo id