In my recent attempt to create a binary distribution for Solaris (see thread "What directories should go into a binary distribution?"), failed as the '-a' option was used to the 'cp' command in
SAGE_ROOT/local/bin/sage-bdist. See trac http://trac.sagemath.org/sage_trac/ticket/7407 A look at the top of sage-bdist shows: if [ $UNAME = "Darwin" ]; then OPT="Rp" else OPT="ra" fi then later on we see the '$OPT' is used when the 'cp' command is used. cp -$OPT examples local makefile *.txt *.sage sage ipython data "$TMP"/ cp -L$OPT devel/sage-main "$TMP"/devel/sage-main cp -$OPT installed $TMP/$PKGDIR/ cp -$OPT standard $TMP/$PKGDIR/ cp install README.txt gen_html $TMP/$PKGDIR/ cp sage/local/bin/sage-README-osx.txt README.txt Clearly it appears OS X is happy with the options '-Rp'. I can't see why Linux should not be too, as those are standard options. Do we know why the '-L' option is used once? "cp -L$OPT devel/sage-main "$TMP"/devel/sage-main" I read the POSIX standard, and although this is a required option, I can't really work out exactly what the option is supposed to do. To quote from the 2004 standard: ---------------------------- "-L Take actions based on the type and contents of the file referenced by any symbolic link specified as a source_file operand or any symbolic links encountered during traversal of a file hierarchy." ----------------------------- I do not know exactly that action it is supposed to take though! I'd like to get rid of the '-L' option too, unless there is a need for it, as it is not supported on HP-UX 11.11. However, '-L' is a POSIX option, so I'm not suggesting '-L' is removed if '-L' has any use in Sage. I'm just wondering what the reason for its inclusion is. If there is a good reason for it, I'll change the code to: if [ `uname` != "HP-UX" ] ; then cp -LpR devel/sage-main "$TMP"/devel/sage-main else cp -pR devel/sage-main "$TMP"/devel/sage-main fi I just done a check on 4 Unix systems. Not one of them accepts this '-a' option. However, three of the four support -L, which is required by POSIX. 1) OpenSolaris bash-3.2$ uname -a SunOS hawk 5.11 snv_111b i86pc i386 i86pc bash-3.2$ touch b bash-3.2$ cp -a b c cp: illegal option -- a Usage: cp [-f] [-i] [-p] [...@] [-/] f1 f2 cp [-f] [-i] [-p] [...@] [-/] f1 ... fn d1 cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [...@] [-/] d1 ... dn-1 dn 2) Solaris 10 drkir...@kestrel:~$ cp -a b c cp: illegal option -- a Usage: cp [-f] [-i] [-p] [...@] f1 f2 cp [-f] [-i] [-p] [...@] f1 ... fn d1 cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [...@] d1 ... dn-1 dn 3) AIX 6.1 (runs on IBM Unix boxes) $ uname -a AIX client9 1 6 00C6B7C04C00 $ touch b $ cp -a b c cp: illegal option -- a Usage: cp [-fhipHILPU][-d|-e] [-r|-R] [-E{force|ignore|warn}] [--] src target or: cp [-fhipHILPU] [-d|-e] [-r|-R] [-E{force|ignore|warn}] [--] src1 ... srcN directory 4) HP-UX hpbox B.11.11 U 9000/785 2016698240 unlimited-user license $ touch b $ cp -a b c cp: illegal option -- a Usage: cp [-f|-i] [-p] [-S] [-e warn|force|ignore] source_file target_file cp [-f|-i] [-p] [-S] [-e warn|force|ignore] source_file ... target_directory cp [-f|-i] [-p] [-S] -R|-r [-e warn|force|ignore] source_directory ... target_directory As you can see, '-a' is not well supported, and I think is best removed. Dave --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---