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

Re: How to access diversions?



Adam Klein wrote:
> My new version of suidmanager needs to access the diversion information in
> order to operate on the correct files.  How should I go about getting the
> information.  Should I just parse the output of dpkg-divert?

dpkg-divert is just a perl script.  The data is in /var/lib/dpkg/diversions
which should be pretty straightforward for you to parse.

I'm not sure how evil(tm) it would be for you to do this, as it would
break your system should the format of the diversions file change.
Of course if you parse dpkg-divert, it breaks when the output format
of dpkg-divert changes.

hmmmm...


Reply to: