No lien under § 34-28-1, 34-28-2 or 34-28-3 shall attach to any building, canal, turnpike, railroad, or other improvement, if the improvement is being constructed, erected, altered, or repaired by or for the state, or any city or town, or any subdivision or agency thereof, or to any land upon which the improvement exists, if the land is owned by the state or any city or town, or any subdivision or agency thereof, but the provisions of § 34-28-30 shall apply to buildings, canals, turnpikes, railroads, or other improvements being so constructed, erected, altered, or repaired.
R.I. Gen. Laws § 34-28-31