[elbe-devel] [PATCH v1 2/8] Add 'realpath' method to 'Filesystem'

Torben Hohn torben.hohn at linutronix.de
Thu May 23 13:09:31 CEST 2019


On Wed, May 22, 2019 at 03:33:42PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
>  elbepack/filesystem.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/elbepack/filesystem.py b/elbepack/filesystem.py
> index e1c08c5c..1d25225b 100644
> --- a/elbepack/filesystem.py
> +++ b/elbepack/filesystem.py
> @@ -84,6 +84,9 @@ class Filesystem(object):
>      def mkdir(self, path):
>          os.makedirs(self.fname(path))
>  
> +    def realpath(self, path):
> +        os.path.realpath(self.fname(path))
> +

suppose, you have

ln -s /etc/bla /rfs/etc/blu
ls -s /etc/zomg /rfs/etc/bla

shouldnt rfs.realpath('/etc/blu') point to /rfs/etc/zomg  ??

it does not do that... would point me to /etc/bla.


>      def symlink(self, src, path, allow_exists=False):
>          try:
>              os.symlink(src, self.fname(path))
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list