Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 55d881eea334049dbb6ac10623bb895363857fca
      
https://github.com/NixOS/nixpkgs/commit/55d881eea334049dbb6ac10623bb895363857fca
  Author: aszlig <[email protected]>
  Date:   2016-08-09 (Tue, 09 Aug 2016)

  Changed paths:
    R nixos/modules/installer/tools/get-git-revision
    A nixos/modules/installer/tools/get-version-suffix
    M nixos/modules/installer/tools/nixos-rebuild.sh

  Log Message:
  -----------
  Revert adding .git-revision unconditionally

This reverts commit 1e534e234b0a92bf06361fa41b7ac8691fdbc769.

We already should have a .git directory if it is managed via Git,
otherwise there is no way to get the Git revision if neither
.git-revision or .git is present.

But having .git-revision _and_ .git present seems very much redundant to
me.

Signed-off-by: aszlig <[email protected]>
Cc: @bennofs, @Profpatsch
Issue: #17218


  Commit: 0b9d9eded15e13079b1f0fef059ecb25bfb308c4
      
https://github.com/NixOS/nixpkgs/commit/0b9d9eded15e13079b1f0fef059ecb25bfb308c4
  Author: aszlig <[email protected]>
  Date:   2016-08-09 (Tue, 09 Aug 2016)

  Changed paths:
    M nixos/modules/misc/version.nix

  Log Message:
  -----------
  nixos/version: Try to get Git revison from .git

Let's first try if we can determine the Git revision from the .git
directory and if that fails, fall back to get the info from the
".git-revision" file... and after that use something generic like
"master".

This should address #17218 in better way, because we don't need to
create another redundant file in the source checkout of nixpkgs.

I'm not going to route of falling back to using .git, because after
55d881e, we already have ".git-revision" files in people's Git
repositories, which in turn means that nixos-version will report that
old file every time even if the working tree has updated.

Signed-off-by: aszlig <[email protected]>
Cc: @bennofs, Profpatsch
Reported-by: @devhell
Fixes: #17218


  Commit: f8fad62c8e8ea4ec80a5836318fc5c87f0f9fee5
      
https://github.com/NixOS/nixpkgs/commit/f8fad62c8e8ea4ec80a5836318fc5c87f0f9fee5
  Author: aszlig <[email protected]>
  Date:   2016-08-09 (Tue, 09 Aug 2016)

  Changed paths:
    R nixos/modules/installer/tools/get-git-revision
    A nixos/modules/installer/tools/get-version-suffix
    M nixos/modules/installer/tools/nixos-rebuild.sh
    M nixos/modules/misc/version.nix

  Log Message:
  -----------
  Merge branch 'nixpkgs-git-revision-fix'

Addresses #17218 in a better way in that it doesn't create a
".git-revision" file on every nixos-rebuild, because we already have
".git" available. Even if we don't nixos-rebuild can't create the
"git-revision" file.

Tested via:

nix-build -E '(import ./nixos/tests/make-test.nix {
  name = "foo";
  machine = {};
  testScript = "startAll; $machine->execute(\"nixos-version >&2\");";
})'

Closes: #17610
Acked-by: @bennofs


Compare: https://github.com/NixOS/nixpkgs/compare/19f398870a0f...f8fad62c8e8e
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to