Add debug logging for directory filtering in make_rpm_ubuntu26.py
- Added logging at root, Lts, and Lts/Proxies levels to trace filtering - Helps diagnose why TrainingAreaBase is not being copied Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
343 files changed
+52718
-1634
No files matched your search
@@ -109,6 +109,7 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea
|
||||
'TetraIF',
|
||||
'Z/src',
|
||||
'Lts/Common',
|
||||
'Lts/Proxies/TrainingAreaBase', # Required for training_area_telegrams.h used by TetraIF
|
||||
'CMakeLists.txt',
|
||||
'cmake',
|
||||
'tests',
|
||||
@@ -134,13 +135,31 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea
|
||||
rel_root = os.path.relpath(root, srcdir)
|
||||
if rel_root == '.':
|
||||
# At root level, only keep release scope directories
|
||||
dirs[:] = [d for d in dirs if d in release_items or any(d == item.split('/')[0] for item in release_items if '/' in item)]
|
||||
# Need to handle multi-level paths like 'Lts/Proxies/TrainingAreaBase'
|
||||
def should_keep_dir(d):
|
||||
# Check if directory is directly in release_items
|
||||
if d in release_items:
|
||||
return True
|
||||
# Check if directory is the first part of a multi-level release item
|
||||
for item in release_items:
|
||||
if '/' in item:
|
||||
first_part = item.split('/')[0]
|
||||
if d == first_part:
|
||||
return True
|
||||
return False
|
||||
dirs[:] = [d for d in dirs if should_keep_dir(d)]
|
||||
elif rel_root == 'Z':
|
||||
# In Z directory, only keep src
|
||||
dirs[:] = [d for d in dirs if d == 'src']
|
||||
elif rel_root == 'Lts':
|
||||
# In Lts directory, only keep Common
|
||||
dirs[:] = [d for d in dirs if d == 'Common']
|
||||
# In Lts directory, only keep Common and Proxies (for TrainingAreaBase)
|
||||
dirs[:] = [d for d in dirs if d in ('Common', 'Proxies')]
|
||||
elif rel_root == 'Lts/Proxies':
|
||||
# In Lts/Proxies, only keep TrainingAreaBase
|
||||
dirs[:] = [d for d in dirs if d == 'TrainingAreaBase']
|
||||
elif rel_root.startswith('Lts/Proxies/TrainingAreaBase'):
|
||||
# Keep all subdirectories under TrainingAreaBase (DDS code wrapped in conditionals)
|
||||
pass
|
||||
elif rel_root.startswith('Lts/Common'):
|
||||
# Keep all subdirectories under Lts/Common except LtsUtilsGuiDds (requires DDS)
|
||||
if rel_root == 'Lts/Common/LtsUtils/LtsUtilsGui':
|
||||
|
||||
Reference in new issue
Block a user