mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [BUG v2017.07.0] readlink -f command broken?
@ 2017-06-30 13:28 Ian Abbott
  2017-06-30 17:37 ` Jean-Christophe PLAGNIOL-VILLARD
  2017-07-01 21:50 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Abbott @ 2017-06-30 13:28 UTC (permalink / raw)
  To: Barebox List

Hi folks,

I know there were changes to do with links to directories in v2017.07.0, 
but this looks like a bug in readlink with the -f option:

barebox@fred:/ ls -l /mnt/root
lrwxrwxrwx              7 bin -> usr/bin
drwxr-xr-x            304 boot
drwxr-xr-x            160 dev
drwxr-xr-x           1920 etc
drwxrwsr-x            160 home
lrwxrwxrwx              7 lib -> usr/lib
drwxr-xr-x            160 mnt
dr-xr-xr-x            160 proc
drwx------            160 root
drwxr-xr-x            160 run
lrwxrwxrwx              8 sbin -> usr/sbin
drwxr-xr-x            224 srv
drwxr-xr-x            160 sys
drwxrwxrwt            160 tmp
drwxr-xr-x            480 usr
drwxr-xr-x            544 var
barebox@fred:/ readlink -f /mnt/root/lib libdir
barebox@fred:/ echo $libdir
/usr

(I expected $libdir to contain "/mnt/root/usr/lib" here, as it did in 
barebox v2017.06.1.)

(Let's try it without the -f option....)

barebox@fred:/ readlink /mnt/root/lib libdir2
barebox@fred:/ echo $libdir2
usr/lib

(That is the same as barebox v2017.06.1.)

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG v2017.07.0] readlink -f command broken?
  2017-06-30 13:28 [BUG v2017.07.0] readlink -f command broken? Ian Abbott
@ 2017-06-30 17:37 ` Jean-Christophe PLAGNIOL-VILLARD
  2017-07-01 21:50 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2017-06-30 17:37 UTC (permalink / raw)
  To: Ian Abbott; +Cc: Barebox List

HI,

	I wrote the symlink support in barebox

	But I Worte a partial support only end path file not dirs

	As this is a boot loader not an OS

Best Regards,
J.
> On 30 Jun 2017, at 9:28 PM, Ian Abbott <abbotti@mev.co.uk> wrote:
> 
> Hi folks,
> 
> I know there were changes to do with links to directories in v2017.07.0, but this looks like a bug in readlink with the -f option:
> 
> barebox@fred:/ ls -l /mnt/root
> lrwxrwxrwx              7 bin -> usr/bin
> drwxr-xr-x            304 boot
> drwxr-xr-x            160 dev
> drwxr-xr-x           1920 etc
> drwxrwsr-x            160 home
> lrwxrwxrwx              7 lib -> usr/lib
> drwxr-xr-x            160 mnt
> dr-xr-xr-x            160 proc
> drwx------            160 root
> drwxr-xr-x            160 run
> lrwxrwxrwx              8 sbin -> usr/sbin
> drwxr-xr-x            224 srv
> drwxr-xr-x            160 sys
> drwxrwxrwt            160 tmp
> drwxr-xr-x            480 usr
> drwxr-xr-x            544 var
> barebox@fred:/ readlink -f /mnt/root/lib libdir
> barebox@fred:/ echo $libdir
> /usr
> 
> (I expected $libdir to contain "/mnt/root/usr/lib" here, as it did in barebox v2017.06.1.)
> 
> (Let's try it without the -f option....)
> 
> barebox@fred:/ readlink /mnt/root/lib libdir2
> barebox@fred:/ echo $libdir2
> usr/lib
> 
> (That is the same as barebox v2017.06.1.)
> 
> -- 
> -=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
> -=(                          Web: http://www.mev.co.uk/  )=-
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG v2017.07.0] readlink -f command broken?
  2017-06-30 13:28 [BUG v2017.07.0] readlink -f command broken? Ian Abbott
  2017-06-30 17:37 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2017-07-01 21:50 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2017-07-01 21:50 UTC (permalink / raw)
  To: Ian Abbott; +Cc: Barebox List

Hi Ian,

On Fri, Jun 30, 2017 at 02:28:49PM +0100, Ian Abbott wrote:
> Hi folks,
> 
> I know there were changes to do with links to directories in v2017.07.0, but
> this looks like a bug in readlink with the -f option:
> 
> barebox@fred:/ ls -l /mnt/root
> lrwxrwxrwx              7 bin -> usr/bin
> drwxr-xr-x            304 boot
> drwxr-xr-x            160 dev
> drwxr-xr-x           1920 etc
> drwxrwsr-x            160 home
> lrwxrwxrwx              7 lib -> usr/lib
> drwxr-xr-x            160 mnt
> dr-xr-xr-x            160 proc
> drwx------            160 root
> drwxr-xr-x            160 run
> lrwxrwxrwx              8 sbin -> usr/sbin
> drwxr-xr-x            224 srv
> drwxr-xr-x            160 sys
> drwxrwxrwt            160 tmp
> drwxr-xr-x            480 usr
> drwxr-xr-x            544 var
> barebox@fred:/ readlink -f /mnt/root/lib libdir
> barebox@fred:/ echo $libdir
> /usr
> 
> (I expected $libdir to contain "/mnt/root/usr/lib" here, as it did in
> barebox v2017.06.1.)
> 
> (Let's try it without the -f option....)
> 
> barebox@fred:/ readlink /mnt/root/lib libdir2
> barebox@fred:/ echo $libdir2
> usr/lib
> 
> (That is the same as barebox v2017.06.1.)

I can confirm this. It's the same here. So far I was not able to find a
solution. I think readlink for directories must have been broken before
the directory link support though, since links to directories were not
supported. It may have worked in this simple case, but if multiple
levels of links were involved I don't think it could have been working
before.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-01 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 13:28 [BUG v2017.07.0] readlink -f command broken? Ian Abbott
2017-06-30 17:37 ` Jean-Christophe PLAGNIOL-VILLARD
2017-07-01 21:50 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox