On Mon, 2009-01-05 at 00:32 +0530, Kamalesh Babulal wrote:
> * CAI Qian <[email protected]> [2009-01-04 05:09:01]:
> 
> > Hi,
> > 
> > 
> > --- On Fri, 1/2/09, Kamalesh Babulal <[email protected]> wrote:
> > 
> > > From: Kamalesh Babulal <[email protected]>
> > > Subject: [LTP] [PATCH] Convert hardlinks to softlinks in 
> > > testcases/commands/unzip/Makefile
> > > To: "Subrata Modak" <[email protected]>
> > > Cc: "ltp-list" <[email protected]>
> > > Date: Friday, January 2, 2009, 10:21 PM
> > > Hi Subrata,
> > > 
> > >   The make install of the testcases/commands/unzip fails,
> > > when the 
> > > ltp sources are mounted on different filesystem other than
> > > /tmp, because 
> > > the hardlinks are created by the testcase Makefile.
> > > 
> > > make[3]: Entering directory
> > > `/mnt/ltp-full-20081231/testcases/commands/unzip'
> > > ln -f unzip_tests.sh ../../bin/unzip_tests.sh
> > > ln -f tst_unzip_file.zip ../../bin/tst_unzip_file.zip
> > > ln -f tst_unzip_file.zip /tmp/tst_unzip_file.zip
> > > ln: creating hard link `/tmp/tst_unzip_file.zip' to
> > > `tst_unzip_file.zip': Invalid cross-device link
> > > make[3]: *** [install] Error 1
> > > 
> > >   This patches converts the hardlinks to softlinks.
> > > 
> > > Signed-off-by: Kamalesh Babulal
> > > <[email protected]>
> > > ---
> > >  testcases/commands/unzip/Makefile |    6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > Index: ltp/testcases/commands/unzip/Makefile
> > > ===================================================================
> > > --- ltp.orig/testcases/commands/unzip/Makefile
> > > +++ ltp/testcases/commands/unzip/Makefile
> > > @@ -2,9 +2,9 @@ all:
> > >   ./unzip_genfile.sh
> > >  
> > >  install:
> > > - ln -f unzip_tests.sh ../../bin/unzip_tests.sh
> > > - ln -f tst_unzip_file.zip ../../bin/tst_unzip_file.zip
> > > - ln -f tst_unzip_file.zip /tmp/tst_unzip_file.zip
> > > + ln -sf unzip_tests.sh ../../bin/unzip_tests.sh
> > > + ln -sf tst_unzip_file.zip ../../bin/tst_unzip_file.zip
> > 
> > Are you really want to change the above two soft links to hard links? I
> 
> Hi CAI Qian,
> 
>       Thanks for the review. I am resending the patch with the changes 
> you have recommended.
> 
> > do not see it helps to fix your problem, and it will leave broken links
> > after "make clean".
> > 
> > CAI Qian
> > 
> > > + ln -sf tst_unzip_file.zip /tmp/tst_unzip_file.zip
> > >   chmod 777 tst_unzip_file.zip
> > >  
> > >  clean:
> 
> Signed-off-by: Kamalesh Babulal <[email protected]>

Thanks Kamalesh & CAI.

Regards--
Subrata

> ---
>  testcases/commands/unzip/Makefile |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: ltp/testcases/commands/unzip/Makefile
> ===================================================================
> --- ltp.orig/testcases/commands/unzip/Makefile
> +++ ltp/testcases/commands/unzip/Makefile
> @@ -4,8 +4,9 @@ all:
>  install:
>       ln -f unzip_tests.sh ../../bin/unzip_tests.sh
>       ln -f tst_unzip_file.zip ../../bin/tst_unzip_file.zip
> -     ln -f tst_unzip_file.zip /tmp/tst_unzip_file.zip
> +     ln -sf tst_unzip_file.zip /tmp/tst_unzip_file.zip
>       chmod 777 tst_unzip_file.zip
> 
>  clean:
>       rm -f tst_unzip_file.zip
> +     rm -f /tmp/tst_unzip_file.zip


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to