gcc backup in g77 package?
Dear debbers,
As a maintainer of g77 I run into the following problem:
g77 contains a replacement for the gcc wrapper, one that knows
about .f files and calls g77 if asked to compile them.
Now, what should I do with the old gcc binary?
At the moment I'm installing a new version that knows about fortran.
But, if you now to
dpkg -i g77*.deb
dpkg -r g77
dpkg will happily remove /usr/bin/gcc!
To prevent this, I may do the following:
preinst:
cd /usr/bin
test -f gcc-c || mv gcc gcc-c #make backup of old gcc
rm -f gcc
postinst:
cd /usr/bin
ln -fs gcc-g77 gcc
postrm:
cd /usr/bin
test -f gcc-c && mv gcc-c gcc #restore backup copy.
# or maybe: test -f gcc-c && rm gcc; ln -s gcc-c gcc
and install the gcc binary from g77 as "gcc-g77"?
But now what if somebody reinstalls gcc-2.7.2? This will inevetably remove
the link to gcc-g77, and then fortran doesn't work anymore...
(I'm already going to make gcc conflict with any other version of gcc but
2.7.2, as g77 is promised to be incompatible with gcc-2.8)
BTW, the "gcc-g77" is supposed to be identical to gcc from gcc-2.7.2,
the only difference being the knowledge about fortran. So, maybe I
shouldn't bother about making backups of gcc? (The error messages
from "gcc-g77" when g77 itself is removed probably is a lot more
intellegent than the one from gcc itself, which says something about
interpreting the .f file as object file or something).
I guess this means that gcc-2.7.2-deb should be changed to take into
account for the gcc-g77 binary -- but real problems start to come when
(if) a GNU pascal comile comes out ... Maybe we should then just all
provide a gcc that knows about c, c++, fortran, pascal,
(ada, lisp, cobol, .......)
Would be interested to hear comments on this.
--
joost witteveen
joost@rulcmc.leidenuniv.nl
joostje@dds.hacktic.nl
--
There's no substitute for reading README's.
(except for using Debian, and typing "dpkg -i package.deb").
Reply to: