Re: What's happening to the index

3 messages, 3 authors, 2016-07-03 · open the first message on its own page

Re: What's happening to the index

From: Matthieu Moy <hidden>
Date: 2016-06-28 15:17:38

"Andy Falanga (afalanga)" [off-list ref] writes:
After the line calling increlnum is executed, I often have issues with 
make unable to spawn the next command because it can't read the current 
directory info.
This may happen if you delete the current directory, even if your
re-create it afterwards. For example:

/tmp/test$ rm -fr /tmp/test && mkdir /tmp/test
/tmp/test$ touch foo
touch: cannot touch ‘foo’: No such file or directory
/tmp/test$ cd /tmp/test
/tmp/test$ touch foo   
/tmp/test$ 

This is unrelated from Git, but maybe you asked Git to delete a
directory (by switching to a branch which doesn't contain a directory
for example).
If I do: cd .. && cd -; all is well.
This is a typical symptom of the issue above.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: What's happening to the index

From: Andy Falanga (afalanga) <hidden>
Date: 2016-06-28 22:50:03

On 06/28/2016 09:17 AM, Matthieu Moy wrote:
"Andy Falanga (afalanga)" [off-list ref] writes:
quoted
After the line calling increlnum is executed, I often have issues with
make unable to spawn the next command because it can't read the current
directory info.
This may happen if you delete the current directory, even if your
re-create it afterwards. For example:

/tmp/test$ rm -fr /tmp/test && mkdir /tmp/test
/tmp/test$ touch foo
touch: cannot touch ‘foo’: No such file or directory
/tmp/test$ cd /tmp/test
/tmp/test$ touch foo
/tmp/test$

This is unrelated from Git, but maybe you asked Git to delete a
directory (by switching to a branch which doesn't contain a directory
for example).
quoted
If I do: cd .. && cd -; all is well.
This is a typical symptom of the issue above.
Thank you for the insight: very interesting.  After asking another 
colleague how he solved this issue, I've re-written my increlnum script 
to, instead of working within my working tree, clone a temporary of this 
one branch only.  Then, it increments the number and pushes back to the 
origin.  Once completed, the temporary clone is deleted.

The strange thing now is, after the script exits, I then call "git 
fetch" in the recipe.  I can see from the output of make that the remote 
db is fetched.  However, when I call "git show 
origin/rpm:path/to/rpm_build_num" from the makefile I get the *previous* 
number.  Yet, as soon as the make process exits, I call "git show 
origin/rpm:path/to/rpm_build_num" and it shows the correct number!  What 
gives?  Is there some sort of strange file caching that happening when 
make starts that, although the local db is updated, I don't get what I'm 
after?

Andy

Re: What's happening to the index

From: David <hidden>
Date: 2016-07-03 08:22:51

On 29 June 2016 at 08:49, Andy Falanga (afalanga) [off-list ref] wrote:
 Is there some sort of strange file caching that happening when
make starts that, although the local db is updated, I don't get what I'm
after?
I don't have time to look at your git issue, but I write this quick
note just in case it might help you to be aware that 'gnu make'
apparently does implement internal directory caching.

This is known to cause unexpected results in makefiles whose recipes
change the filesystem in ways that make does not notice.

See for example:
http://lists.gnu.org/archive/html/help-make/2015-02/msg00012.html

and related bug reports, for example:
https://savannah.gnu.org/bugs/index.php?41273

You might want to create a simple runnable example and ask on the
extremely helpful gnu-make mailing list:
https://lists.gnu.org/mailman/listinfo/help-make
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help