1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

dnf: add /usr/bin/dnf symlink that points to /usr/bin/dnf-2

All documentation refers to dnf binary as 'dnf' yet make install
does not create one - it's done by Fedora's spec file when building
the rpm. Let's replicate this behavior.

(From OE-Core rev: 456c4a8ffc9a292d7a3e036d92baf4a8f14d1f45)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2017-03-16 15:19:07 +02:00
committed by Richard Purdie
parent fd04d16568
commit aa66e8782e
3 changed files with 11 additions and 3 deletions
+9 -1
View File
@@ -30,9 +30,17 @@ EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
BBCLASSEXTEND = "native nativesdk"
RDEPENDS_${PN}_class-target += "python-core python-codecs python-netclient python-email python-threading python-distutils librepo python-shell python-subprocess libcomps libdnf python-sqlite3 python-compression python-pygpgme python-backports-lzma python-rpm python-iniparse python-json python-importlib python-curses python-argparse"
# Create a symlink called 'dnf' as 'make install' does not do it, but
# .spec file in dnf source tree does (and then Fedora and dnf documentation
# says that dnf binary is plain 'dnf').
do_install_append() {
ln -s -r ${D}/${bindir}/dnf-2 ${D}/${bindir}/dnf
ln -s -r ${D}/${bindir}/dnf-automatic-2 ${D}/${bindir}/dnf-automatic
}
# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
do_install_append_class-native() {
create_wrapper ${D}/${bindir}/dnf-2 \
create_wrapper ${D}/${bindir}/dnf \
RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
RPM_NO_CHROOT_FOR_SCRIPTS=1
}