Changeset 5e4b3b9 in rtems-source-builder


Ignore:
Timestamp:
12/06/23 21:13:58 (3 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
25df680
Parents:
39ca297
git-author:
Chris Johns <chrisj@…> (12/06/23 21:13:58)
git-committer:
Chris Johns <chrisj@…> (12/06/23 23:31:59)
Message:

sb: Set the uid and gid on POSIX systems

This improves performance because it avoids an exec each time
the _uid macro is referenced and that can be a number of times
for each config parsed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/options.py

    r39ca297 r5e4b3b9  
    4747# Save the host and POSIX state.
    4848#
    49 host_windows = False
     49host_windows = os.name == 'nt'
    5050host_posix = True
    5151
     
    104104                                                         'none',
    105105                                                         self._long_opts[lo][3])
     106        # Set the _uid field, performance improvement on Unix
     107        if not host_windows:
     108            self.defaults['_uid'] = str(os.getuid())
     109            self.defaults['_gid'] = str(os.getgid())
    106110
    107111    def __str__(self):
Note: See TracChangeset for help on using the changeset viewer.