cmp will always delete unneeded samples (which consist of whole machines) and then - running a 2nd NEW SCAN instance - will complain those previously unneeded sets are now missing.
Copying the parent sample into its clone sample will again then lead to unneeded.
$ cp samples/moepro90.zip samples/nes_jf29.zip
Example: nes_jf29 VS moepro90
http://adb.arcadeitalia.net/?mame=nes_jf29NES Cart Bandai BT-554 PCB [folder: nes_bandai_pt554 - sampleparent: ftaerobi - size: 0]
missing device: NES Cart Bandai BT-554 PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
missing sample: 06
missing sample: 07
NES Cart Jaleco JF-13 PCB [folder: nes_jf13 - sampleparent: moepro - size: 0]
missing device: NES Cart Jaleco JF-13 PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
missing sample: 06
missing sample: 07
missing sample: 08
missing sample: 09
missing sample: 10
missing sample: 11
missing sample: 12
missing sample: 13
missing sample: 14
missing sample: 15
NES Cart Jaleco JF-19 + ADPCM (Moero!! Pro Yakyuu 88) PCB [folder: nes_jf19_pcm - sampleparent: moepro88 - size: 0]
missing device: NES Cart Jaleco JF-19 + ADPCM (Moero!! Pro Yakyuu 88) PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
missing sample: 06
missing sample: 07
missing sample: 08
missing sample: 09
missing sample: 10
missing sample: 11
missing sample: 12
missing sample: 13
missing sample: 14
missing sample: 15
missing sample: 16
missing sample: 17
missing sample: 18
missing sample: 19
NES Cart Jaleco JF-23 (Shin Moero Pro Yakyuu) PCB [folder: nes_jf23 - sampleparent: smoepro - size: 0]
missing device: NES Cart Jaleco JF-23 (Shin Moero Pro Yakyuu) PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
missing sample: 06
missing sample: 07
missing sample: 08
missing sample: 09
missing sample: 10
missing sample: 11
missing sample: 12
missing sample: 13
missing sample: 14
missing sample: 15
missing sample: 16
missing sample: 17
missing sample: 18
missing sample: 19
NES Cart Jaleco JF-24 (Terao no Dosukoi Oozumou) PCB [folder: nes_jf24 - sampleparent: terao - size: 0]
missing device: NES Cart Jaleco JF-24 (Terao no Dosukoi Oozumou) PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
NES Cart Jaleco JF-29 (Moe Pro! '90) PCB [folder: nes_jf29 - sampleparent: moepro90 - size: 0]
missing device: NES Cart Jaleco JF-29 (Moe Pro! '90) PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
missing sample: 06
missing sample: 07
missing sample: 08
missing sample: 09
missing sample: 10
missing sample: 11
missing sample: 12
missing sample: 13
missing sample: 14
missing sample: 15
missing sample: 16
missing sample: 17
missing sample: 18
missing sample: 19
NES Cart Jaleco JF-33 (Moe Pro! Saikyou-hen) PCB [folder: nes_jf33 - sampleparent: mpsaikyo - size: 0]
missing device: NES Cart Jaleco JF-33 (Moe Pro! Saikyou-hen) PCB
missing sample: 00
missing sample: 01
missing sample: 02
missing sample: 03
missing sample: 04
missing sample: 05
missing sample: 06
missing sample: 07
missing sample: 08
missing sample: 09
missing sample: 10
missing sample: 11
missing sample: 12
missing sample: 13
missing sample: 14
missing sample: 15
missing sample: 16
missing sample: 17
missing sample: 18
missing sample: 19
Another example:
<machine name="nes_bandai_pt554" sourcefile="src/devices/bus/nes/pt554.cpp" isdevice="yes" runnable="no" sampleof="ftaerobi">
<description>NES Cart Bandai BT-554 PCB</description>
<device_ref name="speaker"/>
<device_ref name="samples"/>
<sample name="00"/>
<sample name="01"/>
<sample name="02"/>
<sample name="03"/>
<sample name="04"/>
<sample name="05"/>
<sample name="06"/>
<sample name="07"/>
<chip type="audio" tag=":addon" name="Speaker"/>
<chip type="audio" tag=":samples" name="Samples"/>
<sound channels="1"/>
</machine>