mirror of https://github.com/perkeep/perkeep.git
1c14d2d219
When reinstalling the app, using shell commands to set executable permissions on the camput binary sometimes fails for unknown reasons. The camput binary keeps 0660 permissions even though no error is reported. The frequency of failed deployments seems to increase when more recent build tools are used in the build process. On a Nexus 5X, observed failure rates are in the order of one in twenty up to one in six. This commit removes all use of shell commands for deploying camput and utilizes native java methods instead. While the resulting permissions of camput change from 0700 to 0760, this is acceptable as the group is app-specific and not shared. A call to fsync is added to ensure that all file data (not just metadata) is committed to disk before the file is renamed. This should be safer in the event of a power loss as we're most likely writing to an ext4 file system (the noauto_da_alloc mount option is used on modern devices, see [1]). With these changes, no failures to set executable permission bits could be observed, regardless of build tool version used (v19.1 and v26.0, n=30 each). Fixes #932 [1] https://www.kernel.org/doc/Documentation/filesystems/ext4.txt Change-Id: I290b4ce896aa449afef89ac87cdd0431752ceb93 |
||
---|---|---|
.. | ||
android | ||
chrome/clip-it-good | ||
curl | ||
ios-objc | ||
js | ||
osx | ||
python |