Six hours of last-ditch negotiations have yielded a tentative agreement for the Port of Portland and a Longshore union that represents security guards at some marine terminals. This averts a strike that was scheduled to bring work to a halt Sunday.