Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172289 - gentoo-upgrading.xml: profile symlink: absolute vs. relative paths
Summary: gentoo-upgrading.xml: profile symlink: absolute vs. relative paths
Status: RESOLVED INVALID
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Docs Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-26 11:51 UTC by Christian Becke
Modified: 2007-03-27 11:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
making all paths absolute (gentoo-upgrading-all-absolute.diff,2.32 KB, patch)
2007-03-26 11:52 UTC, Christian Becke
Details | Diff
making all paths relative (gentoo-upgrading-all-relative.diff,2.63 KB, patch)
2007-03-26 11:53 UTC, Christian Becke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Becke 2007-03-26 11:51:36 UTC
Hi,

in gentoo-upgrading.xml, code listings 3.2, 3.3, 3.4, 3.5, 3.6, 3.8 and 3.9 a CWD of /*/ is assumed. I think there should be either absolute paths to the profile, e.g.:

ln -s ../usr/portage/profiles/[...]

should be

ln -s /usr/portage/profiles/[...]

or there should be hints to change the directory to (e.g.) /etc, to make sure the relative paths are valid, e.g.:

rm /etc/make.profile
ln -s ../usr/portage/profiles/[...]

should be

cd /etc
rm make.profile
ln -s ../usr/portage/profiles/[...]

Code listing 3.7 also shows a relative path, but this looks O.K. here because there already is a "cd /etc" before it. But maybe this should be changed as well for consistency?

Attaching two patches, one keeping relative paths and adding "cd /etc" where appropriate, and one changing to absolute paths (leaving code listing 3.7 alone).
Comment 1 Christian Becke 2007-03-26 11:52:54 UTC
Created attachment 114474 [details, diff]
making all paths absolute
Comment 2 Christian Becke 2007-03-26 11:53:34 UTC
Created attachment 114475 [details, diff]
making all paths relative
Comment 3 Xavier Neys (RETIRED) gentoo-dev 2007-03-26 12:53:57 UTC
The /etc/make.profile symlink is an absolute path, you do not have to cd anywhere before you create it, and .. is not relative to the CWD when you create the symlink.

You might want to read `man ln` again.
Comment 4 SpanKY gentoo-dev 2007-03-26 23:26:50 UTC
err, no, the links are still relative links ... but the rest of your comments are true
Comment 5 Xavier Neys (RETIRED) gentoo-dev 2007-03-27 11:09:55 UTC
(In reply to comment #4)
> err, no, the links are still relative links ... but the rest of your comments
> are true

hmm, I didn't say otherwise, did I? Unless you want to call /etc/make.profile a relative path :)
Comment 6 Christian Becke 2007-03-27 11:41:24 UTC
(In reply to comment #3)
> The /etc/make.profile symlink is an absolute path, you do not have to cd
> anywhere before you create it, and .. is not relative to the CWD when you
> create the symlink.

You are right, of course... Stupid me. Sorry for the noise.

> You might want to read `man ln` again.

Done. ;)