> On June 22, 2016, 5:23 p.m., Jie Yu wrote:
> > src/tests/containerizer/rootfs.hpp, line 142
> > <https://reviews.apache.org/r/48988/diff/1/?file=1425961#file1425961line142>
> >
> >     I am not sure if this logic still applies. For instance, if `/lib64 -> 
> > /xxx/lib64`.
> >     
> >     The realpath of `/lib64/librt.so.1` is `/xxx/lib64/librt.so.1`. 
> > However, `islink('/lib64/librt.so.1') == false`.
> >     
> >     I think you should test if `realpath.get() == file`?
> 
> Gilbert Song wrote:
>     The logic should not be changed here. It should be identical to the old 
> logic:
>     
>     1. get realpath and copy the file.
>     2. check islink() and copy the link.
>     
>     For the files listed, some of them are symlink, depending on diff OS. So 
> for example, the realpath of `/lib/x86_64-linux-gnu` is 
> `/lib/x86_64-linux-gnu/ld-2.19.so`, and in this case 
> `islink('/lib/x86_64-linux-gnu')` is not false.
>     
>     I dont understand why you want to do the `realpath.get() == file` check 
> here. If it is a file, it was already copied sbove. We only want to handle 
> all the symlinks here altogether. 
>     
>     PS: In CentOS and Fedora, `/usr/bin/sh` is a symlink as well, pointing to 
> `/usr/bin/bash`. They are pretty common cases that some executable/library 
> files are symlink.

what if the file itself is not a link, but the directory that contains it is a 
symlink?


- Jie


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48988/#review139087
-----------------------------------------------------------


On June 21, 2016, 2:45 a.m., Gilbert Song wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48988/
> -----------------------------------------------------------
> 
> (Updated June 21, 2016, 2:45 a.m.)
> 
> 
> Review request for mesos, Zhiwei Chen, haosdent huang, Artem Harutyunyan, Jie 
> Yu, and Timothy Chen.
> 
> 
> Bugs: MESOS-4943
>     https://issues.apache.org/jira/browse/MESOS-4943
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Reduced test linux rootfs size.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/rootfs.hpp 19ec7bf50e599f5420453e8cb7d12357770d3fd8 
> 
> Diff: https://reviews.apache.org/r/48988/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>

Reply via email to