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

Loop through excludes #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Loop through excludes #21

wants to merge 5 commits into from

Conversation

drwulsen
Copy link
Contributor

Here it is, as promised - the loop-generated excludes list in a separate PR.
Let me know what you think of it.

Walter Hüttenmeyer added 5 commits August 4, 2019 12:38
added /var/db/repos/gentoo and /var/cache/distfiles to hard-coded list of excludes.
Portage has moved (when?) according to https://wiki.gentoo.org/wiki//usr/portage
Added portageq logic to detect where portage stores its tree and distfiles.
If this fails, fall back to a default list declared in EXCLUDES_DEFAULT_PORTAGE
add new portage paths with optional portageq logic (#18)
added a loop to create the '--exclude foo' options from an array list.
This way it's less copy-paste to add a new static exclude; it _would_ also be possible to check if the 'object-to-exclude' actually exists and only generate the exclude parameter in this case.
@TheChymera
Copy link
Owner

TheChymera commented Oct 27, 2019

@drwulsen sorry for the late reply. Looks good to me. Have you had the opportunity to test it?

Also, could you rebase this into one commit?

@drwulsen
Copy link
Contributor Author

I've figured that I'm too stupid for github and all the branches, PRs, commits and stuff.
The script still has some issues to work on; for example it creates the kmod and ksrc archives with weird and non-readable content.

I've fixed this and edited a lot of the script in my fork of it, but how to get five things back into one file where one change depends on the other....well, I think I'll be outta here and you are welcome to use whatever you find useful from my fork - but maintaining any form of consistency seems quite un-possible to me with my github knowledge.....

@TheChymera
Copy link
Owner

TheChymera commented Oct 27, 2019

@drwulsen I know how you feel, git rebase has the bad habit of being quite frustrating and blowing up in the faces of people who are not gurus :D

A nice thing about github is that you can just take a PR (e.g. this one), write .patch after the link, and you get a patch for all changes. You can just fork this repo again, apply the patch and re-submit the PR. I'd prefer this came from you so that you're properly listed as the author.

exclude()
{
ADDEXCLUDE=$(echo "$1" | sed 's/^\///')
EXCLUDES+=" --exclude=${TARGET}${ADDEXCLUDE}"
Copy link
Contributor

@lucianposton lucianposton Feb 4, 2020

Choose a reason for hiding this comment

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

This will break excludes that don't intend to match the entire path below TARGET e.g. lost+found or -e '*.iso

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.

3 participants