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

Scan for build directory absolute Windows path after building #16

Closed
DavidEGrayson opened this issue Sep 10, 2015 · 4 comments
Closed

Comments

@DavidEGrayson
Copy link
Contributor

Several issues reported to the MINGW-packages repository resulted from the Windows path to the packager's MSYS2 installation accidentally being baked into the package itself:

I would suggest adding a pass to makepkg that scans the package for this issue. Something like this could go a long way:

grep -Fr `cygpath -w /` $pkgdir && echo "warning: absolute path to build directory found in package"
@yfwz100
Copy link

yfwz100 commented Oct 10, 2015

I suggest the detection command changed to

grep -Fr `cygpath -m /` $pkgdir && echo "warning: absolute path to build directory found in package"

cygpath -w / fail to detect path with '/' as separator.

@DavidEGrayson
Copy link
Contributor Author

Thanks, that's a good idea. I don't know which version is more common (the one with forward slashes or backslashes). We might as well check for both.

@DavidEGrayson
Copy link
Contributor Author

makepkg already has a feature for warning about build directory references:

https://github.com/Alexpux/MSYS2-pacman/blob/master/scripts/libmakepkg/lint_package/build_references.sh.in

I am working on a pull request that improves that script.

@yfwz100
Copy link

yfwz100 commented Oct 12, 2015

👍

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

No branches or pull requests

2 participants