Subject: Re: [Instant] [Branch ~instant-core/instant/main] Rev 316: Updated ChangeLog

From: Johannes Ring <[email-masked]>
Date: Thu, 23 Jun 2011 14:06:53 +0200

On Wed, Jun 22, 2011 at 9:56 PM,  <[email-masked]> wrote:
> ------------------------------------------------------------
> revno: 316
> committer: Johan Hake <[email-masked]>
> branch nick: instant
> timestamp: Wed 2011-06-22 12:54:58 -0700
> message:
>  Updated ChangeLog
> modified:
>  ChangeLog
>
>
> --
> lp:instant
> https://code.launchpad.net/~instant-core/instant/main
>
> You are subscribed to branch lp:instant.
> To unsubscribe from this branch go to https://code.launchpad.net/~instant-core/instant/main/+edit-subscription
>
> === modified file 'ChangeLog'
> --- ChangeLog   2011-06-18 05:32:06 +0000
> +++ ChangeLog   2011-06-22 19:54:58 +0000
> @@ -1,5 +1,5 @@
>  - Error log is now copied to ./instant/error/module_name/config.log
> -   for easier retrieval
> +   for easier retrieval and ./instant/error/config.log

I guess you mean ~/.instant/error/compile.log?

Johannes

---

From: Johan Hake <[email-masked]>
Date: Thu, 23 Jun 2011 09:19:17 -0700

On Thursday June 23 2011 05:06:53 Johannes Ring wrote:
> > To unsubscribe from this branch go to
> > https://code.launchpad.net/~instant-core/instant/main/+edit-subscription
> > 

Yes! Fixed!

Johan

---

From: Johannes Ring <[email-masked]>
Date: Thu, 23 Jun 2011 18:54:00 +0200

>> I guess you mean ~/.instant/error/compile.log?

Are you sure you didn't forgot the tilde ('~')? It's a ".instant"
folder in $HOME, not a "instant" folder in the current directory
('./'), right?

Another thing: How about cleaning up the "error" folder when running
instant-clean?

Johannes

---

From: Johan Hake <[email-masked]>
Date: Thu, 23 Jun 2011 10:09:59 -0700

> folder in $HOME, not a "instant" folder in the current directory

Yes! Fixed! You can also use:

  instant.get_error_dir()

In the test script. This function looks for INSTANT_ERROR_DIR and creates it 
if the directory does not exist.

> Another thing: How about cleaning up the "error" folder when running

It did, but it did not clean everything. I think it does now.

Johan

---

From: Johannes Ring <[email-masked]>
Date: Thu, 23 Jun 2011 19:28:34 +0200

>> folder in $HOME, not a "instant" folder in the current directory

Almost! :-)

Here is a patch for the ChangeLog:

- - Error log is now copied to ~./instant/error/module_name/compile.log
-   and ./instant/error/compile.log for easier retrieval
+ - Error log is now copied to ~/.instant/error/module_name/compile.log
+   and ~/.instant/error/compile.log for easier retrieval

> You can also use:

Yes, good idea!

> It did, but it did not clean everything. I think it does now.

I get this when I run instant-clean now:

$ instant-clean
Created temp directory '/tmp/tmp2mm3OQ2011-6-23-19-21_instant'.
Removing 0 modules from Instant cache...
Removing 23 error logs from Instant cache...
Traceback (most recent call last):
  File "/home/johannr/fenics-dev/bin/instant-clean", line 57, in <module>
    os.remove(os.path.join(error_dir, error_log))
OSError: [Errno 21] Is a directory:
'/home/johannr/.instant/error/dolfin_compile_code_8141410e773e4310c4c20e4e1f1f22d4'

Johannes

---

From: Johan Hake <[email-masked]>
Date: Thu, 23 Jun 2011 10:31:42 -0700

On Thursday June 23 2011 10:28:34 Johannes Ring wrote:
> >> >> > https://code.launchpad.net/~instant-core/instant/main/+edit-subscri
> >> >> > pti on
> >> >> > 
> >> >> >  - Error log is now copied to
> >> >> > ./instant/error/module_name/config.log -   for easier retrieval
> > In the test script. This function looks for INSTANT_ERROR_DIR and creates
> > it if the directory does not exist.
> 
> Yes, good idea!
> 

Damn it!

Could yo have a look at it... My computer has suddenly start complaining about 
alot. Therefore the sloppy craftmanship lately ;)

Johan

> 
> Johannes
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~instant
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~instant
> More help   : https://help.launchpad.net/ListHelp

---

From: Johannes Ring <[email-masked]>
Date: Thu, 23 Jun 2011 20:15:03 +0200

> alot. Therefore the sloppy craftmanship lately ;)

Patch attached (includes ChangeLog fix).

Johannes
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [email-masked]
# target_branch: bzr+ssh://bazaar.launchpad.net/~instant-\
#   core/instant/main/
# testament_sha1: afa0487a0ea7b012c0a9ea8cb2a3f42b340fa6c2
# timestamp: 2011-06-23 20:09:15 +0200
# base_revision_id: [email-masked]
# 
# Begin patch
=== modified file 'ChangeLog'
--- ChangeLog	2011-06-23 17:09:06 +0000
+++ ChangeLog	2011-06-23 18:07:10 +0000
@@ -1,5 +1,5 @@
- - Error log is now copied to ~./instant/error/module_name/compile.log
-   and ./instant/error/compile.log for easier retrieval 
+ - Error log is now copied to ~/.instant/error/module_name/compile.log
+   and ~/.instant/error/compile.log for easier retrieval
 0.9.10 [2011-05-16]
  - Added support for setting swig binary and swig path
 0.9.9 [2011-02-23]

=== modified file 'scripts/instant-clean'
--- scripts/instant-clean	2011-06-23 17:09:06 +0000
+++ scripts/instant-clean	2011-06-23 18:08:47 +0000
@@ -54,7 +54,10 @@
 
 print "Removing %d error logs from Instant cache..." % len(error_logs)
 for error_log in error_logs:
-    os.remove(os.path.join(error_dir, error_log))
+    if os.path.isdir(os.path.join(error_dir, error_log)):
+        shutil.rmtree(os.path.join(error_dir, error_log))
+    else:
+        os.remove(os.path.join(error_dir, error_log))
 
 print "Removing %d lock files from Instant cache..." % len(lockfiles+error_lockfiles)
 for lf in lockfiles:

# Begin bundle