Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified files get not recognized #20

Closed
christianlupus opened this issue Jul 18, 2014 · 6 comments
Closed

Modified files get not recognized #20

christianlupus opened this issue Jul 18, 2014 · 6 comments

Comments

@christianlupus
Copy link

Hello,

I just tried flashbake using my ubuntu 14.04LTS. The effect was - well - catastrophic. Flashbake did not recognize any modifications of any file. Thus I installed the most recent version from github but without success.

A bit more verbose:

  • Create a new folder. Create a git repo therein (git init).
  • Create a dummy config file. In my case it was just

plugins:flashbake.plugins.timezone:TimeZone
a

b

  • Create the file "a" and do a flashbake on the directory. The file gets checked in (ok so far).
  • Create a second file "b" and uncomment in the config file. Using flashbake it gets checked in.
  • Modify either file. git status shows the modifications clearly. When I apply flashbreak I get the message that no constent to be checked in has changed. (???)

Please note a small "bug": You seem to parse the output of git in some sense. If the user has a different language than English, you get into trouble. In this case (I am German) flashbreak did not even check in the very first version. I had to manually export LANG=C before. Maybe you might alter the LANG environment variable on calling git such that English is always used.

Hope this helps.
Christian Wolf

@ladykosha
Copy link

I have a similar problem but with other solution. (I am Russian, but it does not matter)
My solution is - removing # from line 47 in file commit.py.

 pending_re = re.compile('#\s*(renamed|copied|modified|new file):.*')

@christianlupus
Copy link
Author

Hello,

thanks for your help. That did the trick. I append here a diff for those who can put it upstream.
The modification of the language is not yet done by the script
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
diff --git a/src/flashbake/commit.py b/src/flashbake/commit.py
index 8488224..1f825ef 100755
--- a/src/flashbake/commit.py
+++ b/src/flashbake/commit.py
@@ -44,7 +44,7 @@ def commit(control_config, hot_files, quiet_mins):
_handle_fatal(hot_files, git_status)

     # in particular find the existing entries that need a commit
-    pending_re = re.compile('#\s*(renamed|copied|modified|new file):.*')
+    pending_re = re.compile('\s*(renamed|copied|modified|new file):.*')

     now = datetime.datetime.today()
     quiet_period = datetime.timedelta(minutes=quiet_mins)

@grantdobbe
Copy link

Can confirm. This also resolves an issue with globs not working in nested directories.

@cmdln
Copy link
Owner

cmdln commented Nov 13, 2015

This is likely a consequence of my ignorance to git porcelain, where output would be less subject to change and hence more amenable to parsing. If I ever get time to work on this repo in earnest, I would drop the custom output processing altogether anyway. I'll make this change and cut a new release.

@cmdln
Copy link
Owner

cmdln commented Nov 13, 2015

OK, cut 0.27.1 if all/any of you want to grab, test, and then feel free to close this issue.

@grantdobbe
Copy link

Pulled and tested this evening. Works as advertised. Thanks, Thomas!
On Nov 13, 2015 1:55 PM, "Thomas Gideon" notifications@github.com wrote:

OK, cut 0.27.1 if all/any of you want to grab, test, and then feel free to
close this issue.


Reply to this email directly or view it on GitHub
#20 (comment)
.

@cmdln cmdln closed this as completed Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants