Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchRepoProject: fixes; more options #24347

Merged
merged 5 commits into from Mar 28, 2017
Merged

Conversation

spacekitteh
Copy link
Contributor

@spacekitteh spacekitteh commented Mar 26, 2017

No description provided.

@mention-bot
Copy link

@spacekitteh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LnL7 to be a potential reviewer.

repo sync --jobs=$NIX_BUILD_CORES --current-branch
rm -rf $out/.repo
${optionalString createMirror "rm -rf $out/.repo"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is .repo reproducible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, that should be !createMirror 🤒

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, it is basically the collection of all the .git folders.

mkdir ./.repo/local_manifests
for local_manifest in ${concatMapStringsSep " " toString localManifests}
for local_manifest in ${concatMapStringsSep " " toString local_manifests}

do
cp $local_manifest ./.repo/local_manifests/$(stripHash $local_manifest; echo $strippedName)
Copy link
Member

@Mic92 Mic92 Mar 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put quotes around arguments:

${concatMapStringsSep "\n" (manifest: ''
  cp '${manifest}' "./.repo/local_manifests/$(stripHash '${manifest}'; echo $strippedName)"
'') local_manifests}

because strings are supplied by user.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But they are paths, not strings

Copy link
Member

@Mic92 Mic92 Mar 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Then it is only a matter of taste, what loop is preferred.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think technically a path with a space in name can exist in Nix. And the user can create it easily. I don't think NixPkgs is anywhere close to being space-clean, though…

"--manifest-url=${manifest}"
"--manifest-branch=${rev}"
"--depth=1"
#TODO: fetching clone.bundle seems to fail spectacularly inside a sandbox.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it probably requires network access.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if this is a fixed-output derivation it should get network access?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is because of #24345

@7c6f434c 7c6f434c merged commit 8a919af into NixOS:master Mar 28, 2017
@@ -40,7 +63,6 @@ stdenv.mkDerivation {
];

buildInputs = [git gitRepo cacert] ++ optional (gnupg != null) [gnupg] ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not this have been optional (gnupg != null) gnupg or optionals (gnupg != null) [gnupg]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants