item_updater: Ignore duplicate version ids

If the partitions or devices where the BMC images reside are
flashed with the same image file, for example during manufacturing
process, we'd end up with duplicate version ids. Ignore that
version for now and treat it as non-existent. A subsequent code
update would rewrite that partition.

There is a request about being able to support an Accept/Commit
operation which would write the current version to the other
BMC versions, so that for example a system with versions that
contain a security vulnerability can be updated to the fixed
version but also overwrite any other old versions to prevent the
system from booting from an old version. So eventually we'll
add support to show the system with 2 BMC versions that are the
same.

Tested: Flashed an eMMC with the same image on both BMC partitions
        and verified only one d-bus object was created and the
        software updater didn't crash.

Change-Id: I95c5ed968df074ff56da3f80c07a95505fbdf2cd
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed