%end %packages only when it is defined.

Bug: 957011
Change-Id: Id1b58b882109a204056cb71da4e907eec072c74f
Merge "%end %packages only when it is defined." into release-0.13