|
From: Bruce S. <bw...@ar...> - 2004-04-30 19:45:20
|
> >A quick look makes me wonder about these scripts: acl, attr, xfsprogs
> >Which all do this:
> >
> >cd $CDDIR || exit 1
> >tar -xzf ...some.tar.file....
> >copy_docs
> >
> >And "copy_docs" is run without a parameter, which defaults to "." as the
> >first parameter. And copy_docs does this (in $CDDIR):
> >
> >BD=$1
> >[ -z "$BD" ] && BD=$(pwd)
> ># a whole bunch of "cp" lines removed
> >rm -rf $BD/{doc,man,info}
> >rm -rf $BD/usr/{doc,man,info}
> >rm -rf $BD/usr/local/{doc,man,info}
> >rm -rf $BD/usr/share/{doc,man,info}
> >rm -rf $BD/share/{doc,man,info}
> >
> >Am I reading this correctly? (if so, yikes! :)
>
> Yes you found the problem.
>
> I think there should be a if clause around those rm statements to make sure
> nothing gets deleted under $CDDIR
I'll make the change if you explain a couple things to me.
First, what's the logic behind untar'ing a file in the "make install"
phase of those scripts? Does "make build" create a tar file?
Second, if it's untar'ing the file in $CDDIR, why does it have to run
copy_docs at all? Is it untaring the man pages to the wrong path, and
copy_docs moves them to the correct path? If so, shouldn't the install
script also remove the files from the incorrect path? (or does some
post-install script do the removing?)
Also (related to 2nd question), doesn't this cp line in copy_docs copy
files on top of themselves? cp -dpR $BD/usr/share/man $CDDIR/usr/share
Isn't that a bad thing?
Maybe we shouldn't be running copy_docs at all in these scripts?
- BS
|