TheChymera / mkstage4

Bash Utility for Creating Stage 4 Tarballs
GNU General Public License v3.0
104 stars 22 forks source link

Updated excludes list generation #17

Closed drwulsen closed 5 years ago

drwulsen commented 5 years ago

Excludes list is now automatically generated by transfrorming "foo" to " --exclude=foo" Portage locations have changed (when?) as stated in the wiki https://wiki.gentoo.org/wiki//usr/portage

drwulsen commented 5 years ago

just noticed that the default exclude list of portage is conditional on target == / this needs to be called also in other cases, how would i proceed in implementig and submitting a pr the proper way? like, can i edit it in my repo and submit this piece as single commit to your repo, or is it a separate pr then (which would replace this one?)

TheChymera commented 5 years ago

Ideally, we would keep things separate:

To me it seems the current master does not make things unneccessarily dependent on "$TARGET" == "/". That conditional only appears here. You need to update your conditionality to only use portageq if "$TARGET" == "/", and use the hard-coded paths if either TARGET is something different, or portageq is absent, or if portageq fails.

drwulsen commented 5 years ago

I think that the excludes list is even easier here, as it's a one-liner to diff, and in the master branch excludes also get dynamically added. Benefit I see here is, that a simple check can be added to generate tge exclude only if the path actually exists, keeping the final list smaller and easier to check for the user.

I'll copy the hard-coded portage stuff to the suggested logic, so it will actually default in said cases. The current master is fine, i was referring to my portage stuff being only in one dependent place. How to proceed? You could pick the parts you like to be added and we call it a day? My github-foo is not really up to par, so I'm unsure how I would submit the 2PRs where one change would be a child of the other.

If that's fine with you, you could pick the pieces you like and close the PR?

Thanks!

EDIT: Ah well it's Sunday and you seem to have a good amount of patience; sorry for abusing your repo for my first steps on github. I'll close this PR and submit two separate ones, let's see if this turns out well :)