Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Mar 25, 2020

Example:

 $ ./scripts/xtensa-build-all.sh -j3
 ./scripts/xtensa-build-all.sh: WARN: ignoring arg -j3

Signed-off-by: Marc Herbert marc.herbert@intel.com

@marc-hb marc-hb marked this pull request as ready for review March 25, 2020 05:51
@marc-hb marc-hb requested a review from jajanusz as a code owner March 25, 2020 05:51
Copy link
Contributor

@jajanusz jajanusz left a comment

Choose a reason for hiding this comment

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

I think that this script should be just fixed instead of printing warn.
@lgirdwood Why we manually parse args? Cannot we just use getopt? It's in any okish bash and we focus on supporting ubuntu 16+ afaik, we shouldn't care about some ancient/small distros that don't support pretty standard stuff.
If @lgirdwood is ok with it, then it should be just rewritten with getopt and it will handle cases like -j6 & -j 6.

@lgirdwood
Copy link
Member

@marc-hb can you easily fix the script with getopt as suggested by @jajanusz ?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Mar 25, 2020

@marc-hb can you easily fix the script with getopt as suggested by @jajanusz ?

I don't know about "easily" but in terms of time, number of lines changed and risk of not testing some combination or corner case and breaking it, it would be a completely different order of work magnitude. So no, not really.

Totally agree this script shouldn't be re-implementing getopt eventually but excluding the typo fix this patch is literally just 3-lines long and adds what is (IMHO) missing the most from this parser.

@jajanusz
Copy link
Contributor

Ok, warn is better than nothing, added issue for improvement: #2631

Example:

 $ ./scripts/xtensa-build-all.sh -j3
 ./scripts/xtensa-build-all.sh: WARN: ignoring arg -j3

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb force-pushed the build-all-warn-unknown-arg branch from 238e5a8 to 019b657 Compare March 26, 2020 03:11
@lgirdwood
Copy link
Member

Not CI tested for internal CI, Jenkins known issues.

@lgirdwood lgirdwood merged commit e73344a into thesofproject:master Mar 26, 2020
@marc-hb marc-hb deleted the build-all-warn-unknown-arg branch March 27, 2020 01:07
@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 6, 2020

I don't know about "easily" but in terms of time, number of lines changed and risk of not testing some combination or corner case and breaking it, it would be a completely different order of work magnitude. So no, not really.

At the time this script only "smelled" bad. Now I know it is bad, see PR #2711

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