Issues/openbmc env shell aliases#2
Open
ajenkins-privafy wants to merge 2 commits intoopencomputeproject:masterfrom
Open
Issues/openbmc env shell aliases#2ajenkins-privafy wants to merge 2 commits intoopencomputeproject:masterfrom
ajenkins-privafy wants to merge 2 commits intoopencomputeproject:masterfrom
Conversation
If user has a shell alias for ls(1) which alters its output (e.g. 'ls -F'), then openbmc-env fails to generate build/tmp/projdef.cfg. Escape the calling of 'ls' so that the alias is not used.
Recently deprecated Python2.x provides method iteritems() to iterate through a dictionary; it is not available in Python3.x, which uses backwards-compatible items() method. References: https://www.geeksforgeeks.org/difference-between-dict-items-and-dict-iteritems-in-python/ https://python-reference.readthedocs.io/en/latest/docs/dict/iteritems.html https://python-reference.readthedocs.io/en/latest/docs/dict/items.html
saper
reviewed
Jan 22, 2025
| evb=$(ls -d meta-evb/meta-evb-aspeed/meta*) | ||
| ami=$(\ls -d meta-ami/meta-*) | ||
| evb=$(\ls -d meta-evb/meta-evb-aspeed/meta*) | ||
| platform_list="${ami}"$'\n'"${evb}" |
There was a problem hiding this comment.
Is find(1) available? what about something like evb=$(find meta/evb-meta-evb-aspeed -type d -name 'meta*') - I guess they are looking for directories only anyway?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ls(1)which alters its output (e.g.ls -F), thenopenbmc-envfails to generatebuild/tmp/projdef.mod.cfg. Escape the calling oflsso that the alias is not used.Test (Python2.x machine):
alias 'ls=ls -F'.TEMPLATECONF=meta-ami/meta-tiogapass/conf . openbmc-env).projdef.mod.cfgis not created without this patch.Test (Python3.x machine):
python --versionreturnsPython 3.x.x).