Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#11803 closed Bug Report - General (fixed)

sendProfile.py doesn't generate a uuid when the directory HardwareProfile is missing

Reported by: dekarl@… Owned by: Raymond Wagner
Priority: minor Milestone: 0.26.2
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

just noticed this on a Mythbuntu frontend

user@myth-fe1:~$ /usr/share/mythtv/hardwareprofile/sendProfile.py
Traceback (most recent call last):
  File "/usr/share/mythtv/hardwareprofile/sendProfile.py", line 420, in <module>
    main()
  File "/usr/share/mythtv/hardwareprofile/sendProfile.py", line 403, in main
    profile = read_profile(gate, smolt.read_uuid())
  File "/usr/share/mythtv/hardwareprofile/smolt.py", line 1271, in read_uuid
    raise UUIDError, 'Unable to save UUID to %s.  Please run once as root.' % hw_uuid_file
smolt.UUIDError: Unable to save UUID to /home/user/.mythtv/HardwareProfile/hw-uuid.  Please run once as root.
main()
  File "/usr/share/mythtv/hardwareprofile/sendProfile.py", line 403, in main
    profile = read_profile(gate, smolt.read_uuid())
  File "/usr/share/mythtv/hardwareprofile/smolt.py", line 1271, in read_uuid
    raise UUIDError, 'Unable to save UUID to %s.  Please run once as root.' % hw_uuid_file
smolt.UUIDError: Unable to save UUID to /home/user/.mythtv/HardwareProfile/hw-uuid.  Please run once as root.

looking at ~/.mythtv the permissions are there but no directory "HardwareProfile?"

drwxrwuser@myth-fe1:~$ ls -la ~/.mythtv/
total 6
drwxr-xr-x 11 user user  240 Aug 31 10:44 .

manually creating that directory "fixed" it

user@myth-fe1:~$ mkdir .mythtv/HardwareProfile
user@myth-fe1:~$ /usr/share/mythtv/hardwareprofile/sendProfile.py
Processing MythTV Data
=====================================================
Smolt has collected four types of information:

Change History (4)

comment:1 Changed 7 years ago by Raymond Wagner

Owner: set to Raymond Wagner
Status: newaccepted

comment:2 Changed 7 years ago by Raymond Wagner <rwagner@…>

Resolution: fixed
Status: acceptedclosed

In 10be7341345986d4c0e508c0a9791d35dca43770/mythtv:

Make sure smolt directory is created before trying to read from it.

This makes sure the configuration storage directory has been created
prior to attempting to use it. Smolt typically stores to /etc, and
assumes the packager has created its desired directory. There is
probably a cleaner place to put this code, but this is a catch-all for
several files read from that directory.

Fixes #11803

comment:3 Changed 7 years ago by Raymond Wagner <rwagner@…>

In 7cb39410374153a685fc70376637e889684a0e9a/mythtv:

Make sure smolt directory is created before trying to read from it.

This makes sure the configuration storage directory has been created
prior to attempting to use it. Smolt typically stores to /etc, and
assumes the packager has created its desired directory. There is
probably a cleaner place to put this code, but this is a catch-all for
several files read from that directory.

Fixes #11803
(cherry picked from commit 10be7341345986d4c0e508c0a9791d35dca43770)

comment:4 Changed 7 years ago by Raymond Wagner

Milestone: unknown0.26.2
Note: See TracTickets for help on using tickets.