moonbase.lunar modification
samuel
samuel.verstraete at gmail.com
Thu Apr 3 12:22:43 CEST 2008
the solution is of course very easy... you simply shouldn't rm
/var/state/lunar/module.index.... if you still do so you will need to
fiddle with the lsh tools to recreate the module index before you lin
moonbase again.
On Thu, Apr 3, 2008 at 11:45 AM, lazyape <lazyape at gmail.com> wrote:
> if you do
> rm /var/state/lunar/module.index
> lin moonbase
>
> the you get this error
> `cp: cannot stat /var/state/lunar/module.index'
> and `lin moonbase' terminates without updating the local moonbase.
>
> this because we call
> `cp $MODULE_INDEX $TMP_MODULE_INDEX',
>
> but $MODULE_INDEX doesn't exist and cp returns an error.
>
> We can simply do `touch $MODULE_INDEX' so cp does not return with an error and
> `lin moonbase' terminate with error too.
>
>
>
>
> On Mon, 31 Mar 2008 11:53:06 -0700
> "Kok, Auke" <sofar at foo-projects.org> wrote:
>
> > lazyape wrote:
> > > if you "lin moonbase" and module.index is deleted or removed from the default location /var/state/lunar the "lin moonbase" is terminated with
> > > cp: cannot stat /var/state/lunar/module.index
> > >
> > > this patch fix this behaviour.
> > >
> > >
> > > --- moonbase.lunar 2008-03-30 12:54:15.200045773 +0300
> > > +++ moonbase.lunar 2008-03-30 12:54:06.427761136 +0300
> > > @@ -53,6 +53,9 @@
> > > mv $SYSTEM_MOONBASE/zlocal/ /var/lib/lunar/.zlocal-backup &&
> > > rm -rf $SYSTEM_MOONBASE &&
> > > TMP_MODULE_INDEX=$(temp_create "temp.module.index") &&
> > > + if [ ! -a $MODULE_INDEX ]; then
> > > + touch $MODULE_INDEX
> > > + fi
> > > cp $MODULE_INDEX $TMP_MODULE_INDEX &&
> > > lrm moonbase &&
> > > mkdir $SYSTEM_MOONBASE &&
> > >
> > >
> > > ps. i think "&&" can be deleted from the script
> >
> > what is the problem you have?
> >
> > this code is fairly fragile, we can't remove the '&&' lines at all and your
> > insertion will break a lot of things. Your patch is definately wrong as is.
> >
> > Auke
> > _______________________________________________
> > Lunar-dev mailing list
> > Lunar-dev at lunar-linux.org
> > http://foo-projects.org/mailman/listinfo/lunar-dev
>
>
> --
> lazyape <lazyape at gmail.com>
>
> _______________________________________________
> Lunar-dev mailing list
> Lunar-dev at lunar-linux.org
> http://foo-projects.org/mailman/listinfo/lunar-dev
>
More information about the Lunar-dev
mailing list