A masala that has been open on the shelf above the stove for six months is mostly dust. The volatile oils that carry the smell oxidise with heat and light.
Small jars, filled full
Buy the size you will finish in two or three months. A jar that is half air is half oxidised. Our 100 g tins are sized for a family cooking dal three or four times a week.
Keep it dark and cool
A cupboard away from the stove is better than a pretty jar next to it. Glass is fine if the cupboard is dark; a tin is better if it is not.
Smell before you cook
Rub a pinch between your fingers. If it smells flat, it will taste flat. Replenish rather than doubling the quantity.