Opened 10 years ago

Closed 9 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 haiqu, 10 years ago

*bangs head on keyboard* deos?

comment:2 by bonefish, 10 years ago

Component: Build SystemApplications/Command Line Tools
Owner: changed from bonefish to nobody
Summary: setarch utility deos not rescan ~/.config filesetarch utility does not rescan ~/.config file

comment:3 by pulkomandy, 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 haiqu, 9 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 bonefish, 9 years ago

setarch should still be changed to start an interactive shell by default.

comment:6 by jessicah, 9 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:8 by waddlesplash, 9 years ago

Looks good to me.

comment:9 by jessicah, 9 years ago

Resolution: fixed
Status: newclosed

Applied in hrev49276.

Note: See TracTickets for help on using tickets.