[A-A-P-develop] On the dangers of PKGNAME=.
Brought to you by:
vimboss
From: Adriaan de G. <ad...@cs...> - 2003-10-22 23:55:57
|
Since an empty PKGNAME isn't allowed, yet KDE expects to put things directly under $PREFIX/share and not in $PREFIX/share/$PKGNAME (It's often installed in a separate prefix entirely, so having $PKGNAME in there would be redundant), I've been reduced to setting PKGNAME=. in KDE recipes. This triggers a bug, though: eggs.ebn.kun.nl$aap install PREFIX=/tmp/kde Aap: Creating directory "/tmp/kde/share/./apps/kpilot/sysinfoconduit" Aap: Internal Error Aap: Traceback (most recent call last): File "/home/adridg/aap/Exec-cvs/Process.py", line 1115, in Process exec script_string in recdict, recdict File "<string>", line 12, in ? File "/home/adridg/aap/Exec-cvs/RecPython.py", line 1022, in install_files os.makedirs(destloc) File "/usr/local/lib/python2.2/os.py", line 203, in makedirs makedirs(head, mode) File "/usr/local/lib/python2.2/os.py", line 203, in makedirs makedirs(head, mode) File "/usr/local/lib/python2.2/os.py", line 203, in makedirs makedirs(head, mode) File "/usr/local/lib/python2.2/os.py", line 204, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/tmp/kde/share/.' I imagine this is because makedirs recurses and makes each component of the requested path, and /tmp/kde/share and /tmp/kde/share/., while separate components, are the same directory. The attached patch adds a special-case for PKGNAME=. to default.aap; it's probably not the best solution. It's probably better to catch OSError File exists exceptions in make_installdirs and deal with it there. I'll send a different patch shortly. |