[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Specifying %{variable} in control file for use in postinst?



So here is the use case, one that to my knowledge rpm or deb do not
provide much guidance for and deb does not provide control fields for:
Package is a vehicle for installing software that can create multiple
instances. Further, those instances can be very long lived (decades)
and almost certainly will be updated and migrated in the future to new
hardware and software. Finally that in the case of a catastrophic
failure, the metadata of the rpm/deb file such as name of the rpm/deb
file and versions that created it are barcoded redundantly with the
instance in an a instance env file that rides within the instance
directory tree in a known location in order to facilitate recovery and
maintenance (this last part is already worked out).

rpm because it can access the spec file header information this is
pretty easy to do. For deb this looks like I am going to have to parse
the control file to get this information out. Is there any bash
control file parsers out there?

-- IV

On Fri, Apr 30, 2010 at 12:58 PM, Boyd Stephen Smith Jr.
<bss@iguanasuicide.net> wrote:
> On Friday 30 April 2010 11:12:57 Ignacio Valdes wrote:
>> So I am gathering that whereas it is repugnant to the dpkg design
>> scheme to do it, but for the sake of rpm reconciliation the thread
>> subject question: accessing control file values in postinst is not
>> simple to do other than with major changes like sed pre-processing and
>> such?
>
> I wouldn't say it is "repugnant", but the postinst scripts should generally be
> able to be run independently of even having the control fields available.
>
> I also wouldn't say that sed pre-processing at .deb build time is a "major
> change".
>
>> Is that the situation?
>
> Yes, dpkg does not (currently) expose the control fields in the environment
> that the {pre,post}{inst,rm} scripts are run.


Reply to: