Code review comment for lp://staging/~ken-vandine/ubuntu-system-settings/lp1524424

Revision history for this message
Iain Lane (laney) wrote :

On Mon, Dec 14, 2015 at 12:23:13PM -0000, Sebastien Bacher wrote:
> > I think it probably wants to be "homesize - movies - pictures - audio - totalClickSize" though, right?
>
> Unsure, I though that click were stored out of the userdir, so it would be wrong to remove them from that one?

I thought they were in there. But if they are not (/opt/click.ubuntu.com
rings a bell), then this change is probably actually okay as long as you
count user clicks only (otherwise you count system stuff again).

In any event I think it would be better to be more explicit about the
calculations instead of cancelling out parts of "Used by Ubuntu".

> > BTW don't we need to add the sizes of all of the click packages' data
> > directories to "Used by apps" too (and subtract it from "Other files)?
>
> no, it's a known bug/not-done-yet to count datas, I'm unsure how to do that with the xdg dirs, count .config|local|cache/<clickid>? what about logs, etc? but that's getting out of topic for this specific change

How do applications know where to save data to? They write to a well
known directory under XDG_{CACHE,CONFIG,DATA}_HOME, so use that. Count
the logs and other stuff (if that actually does happen) as in use by the
system if it's too hard to do it any other way.

From https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement:

  Applications will always have read access to their install directory
  and have write access to directories they own as determined by the XDG
  base directory specification. Specifically:
  XDG_CACHE_HOME/<APP_PKGNAME>, XDG_RUNTIME_DIR/<APP_PKGNAME>,
  XDG_RUNTIME_DIR/confined/<APP_PKGNAME> (for TMPDIR),
  XDG_DATA_HOME/<APP_PKGNAME> and XDG_CONFIG_HOME/<APP_PKGNAME>. Apps
  can discover these paths using standard APIs and appending the package
  name as defined by the 'name' field of the manifest.

Yes it is out of scope, that's why it was "BTW". I'm just suggesting
things to make the software better.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

« Back to merge proposal