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

Use repo tool to clone all needed repositories. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericho
Copy link

@ericho ericho commented Apr 17, 2019

This is a proposal to use repo to handle all repositories that needs to be cloned as a requirement.
The advantage is that we don't need implement any repository management, all can be done with repo.

The drawback is that repo needs to be installed prior of cloning this repository.

Other possible solution would be to use git submodules, however that could add a bit more complexity for developers.

Signed-off-by: Erich Cordoba [email protected]

@@ -26,38 +26,3 @@ sudo mkdir -p /var/cache/pbuilder/hook.d/
cp configs/pbuilderrc ~/.pbuilderrc
sudo cp configs/D70results /var/cache/pbuilder/hook.d/

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not add the fetching and running repo here?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, sure, it's done now.

Copy link
Contributor

@marcelarosalesj marcelarosalesj left a comment

Choose a reason for hiding this comment

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

Hi Erich, I'm understanding that this usage flow would be:

  • repo init to default.xml in stx-packaging
  • repo sync to get stx-packaging, other tools and starlingx repos (instead of git clone)
  • then cd stx-packaging and run setup.sh. Now the setup.sh script there won't manage tools and repos, but it'll install dependencies and create directories for the usage of stx-packaging

If that's correct, I've some questions regarding where the repo sync is performed. Besides that, this proposal LGTM.

setup.sh Outdated
fi
done < $filename
echo "Set up complete"
repo sync -j4
Copy link
Contributor

Choose a reason for hiding this comment

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

I think .repo directory is one directory up, in the same level as this stx-packaging. Am I missing something?

README.md Outdated
The development tools and git repositories that you need are installed by
running setup.sh

```
bash setup.sh
cd stx-packaging
Copy link
Contributor

Choose a reason for hiding this comment

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

before cd stx-packaging, isn't a repo sync needed?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, you are correct, I got confused in my environment as I already have stx-packaging cloned. I'm fixing this.

@VictorRodriguez
Copy link
Contributor

Thanks a lot for this PR , I really appreciate all the help provided. Despite the fact that I have my personal opinions about repo I believe that the rich of the open source cam from multiple perspectives to solve complex problems. due to this my request for this PR would be to make it possible to live in both ways. If the developers prefer to use repo is fine, if the developers prefer to use the setup.py could also be fine.

The only strong opinion that I have is that if this PR is merged as it is it will break the capability to build inside ubuntu containers since they call setup.py to clone all the necessary repositories.

In general, I like the idea as long as it does not break setup.py and both can coexist.

Also on the middle of all the high priority reqeust, we have this might not be on the top ones. Let's focus on the top ones. not saying I discourage the free to develop, I really appreciate this PR and the time spent on it, I'm just saying lets sync to work on the blockers we have right now.

@ericho
Copy link
Author

ericho commented Apr 22, 2019

Thanks a lot for this PR , I really appreciate all the help provided. Despite the fact that I have my personal opinions about repo I believe that the rich of the open source cam from multiple perspectives to solve complex problems. due to this my request for this PR would be to make it possible to live in both ways. If the developers prefer to use repo is fine, if the developers prefer to use the setup.py could also be fine.

Actually the idea behind this PR is to discuss possible alternatives for repository management. What cons do you see on repo and what alternative do you prefer?

The only strong opinion that I have is that if this PR is merged as it is it will break the capability to build inside ubuntu containers since they call setup.py to clone all the necessary repositories.

I wasn't aware of how the code is cloned inside the container. I'll think in a solution for this.

Thanks for the feedback.

@VictorRodriguez
Copy link
Contributor

Thanks a lot for this PR , I really appreciate all the help provided. Despite the fact that I have my personal opinions about repo I believe that the rich of the open source cam from multiple perspectives to solve complex problems. due to this my request for this PR would be to make it possible to live in both ways. If the developers prefer to use repo is fine, if the developers prefer to use the setup.py could also be fine.

Actually the idea behind this PR is to discuss possible alternatives for repository management. What cons do you see on repo and what alternative do you prefer?

Let's all agree as a community on what is best for the project, maybe repo has evolved since the last time I use it ( 10 years ago ) . I will take a test to your PR and write my impressions

The only strong opinion that I have is that if this PR is merged as it is it will break the capability to build inside ubuntu containers since they call setup.py to clone all the necessary repositories.

I wasn't aware of how the code is cloned inside the container. I'll think in a solution for this.

if [ repo is installed and configured] :

else :
./setup.py

Thanks for the feedback.

@saulwold
Copy link
Contributor

Thanks a lot for this PR , I really appreciate all the help provided. Despite the fact that I have my personal opinions about repo I believe that the rich of the open source cam from multiple perspectives to solve complex problems. due to this my request for this PR would be to make it possible to live in both ways. If the developers prefer to use repo is fine, if the developers prefer to use the setup.py could also be fine.

Actually the idea behind this PR is to discuss possible alternatives for repository management. What cons do you see on repo and what alternative do you prefer?

Let's all agree as a community on what is best for the project, maybe repo has evolved since the last time I use it ( 10 years ago ) . I will take a test to your PR and write my impressions

Repo has definitely evolved and matured, I think you have suggested a good compromise below that will allow repo to be used or to use a local direct clone.

I would also like to say that while this is a good change, we should focus on getting the basic functionality and infrastructure in place before we start tweaking with the workflow too much.

Sau!

The only strong opinion that I have is that if this PR is merged as it is it will break the capability to build inside ubuntu containers since they call setup.py to clone all the necessary repositories.

I wasn't aware of how the code is cloned inside the container. I'll think in a solution for this.

if [ repo is installed and configured] :

else :
./setup.py

Thanks for the feedback.

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.

4 participants