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

tools/pkginfo: simple tool to dump a package.mk #3472

Merged
merged 1 commit into from
May 4, 2019
Merged

tools/pkginfo: simple tool to dump a package.mk #3472

merged 1 commit into from
May 4, 2019

Conversation

MilhouseVH
Copy link
Contributor

Tool to dump fully evaluated package variables for a specific package. Additional parameters will be interpreted as variable names to be evaluated.

For example:

$ tools/pkginfo linux PKG_BUILD_PERF
PROJECT=Generic, DEVICE=, ARCH=x86_64
PKG_NAME="linux"
PKG_VERSION="5.0.7"
PKG_SITE="http://www.kernel.org"
PKG_URL="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.7.tar.xz"
PKG_DIR="/home/neil/projects/pullrequest_repos/LibreELEC.tv/packages/linux"
PKG_NEED_UNPACK="/home/neil/projects/pullrequest_repos/LibreELEC.tv/projects/Generic/linux /home/neil/projects/pullrequest_repos/LibreELEC.tv/projects/Generic/patches/linux /home/neil/projects/pullrequest_repos/LibreELEC.tv/projects/Generic/packages/linux /home/neil/projects/pullrequest_repos/LibreELEC.tv/packages/linux /home/neil/projects/pullrequest_repos/LibreELEC.tv/packages/linux-firmware/intel-ucode /home/neil/projects/pullrequest_repos/LibreELEC.tv/packages/linux-firmware/kernel-firmware"
PKG_DEPENDS_UNPACK=""
PKG_DEPENDS_BOOTSTRAP=""
PKG_DEPENDS_INIT="toolchain"
PKG_DEPENDS_HOST="ccache:host openssl:host"
PKG_DEPENDS_TARGET="toolchain cpio:host kmod:host xz:host wireless-regdb keyutils  binutils elfutils libunwind zlib openssl intel-ucode:host kernel-firmware elfutils:host pciutils"
PKG_IS_ADDON="no"
PKG_IS_KERNEL_PKG="yes"
PKG_BUILD_PERF="yes"

@vpeter4
Copy link
Contributor

vpeter4 commented Apr 30, 2019

I think you could remove root path /home/neil/projects/pullrequest_repos/LibreELEC.tv/ because I think it is clear everything happen in LE folder.

@MilhouseVH
Copy link
Contributor Author

I personally would rather leave it as it is, since the script outputs the actual value of PKG_DIR (or whatever) - if we start manipulating variables to make them cosmetically more appealing then they're no longer the actual values being used by the build system.

@vpeter4
Copy link
Contributor

vpeter4 commented Apr 30, 2019

But this script tools/pkginfo is for human use or for some scripting? If for human then same path again and again is just useless. But that's just me.

@MilhouseVH
Copy link
Contributor Author

Yes, it's for human consumption and it outputs the actual values without any mangling - stripping $ROOT may not always be desirable depending on how one wants to use what it outputs. If we strip $ROOT from variables then we're no longer outputting the true value, which troubles me.

I'm not sure I envisioned this as being some cosmetically attractive tool, to be honest - it's function is to dump the package variables, accurately, so that there's no uncertainty regarding the value a package is using.

@MilhouseVH
Copy link
Contributor Author

@vpeter4 how does http://ix.io/1HG6 work for you - just make sure --strip is the first parameter.

@vpeter4
Copy link
Contributor

vpeter4 commented Apr 30, 2019

Looks ok. But as I wrote this should be default output and use argument for full path.
Or ROOT path could be written before packages variable to see where we are atm.

@MilhouseVH
Copy link
Contributor Author

Hard to know what should be default output as I prefer to see the complete path by default which is what the build system will be using. I guess we'll need to agree to disagree.

@vpeter4
Copy link
Contributor

vpeter4 commented Apr 30, 2019

Well, I will probably not use tool much so I can live with it as is.
If you really insist of having full path then in case there are 2 or more entries write one on every line. This would be at least more readable.

@MilhouseVH
Copy link
Contributor Author

It's for dumping the variables by default, if you want pretty print I'll take a patch. :)

@CvH CvH merged commit 68b8b4a into LibreELEC:master May 4, 2019
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.

3 participants