A sanity check to stop you accidentally installing packages to the wrong filesystem.
Thomas Wood
thomas at openedhand.com
Thu May 22 11:54:57 CEST 2008
On Wed, 2008-05-21 at 18:40 +0100, Robert Bragg wrote:
> Hi,
>
> I'm currently using opkg-cl to directly install packages to a
> development filesystem that is exported from the same machine via NFS. I
> specifically don't want to depend on the device being booted to install
> packages.
>
> As you can guess, this requires some amount of evil since opkg-cl must
> be run as root to do this. (I know I'm evil, so please no need to
> explain the potential woes of running as root :-) )
I don't think opkg-cl itself has any requirements that it must be run as
root, it should work perfectly well as a normal user.
>
> To give me _some_ sense of confidence though that I _probably_ wont
> accidentally trash my development machine when passing the wrong -o path
> I have added a local sanity check to my opkg that will verify that an
> opkg_dir already exists on the target filesystem instead of
> automatically trying to create it for me.
I often use alias opkg='opkg-cl -o /foo' to help with this :-)
>
> 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.
Regards,
Thomas
--
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