emonPi Update question about git "Untracked files"

The past few times I have run the emonPi Update I have received the log information below. Are the “Untracked files” leftovers from some other change? I have not added or changed these files. Do I delete them or??

Filesystem is unlocked - Write access
type ' rpi-ro ' to lock
#############################################################
I2C LCD DETECTED Ox27
Starting emonPi Update >
via service-runner-update.sh
EUID: 1000
Argument: emonpi
Fri Apr 14 15:15:54 CDT 2017
#############################################################

emonSD-07Nov16

git pull /home/pi/emonpi
* master
  wifiap
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	hardware/emonpi/emonpi2c/
	lcd/gsmhuaweistatus.pyc
	lcd/i2c_lib.pyc
	lcd/lcddriver.pyc

nothing added to commit but untracked files present (use "git add" to track)
Updating 4dc88fa..1481242
Fast-forward
 factoryreset             |  2 +-
 firmware/readme.md       | 11 +++++++++++
 firmware/src/src.ino     |  6 +++---
 service-runner           |  6 +++---
 service-runner-update.sh |  2 +-
 5 files changed, 19 insertions(+), 8 deletions(-)
git pull /home/pi/RFM2Pi

.pyc files are compiled python files. I assume they were created when the system first ran the .py sources automatically.

Don’t know enough about the build system but I think it’s safe to ignore them.

They can be deleted, but as soon as the associated Python script runs again, they’ll get re-created.
Python uses them to make loading a script faster. They have no effect on a script’s run speed.

And they are recreated when ever the source “.py” files are modified (later save date).

Yep, deleting them will have no effect beyond slowing down the next startup as they will need re-creating before it can load. although .pyc ARE the files that are run rather than just something to aid faster loading.

Ideally there should be an entry added to the .gitignore file

# ignore all compiled python binaries
*.pyc

as done in emonhub.

1 Like

Paul - Is this something @glyn.hudson adds to the git pull routine? Or something the user (me!) should be adding?

It should be added to the main repo so all users get it without causing the usual “modified files” issue preventing future updates. PR done!

2 Likes

Thanks a lot :thumbsup:

Thank you Paul, Bill & Peter!