GNOME Bugzilla – Bug 771147
"jhbuild make" doesn't work when directory is symlink
Last modified: 2016-11-13 16:00:51 UTC
I keep software sources in separate partition and I do symlink those directories to ~/jhbuild/checkout/. When I go to, say, ~/jhbuild/checkout/gnome-calendar and do 'jhbuild make' it stops build with warning "E: The current directory is not in the checkout root '/home/sadiq/jhbuild/checkout/'"
Created attachment 335255 [details] [review] Support symbolic link in ~/jhbuild/checkout The call to os.getcwd() always return the absolute path of current directory, which avoids developers preparing a module as a symbolic link. Instead, this patch applies the 'pwd -L' command to keep POSIX- compatibility, without lengthy implementations by using os module.
Created attachment 339422 [details] [review] make: use symbolic link name if inside one os.getcwd() returns the absolute path. Using that causes the 'make' command fail when the module directory is inside a symlink directory. This patch gets the path from 'PWD' env variable value which won't translate the symbolic path to absolute path. Also fallback to os.getcwd() in case 'PWD' isn't present.
Created attachment 339423 [details] [review] make: use symbolic link name if inside one os.getcwd() returns the absolute path. Using that causes the 'make' command fail when the module directory is inside a symlink directory. This patch gets the path from 'PWD' env variable value which won't translate the symbolic path to absolute path. Also fallback to os.getcwd() in case 'PWD' isn't present.
Review of attachment 339423 [details] [review]: OK
(In reply to Michael Catanzaro from comment #4) > OK Can You please push my code to jhbuild. I don't have commit access. Thanks.
Sure, thanks Attachment 339423 [details] pushed as 7d74525 - make: use symbolic link name if inside one