FS#16729 - makepkg appends a / to cp command instead of renames
Attached to Project:
Pacman
Opened by Todd Partridge (Gen2ly) - Sunday, 18 October 2009, 21:57 GMT
Last edited by Allan McRae (Allan) - Monday, 19 October 2009, 11:48 GMT
Opened by Todd Partridge (Gen2ly) - Sunday, 18 October 2009, 21:57 GMT
Last edited by Allan McRae (Allan) - Monday, 19 October 2009, 11:48 GMT
|
Details
Summary and Info:
makepkg appends a / to copy command when I copy a directory. This command: cp -R $_instname $pkgdir/usr/share/games/$pkgname will copy the folder to /usr/share/games/$pkgname/$_instname and not copy and rename as the default behavior of cp. |
This task depends upon
the example you give looks like it is doing the right thing. Can you give more details on what you think should be happening?
pkgname=penumbra-collection
_instname=PenumbraCollection
cp -R $_instname $pkgdir/usr/share/games/$pkgname
I just ran it again to be sure I didn't do anything crazy and got the same thing.
Expected behavior:
cp -R PenumbraCollection $pkgdir/usr/share/games/penumbra-collection
ls /usr/share/games/penumbra-collection
files within original PenumbraCollection
Actual behavior:
ls /usr/share/games/penumbra-collection
PenumbraCollection
Expecting this folder to get renamed but instead is adding to (appending a /) to "$pkgdir/usr/share/games/penumbra-collection".
If it does not exist, cp -r will create it. If it exists, cp -r will put the source directory inside.
It has always worked that way ...
mkdir -p $pkgdir/usr/share/games/$pkgname
in my PKGBUILD.
This is my bad. Could have sworn bash would throw out an error if I tried to do this.
I'll report this to the bash bug tracker.
Requesting closure.