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

Remove git clean usage from binary-addons rule #7473

Closed
wants to merge 1 commit into from
Closed

Remove git clean usage from binary-addons rule #7473

wants to merge 1 commit into from

Conversation

olafhering
Copy link
Contributor

The usage of 'git clean' will wipe files belonging to the kodi source
tree under the following conditions:

  • have a git controlled parent directory, like $HOME
  • have a work directory for kodi builds, like ~/rpmbuild
  • read docs/README.linux to grasp the required steps to get bin-addons
  • prepare kodi-master.tar and various addon.foo.tar with git archive
  • attempt to do an offline build, like rpmbuild -ba kodi.spec
  • in that kodi.spec do steps as outlined in section 4.4 of README.linux
  • running the commands will wipe everything in project/cmake/addons

Steps to reproduce:

$ mkdir $$
$ cd $_
$ git init
$ mkdir kodi-version
$ cd $_
$ mkdir project
$ cd $_
$ touch a b c
$ git clean -n -dfx
Would remove a
Would remove b
Would remove c

The fix for this (valid) setup is to always have a fixed list of
files to remove and to not rely on git to do the wrong thing.

Signed-off-by: Olaf Hering olaf@aepfle.de

The usage of 'git clean' will wipe files belonging to the kodi source
tree under the following conditions:
- have a git controlled  parent directory, like $HOME
- have a work directory for kodi builds, like ~/rpmbuild
- read docs/README.linux to grasp the required steps to get bin-addons
- prepare kodi-master.tar and various addon.foo.tar with git archive
- attempt to do an offline build, like rpmbuild -ba kodi.spec
- in that kodi.spec do steps as outlined in section 4.4 of README.linux
- running the commands will wipe everything in project/cmake/addons

Steps to reproduce:

 $ mkdir $$
 $ cd $_
 $ git init
 $ mkdir kodi-version
 $ cd $_
 $ mkdir project
 $ cd $_
 $ touch a b c
 $ git clean -n -dfx
 Would remove a
 Would remove b
 Would remove c

The fix for this (valid) setup is to always have a fixed list of
files to remove and to not rely on git to do the wrong thing.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
@Memphiz
Copy link
Member

Memphiz commented Jul 10, 2015

Hot spot here imo (looking to jenkins who relies on proper clean). Maybe @wsnipex or @Montellese have a comment for this.

@wsnipex
Copy link
Member

wsnipex commented Jul 10, 2015

The git clean is there to make sure addons build correctly if you manually ran cmake to build addons before.

I assume you are trying to package binary addons from inside the kodi tree. This is not how its meant to be done on linux. Every addon can be built standalone, you just need the kodi headers, kodi-config.cmake and cmake helpers installed.
You then build and install libplatform and kodiplatform, just like any other cmake based prog.
see e.g. http://forum.kodi.tv/showthread.php?tid=220990 for details. there is even a spec file for centOS.

@olafhering
Copy link
Contributor Author

I assume you are trying to package binary addons from inside the kodi tree.

No, I dont. Thats not what this PR is all about.

What I wrote is that 'git clean' is the wrong tool for the job. Just try to parse what I wrote.

@wsnipex
Copy link
Member

wsnipex commented Jul 10, 2015

very well. I told you why git clean is there. If you want to come up with a comprehensive list of all possible files that need to be deleted, be my guest. Its every possible addon and its depends that might be in that dir.
Granted, its usually only an issue when developing addons and/or build testing them, but developer convenience is important for us.

@FernetMenta
Copy link
Contributor

I agree with @olafhering. this cmd is way too dangerous in that script.

@olafhering
Copy link
Contributor Author

For the time being I will leave this minefield alone.

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

5 participants