On Wed, Dec 30, 2015 at 04:30:17AM +0530, Shraddha Barke wrote:
> I am trying to build sugar on Ubuntu 15.04 laptop. After git clone
> and cd into sugar-build I get this error-Another osbuild instance is
> running on executing ./osbuild pull
> I searched the internet and found 2 such threads but the issue wasn't
> resolved. 

There's more than two such threads on sugar-devel@.

> Is this a bug that needs fixing?

Yes, it's a bug in osbuild, please fix it.

You'll find the get_lock_file_path() returns a file path Add a print
to find out what the file path is.

You'll find the get_lock_file() returns a file.

You'll see that clean() removes the file.  clean() may not be executed
if the builder is forced to stop.

Therefore the file may remain even though there is no instance
running.

The error is a lie.

To fix the bug, you should store the pid in the file, from
os.getpid(), and check that the pid exists on the system using
os.kill(pid, 0)

If the pid does not exist on the system, it is safe to os.unlink() the
file and continue to acquire the lock.

-- 
James Cameron
http://quozl.netrek.org/
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to