FS#13025 - cups package installs /usr/lib64

Attached to Project: Arch Linux
Opened by Val L. (onestep_ua) - Wednesday, 28 January 2009, 19:33 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 10 February 2009, 18:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture x86_64
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


CUPS package installs libcupsimage.so in /usr/lib64. I think it's related to a general typos (== and -e) in PKGBUILD:
if [ "$CARCH" = "x86_64" ]; then
if [ -f $startdir/pkg/usr/lib64 ]; then
rm -rf ${startdir}/pkg/usr/lib64/
needs to be
if [ "$CARCH" == "x86_64" ]; then
if [ -e ${pkgdir}/usr/lib64 ]; then
rm -rf ${pkgdir}/usr/lib64/

Additional info:
* package version: cups-1.3.9-4

Steps to reproduce:
build cups on x86_64 architecture.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Tuesday, 10 February 2009, 18:19 GMT
Reason for closing:  Not a bug
Comment by Andreas Radke (AndyRTR) - Friday, 30 January 2009, 17:49 GMT
[root@workstation64 andyrtr]# pacman -Ql cups | grep lib64
[root@workstation64 andyrtr]#

[root@workstation64 andyrtr]# pacman -Ql libcups | grep libcupsimage
libcups /usr/lib/libcupsimage.so
libcups /usr/lib/libcupsimage.so.2

[root@workstation64 andyrtr]# pacman -Q cups libcups
cups 1.3.9-4
libcups 1.3.9-3

So this works for me well and the packages from the repo look clean. So what's up?

BTW: In Bash scipts do never use "==" ! No idea if another shell might handle this different like C does. Going to close this as "works for me" or "not a bug".
Comment by Jan de Groot (JGC) - Monday, 02 February 2009, 10:27 GMT
The "==" syntax is bash syntax. Posix shell syntax, which is supported by bash, supports only single "=" for comparison.
Comment by Val L. (onestep_ua) - Monday, 02 February 2009, 18:55 GMT
JGC is right. Also, -f checks for existing regular file, while -e checks for existing file or directory. If you check for a file named /usr/lib64, then, maybe you don't need -r switch for rm. :)

And, yes, I had two instances of libcupsimage.so. First in /usr/lib, owned by libcups, and second in /usr/lib64, owned by cups.
Comment by Andreas Radke (AndyRTR) - Thursday, 05 February 2009, 20:38 GMT
[andyrtr@laptop64 ~]$ tar -ztvf ~/nfs/arch64/packages/x86_64/cups-1.3.9-4-x86_64.pkg.tar.gz | grep lib64
[andyrtr@laptop64 ~]$

my package doesn't contain a /usr/lib64 file! going to close this as "works for me".
Comment by Val L. (onestep_ua) - Tuesday, 10 February 2009, 09:28 GMT
[onestep@onestep-box cups]$ tar tvf /home/packages/cups-1.3.9-4-x86_64.pkg.tar.gz | grep lib64
drwxr-xr-x root/root 0 2009-02-10 11:27 usr/lib64/
-rwxr-xr-x root/root 319038 2009-02-10 11:27 usr/lib64/libcupsimage.so.2
lrwxrwxrwx root/root 0 2009-02-10 11:27 usr/lib64/libcupsimage.so -> libcupsimage.so.2

I'm not talking about package from repository - this is a package I've built on my side using your PKGBUILD. Please consider using -e (or, maybe, even -d) to prevent appearance of lib64 in future builds, because in other case the whole your `if` construction is useless, at least in bash.
Comment by Val L. (onestep_ua) - Tuesday, 10 February 2009, 09:34 GMT
I've got it. Create a directory named /usr/lib64 on your box and rebuild the package, so you can reproduce the bug.
Comment by Andreas Radke (AndyRTR) - Tuesday, 10 February 2009, 18:18 GMT
Sorry. This isn't a bug.

Probably the cups package does a check if /usr/lib64 exists and then it expects to put its libraries there. But ArchLinux x86_64 is built to have no /usr/lib64 directory. I won't put an unnessacy workaround into our PKGBUILD. If you customize your system you should know how to deal with it. Arch way ;)