Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

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
Task Type Bug Report
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version 3.3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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

Closed by  Allan McRae (Allan)
Monday, 19 October 2009, 11:48 GMT
Reason for closing:  Not a bug
Comment by Allan McRae (Allan) - Sunday, 18 October 2009, 22:15 GMT
Huh... makepkg just runs the commands you give it in a bash shell so it cannot change the behaviour of cp.

the example you give looks like it is doing the right thing. Can you give more details on what you think should be happening?
Comment by Todd Partridge (Gen2ly) - Sunday, 18 October 2009, 23:23 GMT
Ok. The PKGBUILD entry is just like listed above with these variables:

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".
Comment by Xavier (shining) - Monday, 19 October 2009, 06:27 GMT
It only depends whether $pkgdir/usr/share/games/penumbra-collection already exists or not.
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 ...
Comment by Todd Partridge (Gen2ly) - Monday, 19 October 2009, 11:18 GMT
Yeah, I just caught this:

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.
Comment by Allan McRae (Allan) - Monday, 19 October 2009, 11:47 GMT
It is not a bash bug, rather a cp "feature".

Loading...