|
From: Heiko Z. <he...@zu...> - 2004-05-01 01:56:25
|
Bruce Smith wrote:
>>>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?
make dist
actually does it. Unfortunately theose libs/tools don't have a way of
redirecting the "make install" target.
> 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?
Correct.
> Maybe we shouldn't be running copy_docs at all in these scripts?
Actually that would be the right fix.
Heiko
|