[maemo-developers] maemo-optify, autobuilder & /opt

From: Nathan Anderson nathan at andersonsplace.net
Date: Wed Dec 2 23:20:09 EET 2009
Anderson Lizardo,

	Unless I misunderstood;  if the package itself has a /opt path in it
the maemo-optify won't run on it.     So if you are "installing" anything
(even one file) under the /opt path (which based on what I see you saying
below it appears you are); it should cause the maemo-optify to not run.

Nathan Anderson

-----Original Message-----
From: maemo-developers-bounces at maemo.org
[mailto:maemo-developers-bounces at maemo.org] On Behalf Of Anderson Lizardo
Sent: Wednesday, December 02, 2009 11:56 AM
To: Marius Vollmer
Cc: maemo-developers at maemo.org
Subject: Re: maemo-optify, autobuilder & /opt

On Wed, Dec 2, 2009 at 12:56 PM, Marius Vollmer <marius.vollmer at nokia.com>
wrote:
> ext Anderson Lizardo <anderson.lizardo at openbossa.org> writes:
>
>> If you have plans to begin enabling auto-optification by default, 
>> please inform us here on the list so we can begin adding the 
>> debian/optify file to avoid optifying packages that were manually 
>> optified  by other means (e.g. python packages).
>
> If a package already contains a /opt directory, no further 
> optification is done by the maemo-optify tools in any case.  Is that 
> enough to protect you?

No, because the optification was done by creating a "pymaemo-optify"
package which bind mounts the relevant Python directories from /usr/... to
/opt/pymaemo. These mounts are done during device boot by
/etc/init.d/pymaemo-optify (they are not mounted inside scratchbox, of
course).

This means that there is no change required for python packages to become
optified, they just need to depend on python.

> We can put additional checks into maemo-optify to disable optification.
> I don't know enough about Python packages to suggest a good one, but 
> maybe just looking for /usr/lib/py* in a package and stopping to do 
> anything would work.

Actually the list of directories handled by pymaemo-optify is variable (but
not expected to change). They are defined in /etc/default/pymaemo-optify and
currently is:

/usr/lib/python2.5
/usr/share/pyshared
/usr/lib/pyshared
/usr/share/python-support
/usr/lib/python-support

One idea might be to check whether this file exists and ignore any packages
which install files to the directories listed on the "BIND_MOUNTS" directory
(note that this file is a snippet of shell script read by
/etc/init.d/pymaemo-optify).

Or you can hard code this list somewhere, and you will get at least most
Python packages ignored. As with every heuristics, we can't get 100% of
cases, and others will need to have to be manually opted-out.

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

More information about the maemo-developers mailing list