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

Re: debconf question



On 2004-07-13 Adrian 'Dagurashibanipal' von Bidder <avbidder@fortytwo.ch> wrote:
> [Madduck cc:ed as he is my sponsor - but he tells me he's certainly not 
> a debconf expert]

> How do I display a debconf note only on upgrades from versions older 
> than x to x or newer? No need to annoy all users...
[...]

debconf-devel(7)
| Like the postinst, the config script is passed two parameters when
| it is run. The first tells what action is being performed, and the
| second is the version of the package that is currently installed.
| So, like in a postinst, you can use dpkg ‐‐compare‐versions
| on $2 to make some behavior happen only on upgrade from a
| particular version of a package, and things like that.

if dpkg --compare-versions "$2" lt-nl "27-0.5" ; then
...
fi
             done
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"



Reply to: