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

Added --exclude option to rhnget #23

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

Added --exclude option to rhnget #23

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 14, 2011

--filter already existed, but that was an inclusive list. --exclude
allows you to exclude certain packages by passing a comma-separated
list of patterns.

--filter already existed, but that was an inclusive list.  --exclude
allows you to exclude certain packages by passing a comma-separated
list of patterns.
@zyv
Copy link
Collaborator

zyv commented Sep 14, 2011

I guess we can add the options already once we know what we prefer to do.

+1

--filter should probably become --include and the order of the --include/--exclude sequences should match lftp/rsync.

+1

The reason to postpone it was so that we could look at the syntax of the exlude/include format eg. regexp or glob ? comma-separated lists or space-separated lists ? etc...

Good point. Globbing vs. regexp vs. something else is a non-trivial issue indeed.

  • I think lists are redundant, because you can just build a regexp like (a|b|c) if you only want a couple of packages. Need to be careful escaping things though.
  • One thing that I'd like to point out is that if we just remove --filter it will break existing users' configurations.
  • Also if we just tell them that we renamed --filter to --include and use regexps or whatever else instead of globs, confusion will for sure ensue.
  • We can keep --filter and show a deprecation message that it will be soon removed, and if --filter is used, --include / --exclude logic will be disabled or an 'invalid combination of options' error message will be shown straight away.
  • Finally, do we have to deprecate --filter if we go for regexps instead of globs?

@ghost
Copy link
Author

ghost commented Sep 14, 2011

A space-separated list in the config file seems good. Package names should never have spaces in them, so it seems like a good delimiter.

Regular expressions seem like a good way to go. YUM uses regex for it's exclude list, so it might make it easier for people to just drop their exclude list right into mrepo. I'm not strongly opinionated either way though, as long as I can exclude packages I don't want.

For ordering, are you talking about include or exclude first, or the items in those lists? The latter shouldn't matter.

clayne pushed a commit to clayne/mrepo that referenced this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants