Re: [22274] trunk/dports/sysutils/file/Portfile
On 2007-02-24 17:08:57 -0800, source_changes@macosforge.org wrote:
Revision: 22274 http://trac.macosforge.org/projects/macports/changeset/22274 Author: pipping@macports.org Date: 2007-02-24 17:08:56 -0800 (Sat, 24 Feb 2007)
Log Message: ----------- * add prefix "g" to distinguish from /usr/bin/file
Why would users want to use /usr/bin/file once the file port is installed? And if they really want to, why wouldn't they type /usr/bin/file (or use an alias or whatever)? IMHO, one of the goals of these ports is to replace the versions provided by the system. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
assuming you already have the port, updated. compare the output of /opt/local/bin/gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib and /usr/bin/file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses. 5.4.dylib that should answer your question. also noone prevents the user from creating "alias file=gfile". Regards, Elias Pipping On Feb 25, 2007, at 4:25 AM, Vincent Lefevre wrote:
On 2007-02-24 17:08:57 -0800, source_changes@macosforge.org wrote:
Revision: 22274 http://trac.macosforge.org/projects/macports/changeset/ 22274 Author: pipping@macports.org Date: 2007-02-24 17:08:56 -0800 (Sat, 24 Feb 2007)
Log Message: ----------- * add prefix "g" to distinguish from /usr/bin/file
Why would users want to use /usr/bin/file once the file port is installed? And if they really want to, why wouldn't they type /usr/bin/file (or use an alias or whatever)?
IMHO, one of the goals of these ports is to replace the versions provided by the system.
-- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/ blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS- Lyon) _______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
On 24/02/07, Elias Pipping <pipping@macports.org> wrote:
assuming you already have the port, updated. compare the output of
/opt/local/bin/gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
and
/usr/bin/file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses. 5.4.dylib
for those who don't have the file port installed [ram@skymoo ram]$ file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib: Mach-O universal binary with 4 architectures /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib (for architecture ppc): Mach-O dynamically linked shared library stub ppc /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library stub ppc64 /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib (for architecture i386): Mach-O dynamically linked shared library stub i386 /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library stub x86_64 [ram@skymoo ram]$ gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.5.4.dylib: Mach-O fat file with 4 architectures [ram@skymoo ram]$ Cheers Adam
On Feb 24, 2007, at 19:54 , Elias Pipping wrote:
assuming you already have the port, updated. compare the output of
/opt/local/bin/gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
and
/usr/bin/file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
that should answer your question.
If /usr/bin/file provides a functionality superset of gfile, why would anyone install gfile? If gfile has some useful features not found in /usr/bin/file, then perhaps the ultimate solution is to enhance /opt/local/bin/file to make it provide a functionality superset of /usr/bin/file. Just my 2 cents' worth, Dave
I don't know. Maybe those features aren't available in Panther. Even if they are: call it freedom of choice. Regards, Elias Pipping On Feb 25, 2007, at 7:01 AM, David MacMahon wrote:
On Feb 24, 2007, at 19:54 , Elias Pipping wrote:
assuming you already have the port, updated. compare the output of
/opt/local/bin/gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
and
/usr/bin/file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
that should answer your question.
If /usr/bin/file provides a functionality superset of gfile, why would anyone install gfile?
If gfile has some useful features not found in /usr/bin/file, then perhaps the ultimate solution is to enhance /opt/local/bin/file to make it provide a functionality superset of /usr/bin/file.
Just my 2 cents' worth, Dave
_______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
I think you should add a variant that appears in a few of the other GNU utils packages and that is to provide a +normal_install_names variant which links the g* names to the non-g* names. For example, here is coreutils: configure.args --program-prefix=g \ --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man \ --disable-nls ... post-destroot { if {[variant_isset normal_install_names]} { system "cd ${destroot}${prefix}/bin && for f in g*; do ln -s \$f `echo \$f | sed -e 's/^g//'`; done" } } variant normal_install_names { } A number of other packages use this name naming convention. Regards, Blair -- Blair Zajac, Ph.D. CTO, OrcaWare Technologies <blair@orcaware.com> Subversion training, consulting and support http://www.orcaware.com/svn/ On Feb 24, 2007, at 10:07 PM, Elias Pipping wrote:
I don't know. Maybe those features aren't available in Panther. Even if they are: call it freedom of choice.
Regards,
Elias Pipping
On Feb 25, 2007, at 7:01 AM, David MacMahon wrote:
On Feb 24, 2007, at 19:54 , Elias Pipping wrote:
assuming you already have the port, updated. compare the output of
/opt/local/bin/gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
and
/usr/bin/file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
that should answer your question.
If /usr/bin/file provides a functionality superset of gfile, why would anyone install gfile?
If gfile has some useful features not found in /usr/bin/file, then perhaps the ultimate solution is to enhance /opt/local/bin/file to make it provide a functionality superset of /usr/bin/file.
Just my 2 cents' worth, Dave
On Feb 25, 2007, at 2:02 PM, Blair Zajac wrote:
post-destroot { if {[variant_isset normal_install_names]} { system "cd ${destroot}${prefix}/bin && for f in g*; do ln -s \$f `echo \$f | sed -e 's/^g//'`; done" } }
variant normal_install_names { }
A number of other packages use this name naming convention.
IIRC this could be done without the variaint_isset conditional by just adding a post-destroot inside of the normal_install_names variant. ... but it's been a while since I played with it or looked at the code that would implement this. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
To be frank, that line is awful. whay not use "cd", "foreach", "glob", "file link (link in 1.4.0)", "reinplace"?! Regards, Elias Pipping On Feb 25, 2007, at 8:10 PM, Daniel J. Luke wrote:
On Feb 25, 2007, at 2:02 PM, Blair Zajac wrote:
post-destroot { if {[variant_isset normal_install_names]} { system "cd ${destroot}${prefix}/bin && for f in g*; do ln -s \$f `echo \$f | sed -e 's/^g//'`; done" } }
variant normal_install_names { }
A number of other packages use this name naming convention.
IIRC this could be done without the variaint_isset conditional by just adding a post-destroot inside of the normal_install_names variant.
... but it's been a while since I played with it or looked at the code that would implement this.
-- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
On 2007-02-25 04:54:29 +0100, Elias Pipping wrote:
assuming you already have the port, updated. compare the output of
/opt/local/bin/gfile /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ libncurses.5.4.dylib
and
/usr/bin/file /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses. 5.4.dylib
that should answer your question.
also noone prevents the user from creating "alias file=gfile".
But it will not be available in scripts and so on (unless the user adds symlinks like /usr/local/bin/file -> /opt/local/bin/gfile, which I did for other programs). This also means that ports that use the file utility (this is the case of lesspipe, AFAIK) should be patched to use gfile. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
You're welcome to change it. I'm not a Tcl expert my any means :) If you do change it, please change it in all the Portfiles that use this horrible code :) Just please keep 10.3 compatibility, since I still build MacPorts for 10.3. Regards, Blair -- Blair Zajac, Ph.D. CTO, OrcaWare Technologies <blair@orcaware.com> Subversion training, consulting and support http://www.orcaware.com/svn/ Elias Pipping wrote:
To be frank, that line is awful. whay not use "cd", "foreach", "glob", "file link (link in 1.4.0)", "reinplace"?!
Regards,
Elias Pipping
On Feb 25, 2007, at 8:10 PM, Daniel J. Luke wrote:
On Feb 25, 2007, at 2:02 PM, Blair Zajac wrote:
post-destroot { if {[variant_isset normal_install_names]} { system "cd ${destroot}${prefix}/bin && for f in g*; do ln -s \$f `echo \$f | sed -e 's/^g//'`; done" } }
variant normal_install_names { }
A number of other packages use this name naming convention.
IIRC this could be done without the variaint_isset conditional by just adding a post-destroot inside of the normal_install_names variant.
... but it's been a while since I played with it or looked at the code that would implement this.
-- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
participants (6)
-
Adam Mercer
-
Blair Zajac
-
Daniel J. Luke
-
David MacMahon
-
Elias Pipping
-
Vincent Lefevre