summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/metadata.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/backend/metadata.py b/src/backend/metadata.py
index a27e06a..99384a0 100644
--- a/src/backend/metadata.py
+++ b/src/backend/metadata.py
@@ -6,7 +6,7 @@ import shutil
import subprocess
import sisyphus.filesystem
-def regenSilent():
+def regenMetadata():
if os.path.isdir(sisyphus.filesystem.portageMetadataDir):
for files in os.listdir(sisyphus.filesystem.portageMetadataDir):
if os.path.isfile(os.path.join(sisyphus.filesystem.portageMetadataDir, files)):
@@ -19,16 +19,9 @@ def regenSilent():
portageExecStage2 = subprocess.Popen(['emerge', '--quiet', '--metadata'], stdout=subprocess.PIPE)
portageExecStage2.wait()
-@animation.wait("refreshing metadata")
-def regenAnimated():
- if os.path.isdir(sisyphus.filesystem.portageMetadataDir):
- for files in os.listdir(sisyphus.filesystem.portageMetadataDir):
- if os.path.isfile(os.path.join(sisyphus.filesystem.portageMetadataDir, files)):
- os.remove(os.path.join(sisyphus.filesystem.portageMetadataDir, files))
- else:
- shutil.rmtree(os.path.join(sisyphus.filesystem.portageMetadataDir, files))
+def regenSilent():
+ regenMetadata()
- portageExecStage1 = subprocess.Popen(['emerge', '--quiet', '--regen'], stdout=subprocess.PIPE)
- portageExecStage1.wait()
- portageExecStage2 = subprocess.Popen(['emerge', '--quiet', '--metadata'], stdout=subprocess.PIPE)
- portageExecStage2.wait()
+@animation.wait("regenerating package metadata")
+def regenAnimated():
+ regenMetadata()