Creating binary pkgs with quickpkg (sys-apps/portage) using PKG_INSTALL_MASK does not exclude files in PKG_INSTALL_MASK from the binary package. The docs hints that PKG_INSTALL_MASK should do that for binary pkgs. Reproducible: Always
It's really intended for use with FEATURES=buidpkg, rather than quickpkg. Since quickpkg does not use a temporary directory to create the tar file, it can't use the existing PKG_INSTALL_MASK code. Rather than implement this behavior for quickpkg, I'd prefer to simply note in the documentation that PKG_INSTALL_MASK is not supported by quickpkg.
Perhaps it is possible to use tar --exclude PATTERN? I am guessing here mainly because the semantics of INSTALL_MASK value range isn't documented.
Perhaps I should mention that I think quickpkg is very valuable for embedded development. Build you apps/libs into a target root fs. Possibly tweak some stuff in the root fs and when you are happy, use quickpkg to package them, using PKG_INSTALL_MASK to omit unwanted files on the target.
(In reply to comment #2) > Perhaps it is possible to use tar --exclude PATTERN? In order to avoid copying files to a temporary directory, we're using python's tarfile module rather than the tar program. So, it we's probably want to use python's glob module to implement the pattern matching. > I am guessing here mainly because the semantics of > INSTALL_MASK value range isn't documented. Here's the relevant snippet of code: for no_inst in ${install_mask}; do # normal stuff rm -Rf "${root}"/${no_inst} >&/dev/null # we also need to handle globs (*.a, *.h, etc) find "${root}" \( -path "${no_inst}" -or -name "${no_inst}" \) \ -exec rm -fR {} \; >/dev/null 2>&1 done That should be easy to emulate with python's glob module.
I see how works now, thanks. One thing I miss though is the ability to keep some files and remove everyone else. That would imply some NOT operator though. I guess that isn't available with globbing?
No, there's no NOT operator, but I guess we could add INSTALL and PKG_INSTALL variables to control which files are allowed to be installed.
That would be awesome! First PKG_INSTALL/INSTALL(INSTALL is a bit generic and could clash) would generate the complete file list and the INSTALL_MASK would be applied afterwards. Perhaps PKG_INSTALL_LIST/INSTALL_LIST are better names? solar, adding you too for portage-utils support too :)
Removing myself and adding portage-utils@ Why would we need a new variable name?
is that necessary ? couldn't we use python's glob to expand everything, and then handle the "not" logic ourselves ?
(In reply to comment #9) > is that necessary ? couldn't we use python's glob to expand everything, and > then handle the "not" logic ourselves ? I'm not sure I understand the question. No one's saying that python's glob/fnmatch modules can't be used to support PKG_INSTALL_MASK in quickpkg. Is that what you're asking about? The PKG_INSTALL_LIST/INSTALL_LIST idea is about adding a way to do the inverse of PKG_INSTALL_MASK/INSTALL_MASK, where you specify which files you want instead of which files you don't want.
(In reply to comment #10) > (In reply to comment #9) > > is that necessary ? couldn't we use python's glob to expand everything, and > > then handle the "not" logic ourselves ? > > I'm not sure I understand the question. No one's saying that python's > glob/fnmatch modules can't be used to support PKG_INSTALL_MASK in quickpkg. Is > that what you're asking about? > > The PKG_INSTALL_LIST/INSTALL_LIST idea is about adding a way to do the inverse > of PKG_INSTALL_MASK/INSTALL_MASK, where you specify which files you want > instead of which files you don't want. Me too, how would we handle not logic if no new variable? I guess we could extend the syntax for INSTALL_MASK to include NOT logic but would not that interfere with globbing?
sorry, i misread comment #5. if quickpkg installs PKG_INSTALL_MASK now, then that's all i was concerned with.