Commit 1398b88
committed
CMakeLists.txt add install command to work on
> catkin config --install
> catkin build -vi --summarize
we checked that necessary files are installed
```
(export ROS_PACKAGE_PATH=$(pwd)/src; for dir in install/share/*; do pkg=$(basename $dir); echo -e "\n\n$pkg"; echo diff -r install/share/$pkg $(rospack find $pkg) --exclude CMakeLists.txt --exclude .gitignore --exclude setup.py --exclude README.md --exclude CHANGELOG.rst --exclude cmake ; ./check.py $(basename $dir); done > diff.dir)
```
where `check.py` is
```
import sys
import os
import copy
import filecmp
import rospkg
def compare_directories(install_dir, src_dir, ignore=None):
# Initialize dictionaries to store results
results = {
'unique_to_dir1': [],
'unique_to_dir2': [],
'differences': [],
'common_files': []
}
# Recursively compare directory structures and files
comparison = filecmp.dircmp(install_dir, src_dir, ignore=ignore)
# Files only in dir1
results['unique_to_dir1'] = comparison.left_only
# Files only in dir2
results['unique_to_dir2'] = comparison.right_only
# Files present in both directories but different
results['differences'] = comparison.diff_files
# Files that are identical in both directories
results['common_files'] = comparison.same_files
return results
def list_all_subdirectories(root_dir):
subdirectories = []
for dirpath, dirnames, _ in os.walk(root_dir):
for dirname in dirnames:
subdirectories.append(os.path.join(dirpath, dirname))
return subdirectories
if __name__ == '__main__':
rospack = rospkg.RosPack()
pkg_name = sys.argv[1]
pkg_path = rospack.get_path(pkg_name)
print("## Check [{}]".format(pkg_name))
for dir in ['.'] + [os.path.relpath(dir, pkg_path) for dir in list_all_subdirectories(pkg_path)]:
install_dir = os.path.join('install/share/', pkg_name, dir)
src_dir = os.path.join(pkg_path, dir)
if os.path.exists(install_dir):
differences = compare_directories(install_dir, src_dir,
ignore=['env-hooks', 'cmake', '.gitignore', 'CMakeLists.txt', 'CHANGELOG.rst', 'README.md', 'setup.py'])
else:
print('> Only in {}'.format(src_dir))
continue
# Display the results
for file in differences['unique_to_dir1']:
print("> Files only in directory 1: {}".format([os.path.join(dir, file)]))
for file in copy.copy(differences['unique_to_dir2']):
if os.path.exists(os.path.join('install/lib/', pkg_name, file)):
differences['unique_to_dir2'].remove(file)
for file in differences['unique_to_dir2']:
print("> Files only in directory 2: {}".format([os.path.join(dir, file)]))
for file in differences['differences']:
print("> Different files: {}".format([os.path.join(dir, file)]))
#print("Common files (identical):", differences['common_files'])
```
```1 parent 25dd087 commit 1398b88
27 files changed
Lines changed: 155 additions & 27 deletions
File tree
- jsk_aero_robot
- aeroeus
- jsk_aero_startup
- jsk_baxter_robot
- baxtereus
- jsk_baxter_startup
- jsk_baxter_web
- jsk_denso_robot
- cobottaeus
- jsk_cobotta_startup
- jsk_fetch_robot
- jsk_fetch_gazebo_demo
- jsk_fetch_startup
- jsk_kinova_robot
- jsk_kinova_startup
- kinovaeus
- jsk_magni_robot/jsk_magni_startup
- jsk_naoqi_robot
- jsk_nao_startup
- jsk_pepper_startup
- naoeus
- peppereus
- jsk_pr2_robot
- jsk_pr2_calibration
- jsk_pr2_startup
- pr2_base_trajectory_action
- jsk_robot_common
- jsk_robot_startup
- jsk_robot_utils
- speak_and_wait_recovery
- update_move_base_parameter_recovery
- jsk_unitree_robot
- jsk_unitree_startup
- unitreeeus
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments