Opened 10 years ago
Closed 10 years ago
#12066 closed bug (fixed)
setarch utility does not rescan ~/.config file
Reported by: | haiqu | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
When swapping to the GCC4 compiler using 'setarch x86' all environment changes in ~/.profile are lost. This could be fixed by rescanning the file at each swap.
Change History (9)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Component: | Build System → Applications/Command Line Tools |
---|---|
Owner: | changed from | to
Summary: | setarch utility deos not rescan ~/.config file → setarch utility does not rescan ~/.config file |
comment:3 by , 10 years ago
setarch starts a new shell session, which is apparently not a login shell, so the .profile is not read. But, the .bashrc will, I think?
comment:4 by , 10 years ago
Put the following code in ~/.bashrc :
# Shortcut for building alias hp="haikuporter -S -j8 --no-dependencies --no-source-packages"
and can now use the 'hp' shortcut even when GCC4 is selected.
Solved, thank.
comment:5 by , 10 years ago
setarch
should still be changed to start an interactive shell by default.
comment:6 by , 10 years ago
Testing here, setarch
does read my bash_rc file, so it appears it is being invoked as an interactive shell. However, not as a login shell, which is required for it to source /etc/profile
, etc.
Should we change it to be a login shell when invoked with no arguments? One would get the banner printed again... not sure if that would be considered an issue. Perhaps we could detect we're not the primary arch, and change the banner to indicate that?
comment:7 by , 10 years ago
Please review https://github.com/jessicah/haiku/commit/a6beadbe7d08098e44c507f7980740b4386a3c15. If acceptable, will merge to master.
*bangs head on keyboard* deos?