Very good. This is what you learn in 1st year grad school. But that is not the way things work in practice.
China, for example, has growth rates at constant prices processed by either one of two methods: price index deflation method or volume index extrapolation method based upon convenience in each sector or industry. The single deflation gives the value added at constant prices of agriculture, forestry, animal husbandry and fishing, industry, construction, information transmission, computer service, software, wholesale and retail trade, financial intermediation, real estate and leasing services; while the value index extrapolation method calculates constant prices for transport, storage, freight, power and post among others.
There are two reasons for adopting single deflation. One is in China, no product price system exists which can reflect all production results; and moreover, there is a lack of a pricing index which can reflect an intermediate situation of inputs and economic activity. On the other hand, the extrapolation method is not purely production based either, but combines both income and production approach.
In theory, the appropriate price index is the weighted mean of indeces for goods and service prices. But in fact, this ideal situation does not exist at all. For this reason, we have to combine the relative price index and complement some price info. to arrive at an industry specific deflation index in the calculation of GDP at constant prices. This is where Chinese fudging comes in.