computer-janitor already attempts to detect and report the dpkg lock.
Could you tell me in which order you started c-j and synaptic? Did
synaptic run first? Did you do something in synaptic while running c-j?
Did you run the GUI version of c-j or the command line version?
--
computer-janitor give
Public bug reported:
Binary package hint: computer-janitor
When I run computer-janitor at the same time as synaptic, Computer
Janitor says:
Could not clean up properly
E:Sub-process /usr/bin/dpkg returned an error code (2)
Instead, it should say something more useful that indicates the cause of