NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.28k stars 14.27k forks source link

Confusing prompt when sourcing env-vars #42331

Open nh2 opened 6 years ago

nh2 commented 6 years ago

Issue description

I'm confused by this (on 18.03):

note: keeping build directory '/tmp/nix-build-chromium-67.0.3396.87.drv-0'
builder for '/nix/store/lm75yx635ad87s85x7jb69ara9cpvhqx-chromium-67.0.3396.87.drv' failed with exit code 2
cannot build derivation '/nix/store/wn3izifdhp6725cx64pjhg06mx1gqc1l-chromium-osmesa.drv': 1 dependencies couldn't be built
error: build of '/nix/store/wn3izifdhp6725cx64pjhg06mx1gqc1l-chromium-osmesa.drv' failed

[root@builder:~]# cd /tmp/nix-build-chromium-67.0.3396.87.drv-0

[root@builder:/tmp/nix-build-chromium-67.0.3396.87.drv-0]# ls
chromium-67.0.3396.87  env-vars

[root@builder:/tmp/nix-build-chromium-67.0.3396.87.drv-0]# source env-vars 

[root@builder:/tmp/nix-build-chromium-67.0.3396.87.drv-0/chromium-67.0.3396.87]# ls
chromium-67.0.3396.87  env-vars

[root@builder:/tmp/nix-build-chromium-67.0.3396.87.drv-0/chromium-67.0.3396.87]# cd chromium-67.0.3396.87/

[root@builder:/tmp/nix-build-chromium-67.0.3396.87.drv-0/chromium-67.0.3396.87]# ls
android_webview  build_overrides  cloud_print          DEPS                google_update  LICENSE.chromium_os  out                      printing   storage      WATCHLISTS
apps             buildtools       CODE_OF_CONDUCT.md   device              gpu            mash                 out_bootstrap            README.md  styleguide   webrunner
ash              cc               codereview.settings  docs                headless       media                OWNERS                   remoting   testing
AUTHORS          chrome           components           ENG_REVIEW_OWNERS   infra          mojo                 pdf                      rlz        third_party
base             chromecast       content              extensions          ios            native_client        ppapi                    sandbox    tools
blink            chrome_cleaner   courgette            gin                 ipc            native_client_sdk    PRESUBMIT.py             services   ui
build            chrome_elf       crypto               gn-gen-outputs.txt  jingle         net                  PRESUBMIT_test_mocks.py  skia       url
BUILD.gn         chromeos         dbus                 google_apis         LICENSE        notification_helper  PRESUBMIT_test.py        sql        v8

Why after source env-vars is the directory in the shell prompt changed, but the apparent location isn't? And after the cd, the apparent location changes but the shell prompt doesnt?

Is this expected, or a bug?

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.