libopkg: pass PKG_UPGRADE variable to package scripts
authorJo-Philipp Wich <jo@mein.io>
Fri, 10 Feb 2017 09:31:55 +0000 (10:31 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 10 Feb 2017 09:33:29 +0000 (10:33 +0100)
commit9ecd49641e53ae5353e2b355d7828de30b463dba
treef5fdc1aed93172b8219adf7434d9110f4f1734b0
parenta2afaf0b997f88422e07f622ba2bec3f5786e4de
libopkg: pass PKG_UPGRADE variable to package scripts

When installing or upgrading packages, pass an PKG_UPGRADE environment
variable to maintainer scripts to allow the to perform different actions
depending on whether a package is freshly installed or upgraded.

During installs the PKG_UPGRADE variable will be set to 0 and during
upgrades to 1.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/opkg_install.c
libopkg/pkg.c
libopkg/pkg.h