-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
python: move pip-cache location #13012
Conversation
The pip-cache output ends up in the dl folder of openwrt. Since the output is a cache, it should rather be in the tmp folder. Other packages like NODE and GO also put their cache in the tmp folder. To unify this and to keep the dl folder clean, move the cache from python to tmp opnwrt folder. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Isn't the DL folder ultimately a cache as well? It contains all kinds of package versions. For a CI it seem to make sense caching the |
We could to that, but I run into a problem with this cache. I have found the following info about this.
Of course you can do that as well, but in my opinion the dl folder should only contain packages with one version and not cached packages. A provocative question would be: If we do it this way why don't we write the build cache of c programs there as well? |
I'm somewhat thinking about caching ccache within a CI, but that's another story 🙄 This PR looks reasonable to me. |
i'd leave it to @jefferyto |
The pip cache is not a build cache, it is a cache of packages downloaded from PyPI. If
I would rather want to understand the issue you are having with the pip cache rather than force every package build to re-download the same packages. You are trying to install a host Python package for a package and are ending up with an incompatible version? Why not specify the version you want? Edit: Part of the cache is for wheels, this does cache locally-built wheels (although I'm not sure if wheels are being built in our process). The main cache acts as a http cache. Edit #2: Quoting from the pip maintainer's answer on the referenced SO question:
So again, I am more interested in what the real underlying issue is. |
Also, I plan on moving the Go cache into |
Ok i understand that this is a download cache and not a build cache. My problem is that I have a central download folder (dl) where all my files I need for an openwrt build are stored. These files are saved every day, so I can build a build in the future, even if the package is not available upstream anymore. But now I have a problem with the backup of the dl folder, because it sets the file permissions to 600 and so another process running with a different user (backup collector) cannot backup these files, because it does not have the right permissions. By changing pip-cache location in the openwrt build tmp folder has solved my problem. |
This can be closed, right? |
@BKPepe Not quite. |
I don't think there are "right" or "wrong" permissions in this case as AFAIK there is no expectation that files in I would be open to adding a config option for the python3 package that, if enabled, would run |
I would be open to adding a config option for the python3 package that, if
enabled, would run chmod on the pip cache directory after every call to
host pip. Would this work for you?
@jefferyto That would be perfect. Thanks 👍
|
This adds a config option PYTHON3_HOST_PIP_CACHE_WORLD_READABLE; if enabled, chmod will be run after pip install to make all files/directories in the host pip cache world-readable. Supersedes openwrt#13012. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Please see #13135 - thanks. |
@jefferyto thanks for your fix |
This adds a config option PYTHON3_HOST_PIP_CACHE_WORLD_READABLE; if enabled, chmod will be run after pip install to make all files/directories in the host pip cache world-readable. Supersedes openwrt/packages#13012. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This adds a config option PYTHON3_HOST_PIP_CACHE_WORLD_READABLE; if enabled, chmod will be run after pip install to make all files/directories in the host pip cache world-readable. Supersedes openwrt#13012. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This adds a config option PYTHON3_HOST_PIP_CACHE_WORLD_READABLE; if enabled, chmod will be run after pip install to make all files/directories in the host pip cache world-readable. Supersedes openwrt#13012. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This adds a config option PYTHON3_HOST_PIP_CACHE_WORLD_READABLE; if enabled, chmod will be run after pip install to make all files/directories in the host pip cache world-readable. Supersedes openwrt#13012. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Maintainer: @jefferyto @commodo
Compile tested: x86_64, Openwrt openwrt-19.07
Run tested: no
Description:
The pip-cache output ends up in the dl folder of openwrt.
Since the output is a cache, it should rather be in the tmp folder.
Other packages like NODE and GO also put their cache in the tmp folder.
To unify this and to keep the dl folder clean, move the cache from python to tmp opnwrt folder.