All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] spatch temporary files issues
@ 2016-03-23 22:40 Keller, Jacob E
  2016-03-23 22:47 ` Julia Lawall
  2016-03-24 10:35 ` SF Markus Elfring
  0 siblings, 2 replies; 10+ messages in thread
From: Keller, Jacob E @ 2016-03-23 22:40 UTC (permalink / raw)
  To: cocci

Hi,

I am using coccinelle for a project, and have run into an issue regarding the temporary director created by spatch when it runs on a given cocci file.

Fatal error: exception Failure("Directory memcpy-assign used for temporary files already exists and should be removed.")

This occurs because I run in parallel, the same cocci script in the same directory against different sets of files.

Does there exist an option to control where the temporary files are located?

Thanks,
Jake

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-23 22:40 [Cocci] spatch temporary files issues Keller, Jacob E
@ 2016-03-23 22:47 ` Julia Lawall
  2016-03-23 23:28   ` Keller, Jacob E
  2016-03-24 10:35 ` SF Markus Elfring
  1 sibling, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2016-03-23 22:47 UTC (permalink / raw)
  To: cocci



On Wed, 23 Mar 2016, Keller, Jacob E wrote:

> Hi,
> 
> I am using coccinelle for a project, and have run into an issue regarding the temporary director created by spatch when it runs on a given cocci file.
> 
> Fatal error: exception Failure("Directory memcpy-assign used for temporary files already exists and should be removed.")
> 
> This occurs because I run in parallel, the same cocci script in the same directory against different sets of files.
> 
> Does there exist an option to control where the temporary files are located?

No, currently it's just determined by the file name.  Could you invoke 
your semantic patch from different places?

In any case, this could be improved, but I can't do it immediately.

julia

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-23 22:47 ` Julia Lawall
@ 2016-03-23 23:28   ` Keller, Jacob E
  2016-03-23 23:33     ` Julia Lawall
  0 siblings, 1 reply; 10+ messages in thread
From: Keller, Jacob E @ 2016-03-23 23:28 UTC (permalink / raw)
  To: cocci

> -----Original Message-----
> From: Julia Lawall [mailto:julia.lawall at lip6.fr]
> Sent: Wednesday, March 23, 2016 3:47 PM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: cocci at systeme.lip6.fr
> Subject: Re: [Cocci] spatch temporary files issues
> 
> 
> 
> On Wed, 23 Mar 2016, Keller, Jacob E wrote:
> 
> > Hi,
> >
> > I am using coccinelle for a project, and have run into an issue regarding
> the temporary director created by spatch when it runs on a given cocci file.
> >
> > Fatal error: exception Failure("Directory memcpy-assign used for
> temporary files already exists and should be removed.")
> >
> > This occurs because I run in parallel, the same cocci script in the same
> directory against different sets of files.
> >
> > Does there exist an option to control where the temporary files are
> located?
> 
> No, currently it's just determined by the file name.  Could you invoke
> your semantic patch from different places?
> 
> In any case, this could be improved, but I can't do it immediately.
> 
> Julia

I am working on re-writing the makefile that does this to locate to a different place. Long term it would be nicer if we didn't have to do that.

Thanks,
Jake

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-23 23:28   ` Keller, Jacob E
@ 2016-03-23 23:33     ` Julia Lawall
  2016-03-23 23:35       ` Keller, Jacob E
  0 siblings, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2016-03-23 23:33 UTC (permalink / raw)
  To: cocci



On Wed, 23 Mar 2016, Keller, Jacob E wrote:

> > -----Original Message-----
> > From: Julia Lawall [mailto:julia.lawall at lip6.fr]
> > Sent: Wednesday, March 23, 2016 3:47 PM
> > To: Keller, Jacob E <jacob.e.keller@intel.com>
> > Cc: cocci at systeme.lip6.fr
> > Subject: Re: [Cocci] spatch temporary files issues
> > 
> > 
> > 
> > On Wed, 23 Mar 2016, Keller, Jacob E wrote:
> > 
> > > Hi,
> > >
> > > I am using coccinelle for a project, and have run into an issue regarding
> > the temporary director created by spatch when it runs on a given cocci file.
> > >
> > > Fatal error: exception Failure("Directory memcpy-assign used for
> > temporary files already exists and should be removed.")
> > >
> > > This occurs because I run in parallel, the same cocci script in the same
> > directory against different sets of files.
> > >
> > > Does there exist an option to control where the temporary files are
> > located?
> > 
> > No, currently it's just determined by the file name.  Could you invoke
> > your semantic patch from different places?
> > 
> > In any case, this could be improved, but I can't do it immediately.
> > 
> > Julia
> 
> I am working on re-writing the makefile that does this to locate to a different place. Long term it would be nicer if we didn't have to do that.

Sure.  I can fix it within the next day or two, if you could wait for 
that.

julia

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-23 23:33     ` Julia Lawall
@ 2016-03-23 23:35       ` Keller, Jacob E
  0 siblings, 0 replies; 10+ messages in thread
From: Keller, Jacob E @ 2016-03-23 23:35 UTC (permalink / raw)
  To: cocci

> -----Original Message-----
> From: Julia Lawall [mailto:julia.lawall at lip6.fr]
> Sent: Wednesday, March 23, 2016 4:34 PM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: cocci at systeme.lip6.fr
> Subject: RE: [Cocci] spatch temporary files issues
> 
> 
> 
> On Wed, 23 Mar 2016, Keller, Jacob E wrote:
> 
> > > -----Original Message-----
> > > From: Julia Lawall [mailto:julia.lawall at lip6.fr]
> > > Sent: Wednesday, March 23, 2016 3:47 PM
> > > To: Keller, Jacob E <jacob.e.keller@intel.com>
> > > Cc: cocci at systeme.lip6.fr
> > > Subject: Re: [Cocci] spatch temporary files issues
> > >
> > >
> > >
> > > On Wed, 23 Mar 2016, Keller, Jacob E wrote:
> > >
> > > > Hi,
> > > >
> > > > I am using coccinelle for a project, and have run into an issue
> regarding
> > > the temporary director created by spatch when it runs on a given cocci
> file.
> > > >
> > > > Fatal error: exception Failure("Directory memcpy-assign used for
> > > temporary files already exists and should be removed.")
> > > >
> > > > This occurs because I run in parallel, the same cocci script in the same
> > > directory against different sets of files.
> > > >
> > > > Does there exist an option to control where the temporary files are
> > > located?
> > >
> > > No, currently it's just determined by the file name.  Could you invoke
> > > your semantic patch from different places?
> > >
> > > In any case, this could be improved, but I can't do it immediately.
> > >
> > > Julia
> >
> > I am working on re-writing the makefile that does this to locate to a
> different place. Long term it would be nicer if we didn't have to do that.
> 
> Sure.  I can fix it within the next day or two, if you could wait for
> that.
> 
> Julia

There is no rush. Thanks.

Regards,
Jake

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-23 22:40 [Cocci] spatch temporary files issues Keller, Jacob E
  2016-03-23 22:47 ` Julia Lawall
@ 2016-03-24 10:35 ` SF Markus Elfring
  2016-03-24 15:15   ` Keller, Jacob E
  1 sibling, 1 reply; 10+ messages in thread
From: SF Markus Elfring @ 2016-03-24 10:35 UTC (permalink / raw)
  To: cocci

> I am using coccinelle for a project, and have run into an issue regarding the temporary director created by spatch when it runs on a given cocci file.
> 
> Fatal error: exception Failure("Directory memcpy-assign used for temporary files already exists and should be removed.")
> 
> This occurs because I run in parallel, the same cocci script in the same directory against different sets of files.

How do you think about to circumvent this issue by creating another
temporary directory for your source code transformation tasks explicitly?
Do you need to fiddle also with symbolic links for your SmPL scripts?

Regards,
Markus

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-24 10:35 ` SF Markus Elfring
@ 2016-03-24 15:15   ` Keller, Jacob E
  2016-03-24 15:42     ` SF Markus Elfring
  0 siblings, 1 reply; 10+ messages in thread
From: Keller, Jacob E @ 2016-03-24 15:15 UTC (permalink / raw)
  To: cocci

> -----Original Message-----
> From: SF Markus Elfring [mailto:elfring at users.sourceforge.net]
> Sent: Thursday, March 24, 2016 3:36 AM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: cocci at systeme.lip6.fr
> Subject: Re: [Cocci] spatch temporary files issues
> 
> > I am using coccinelle for a project, and have run into an issue regarding
> the temporary director created by spatch when it runs on a given cocci file.
> >
> > Fatal error: exception Failure("Directory memcpy-assign used for
> temporary files already exists and should be removed.")
> >
> > This occurs because I run in parallel, the same cocci script in the same
> directory against different sets of files.
> 
> How do you think about to circumvent this issue by creating another
> temporary directory for your source code transformation tasks explicitly?
> Do you need to fiddle also with symbolic links for your SmPL scripts?
> 
> Regards,
> Markus

That's essentially what I did as a work around. It just surprised me that there is no way to control how temporary files get created.

Thanks,
Jake

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-24 15:15   ` Keller, Jacob E
@ 2016-03-24 15:42     ` SF Markus Elfring
  2016-03-24 15:47       ` Keller, Jacob E
  0 siblings, 1 reply; 10+ messages in thread
From: SF Markus Elfring @ 2016-03-24 15:42 UTC (permalink / raw)
  To: cocci

> That's essentially what I did as a work around. It just surprised me
> that there is no way to control how temporary files get created.

It seems that have got some control in such an use case already.
The user interface might not be as convenient as you would prefer.

Should a temporary directory be created that is stored at an other location
and separated from your SmPL scripts?

Regards,
Markus

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-24 15:42     ` SF Markus Elfring
@ 2016-03-24 15:47       ` Keller, Jacob E
  2016-03-24 16:02         ` SF Markus Elfring
  0 siblings, 1 reply; 10+ messages in thread
From: Keller, Jacob E @ 2016-03-24 15:47 UTC (permalink / raw)
  To: cocci

> -----Original Message-----
> From: SF Markus Elfring [mailto:elfring at users.sourceforge.net]
> Sent: Thursday, March 24, 2016 8:43 AM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: cocci at systeme.lip6.fr
> Subject: Re: [Cocci] spatch temporary files issues
> 
> > That's essentially what I did as a work around. It just surprised me
> > that there is no way to control how temporary files get created.
> 
> It seems that have got some control in such an use case already.
> The user interface might not be as convenient as you would prefer.
> 
> Should a temporary directory be created that is stored at an other location
> and separated from your SmPL scripts?
> 
> Regards,
> Markus

I have no control over what spatch does, in that I have to manually change directory before invoking spatch to prevent issues. Yes, I can avoid this by being more careful in how I invoke spatch, but that isn't really control of spatch and just a workaround to avoid clashing with itself.

I would expect software to make temporary files and directories at other locations, such as how perl provides the mktemp interface, so that files are safe from invocation like this.

However, I don't know how easy that is to do for spatch, and the workaround does appear to be fine for my case.

Thanks,
Jake

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Cocci] spatch temporary files issues
  2016-03-24 15:47       ` Keller, Jacob E
@ 2016-03-24 16:02         ` SF Markus Elfring
  0 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2016-03-24 16:02 UTC (permalink / raw)
  To: cocci

> I would expect software to make temporary files and directories at other locations,
> such as how perl provides the mktemp interface, so that files are safe from invocation like this.

* Have you got any preferences for a corresponding directory selection?

* Would you like to specify any name pattern for the preferred output directory?

Regards,
Markus

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-03-24 16:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 22:40 [Cocci] spatch temporary files issues Keller, Jacob E
2016-03-23 22:47 ` Julia Lawall
2016-03-23 23:28   ` Keller, Jacob E
2016-03-23 23:33     ` Julia Lawall
2016-03-23 23:35       ` Keller, Jacob E
2016-03-24 10:35 ` SF Markus Elfring
2016-03-24 15:15   ` Keller, Jacob E
2016-03-24 15:42     ` SF Markus Elfring
2016-03-24 15:47       ` Keller, Jacob E
2016-03-24 16:02         ` SF Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.