A sanity check to stop you accidentally installing packages to the wrong filesystem.

Thomas Wood thomas at openedhand.com
Mon Jun 9 15:31:09 CEST 2008

On Thu, 2008-05-22 at 12:24 +0100, Robert Bragg wrote:
> On Thu, 2008-05-22 at 10:54 +0100, Thomas Wood wrote:
> > > 
> > > Since it seems like a fairly sensible failsafe safe check, I'm posting
> > > the tweak here to see if anyone would object to something similar being
> > > committed?
> > > 
> > > A noticeable affect this change would have is when creating new
> > > filesystems built of ipks. It becomes your responsibility to ensure this
> > > directory exists first, though I think it should be simple enough to
> > > handle that.
> > 
> > Richard Purdie informs me that this shouldn't be a problem, so unless
> > anyone has any other comments, I'll commit the patch.
> Thanks Thomas.

As we discussed, this solution turned out to be more difficult than it
first appeared, because opkg is not consistent in the way it handles
error messages between functions.

However, now that I have implemented single session locking, a side
effect is that you will be unable to run opkg on a filesystem
without /var/lib/opkg because it uses this directory for the lock file
and does not create if for you.

Also of note is that opkg should respond to the environment variable
OPKG_OFFLINE_ROOT as expected.



OpenedHand Ltd.

Unit R Homesdale Business Center / 216-218 Homesdale Road /
Bromley / BR1 2QZ / UK             Tel: +44 (0)20 8819 6559

Expert Open Source For Consumer Devices - http://o-hand.com/

More information about the opkg-devel mailing list