After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771147 - "jhbuild make" doesn't work when directory is symlink
"jhbuild make" doesn't work when directory is symlink
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2016-09-10 02:00 UTC by Mohammed Sadiq
Modified: 2016-11-13 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support symbolic link in ~/jhbuild/checkout (1.35 KB, patch)
2016-09-10 16:44 UTC, Quey-Liang Kao
none Details | Review
make: use symbolic link name if inside one (1.81 KB, patch)
2016-11-10 05:13 UTC, Mohammed Sadiq
none Details | Review
make: use symbolic link name if inside one (1.86 KB, patch)
2016-11-10 05:15 UTC, Mohammed Sadiq
committed Details | Review

Description Mohammed Sadiq 2016-09-10 02:00:50 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/'"
Comment 1 Quey-Liang Kao 2016-09-10 16:44:37 UTC
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.
Comment 2 Mohammed Sadiq 2016-11-10 05:13:33 UTC
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.
Comment 3 Mohammed Sadiq 2016-11-10 05:15:04 UTC
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.
Comment 4 Michael Catanzaro 2016-11-10 13:30:49 UTC
Review of attachment 339423 [details] [review]:

OK
Comment 5 Mohammed Sadiq 2016-11-13 03:35:03 UTC
(In reply to Michael Catanzaro from comment #4)
> OK

Can You please push my code to jhbuild. I don't have commit access.

Thanks.
Comment 6 Michael Catanzaro 2016-11-13 16:00:48 UTC
Sure, thanks

Attachment 339423 [details] pushed as 7d74525 - make: use symbolic link name if inside one