Back in the 60's at the aircraft factory, we painted all al alloy panels in an undercoat before riveting . For military aircraft, we painted, and then all external seams had a jointing compound (can't remember the name , it was yellow and it washed off with soap). If panels had to be "fettled", the bare surfaces were etched with a brown 'acid' called Alachrome? and washed before riveting to the adjoining structure.