Extract method for generating lines for a pkg in nsp. Fixes issue in 67bdf3a726962 where only the last dat would be written.