2009/12/24 Andrew Flegg <and...@bleb.org>:
> Yes. And there's a change needed in maemo-optify: auto should mean
> "don't do anything if it packages to /opt already OR it has a
> dependency on pymaemo-optify".

Just a correction: no Python packages currently need to explicitely
depend on pymaemo-optify to become optified. This is taken care by
python2.5-minimal (and its dependency on pymaemo-optify). Packages
need just to depend (and usually Build-Depend too) on python.

One idea for a possible generic heuristic (not tested on the
maemo-optify context) is to check that the package Build-Depends on
python *and* install files to any directories listed by the command
below:

echo -e "import sys\nfor d in sys.path: print d" | python2.5

(note the explicit "python2.5" call; calling just "python" will not
work; also note that some entries might not exist or might not be a
directory)

In any case, as I said before, it is still a *heuristic*. False
positives (or false negatives) will happen. So it is still safer to
add "none" to debian/optify if you are sure the automatic optification
will break your application. How to know? Try maemo-optify locally.

I believe the current Maemo QA will catch the affected applications
easily, because the application will break in obvious ways (i.e. will
not open). If the chosen heuristic fails, simply explicitly disable
optification.

Also there is the situation of Python applications that contain big
data files, images etc. Those still need some partial optification. I
think that no matter how maemo-optify works, the QA team needs to look
closely where the application installs files. This can be even made
more easy by providing some script that looks for big files (where
"big" is the threshold selected for maemo-optify) being installed
outside /opt (and outside directories managed by pymaemo-optify).

My two cents,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to