Closed timthelion closed 10 years ago
Yeah, just print the content of the file in a nice way.
The hard part about this commit, is making commands like update(which end up installing a bunch of programs) not print that information ;)
I do not really understand the purpose of install to print it: because the program runs already...
would it not make more sense to have an separate command for just showing this or do it with subuser list --full
or something like that
anyway I probably missunderstand the purpose
This isn't an important feature. The only reason I put it on the list, is that android does this, it shows you what permissions a program will have once it is installed, at install time, so I thought it might be nice to have that here as well. I don't personally care at all though.
In my opinion there is usually to much console output when one installs the program:
but maybe at the very end: might look into it if I find a fast way - still have some couple of minutes for today
My Suggestion
Refactor the many subprocessCheckedCall to subuser commands
actually it would be much better to call the relevant function from code (might need some adjustments)
This is a fast grep output
grep -nHIirF -- "subuser" (in directory: /home/workerm/subuser/logic/subuserCommands)
./update:64: subuserlib.utils.subprocessCheckedCall(["subuser","uninstall",program])
./update:67: subuserlib.utils.subprocessCheckedCall(["subuser","install",program])
./update:150: subprocess.call(["subuser","install",program])
./subuserlib/dockerImages.py:15: utils.subprocessCheckedCall(["subuser","install",programName])
./clean:37: subuserlib.utils.subprocessCheckedCall(["subuser","uninstall",program])
./install-from-registry:32: subuserlib.utils.subprocessCheckedCall(["subuser","install",program,"--from-cache"])
./install-from-registry:34: subuserlib.utils.subprocessCheckedCall(["subuser","install",program])
Search completed with 7 matches.
if the functions are called in a prober python way: you can most of the things much easier
Had a nice idea: I think .
output something like:
workerm@notebook:~$ subuser install vim
vim is already installed.
========= PERMISSION.json for: <vim> =========
{
"description": "A simple powerful text editor",
"maintainer": "Timothy Hobbs <timothyhobbs (at) seznam dot cz>",
"last-update-time": "2014-02-12-12:59",
"executable": "/usr/bin/vim",
"x11": false,
"inherit-working-directory": true,
"allow-network-access": false
}
workerm@notebook:~$
only for explicit installed programs
I'm closing this for now, after: https://github.com/subuser-security/subuser/commit/920d9aa35991e85ed94b85b8b677dd8b382c26cf
What do you mean by that: output the permission json file content or something completely different