1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00
Files
poky/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc
T
Dexuan Cui 23773a899b deb packages support: switch from /var/dpkg to /var/lib/dpkg
[YOCTO #1086]

The pach was backported from OE:
http://git.openembedded.net/cgit.cgi/openembedded/commit/?id=41e0fbf792037f249d1b8d283b3de81718887c9f

(From OE-Core rev: d1e6f49a6473df3c626100ba01b27485f735c33b)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21 13:42:49 +01:00

44 lines
1.4 KiB
PHP

SUMMARY = "Manage alternatives"
DESCRIPTION = "update-alternatives creates, removes, maintains and displays information about the symbolic links \
comprising the Debian alternatives system. The Debian alternatives system attempts solve the problem of several \
programs fulfilling the same or similar functions and how they can be installed onto a single system at the same \
time."
LICENSE = "GPL"
SECTION = "base"
SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2"
S = "${WORKDIR}/dpkg-${PV}"
PACKAGE_ARCH = "all"
INC_PR = "r3"
inherit gettext
do_patch () {
cat ${S}/scripts/update-alternatives.pl | \
sed -n -e '
/^\$admindir=.*staging/{
x
s/^.*$/$D=$ENV{"D"} || ""\;/;
p;
x;
s,^\$admindir=.*staging.*$,$admindir="$D${localstatedir}/lib/dpkg"\;,;
};
s,^\$altdir=.*$,$altdir="$D${sysconfdir}/alternatives"\;,;
p;' > ${S}/scripts/update-alternatives
}
do_install () {
install -d ${D}${sbindir} \
${D}${localstatedir}/lib/dpkg/alternatives \
${D}${sysconfdir}/alternatives
install -m 0755 scripts/update-alternatives ${D}${sbindir}/update-alternatives
}
PROVIDES += "virtual/update-alternatives"
RPROVIDES_${PN} += "update-alternatives"
EXTRA_RDEPENDS = "perl dpkg"
EXTRA_RDEPENDS_virtclass-native = ""
RDEPENDS_${PN} += "${EXTRA_RDEPENDS}"
BBCLASSEXTEND = "native"