I see it as a missing feature.
That is if I am right. I have not tested my theory. It is just what I expect from the bits of knowledge I have.
I do not have PascalScada installed.
1)
Are the 2 packages .lpk files in different folders (maybe, one in a subfolder of the other?), or in the same folder?
2)
Can you check in the package options dialog: Compiler Options / Paths
The entry for "Unit output directory (-FU)" for each package, does it (once fully resolved) point to the same directory?
Here is my theory again
Packages P1 and P2 both store their ppu in c:\common\
P1 has a unit foo.
P1 is compiled first.
Now c:\common\foo.ppu exists.
When P2 is compiled, it does see foo.ppu in its output path. But P2 does not have foo.pas. So P2 thinks the unit's ppu is abandoned.
Also when checking for duplicates, the IDE goes (afaik) through each package's output dir, and gets all ppu.
So the IDE checks c:\common\ for P1.
Then the IDE checks c:\common\ for P2 => duplicate ppu are found.
However this may depend on the order of compilation.
- My GUESS is, that before compiling a package, the output of each required other package is checked, and compared to the pas files of the current unit.
=> If you re-build, without cleaning, and maybe only then, the output of P1 contains all the ppu of P2. So when P2 rebuilds, it does see its own ppu, but believes they belong to P1.