[elbe-devel] [PATCH v2 5/8] Check existance of '/rfs/etc/apt/sources.list' with 'lexist'
dion at linutronix.de
dion at linutronix.de
Tue May 28 12:06:03 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Since we're going to write to '/rfs/etc/apt/sources.list' we
want to make sure that we don't write to a broken link.
Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hogn at linutronix.de>
---
elbepack/rfs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index 78da015b..ee942b81 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -254,7 +254,7 @@ class BuildEnv (object):
def initialize_dirs(self, build_sources=False):
mirror = self.xml.create_apt_sources_list(build_sources=build_sources)
- if self.rfs.exists("etc/apt/sources.list"):
+ if self.rfs.lexists("etc/apt/sources.list"):
self.rfs.remove("etc/apt/sources.list")
self.rfs.write_file("etc/apt/sources.list", 0o644, mirror)
--
2.11.0
More information about the elbe-devel
mailing list