diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-14 17:43:45 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-15 12:05:26 +0000 |
commit | 6c508124a1aa7a963f7c5cc627ef31b51927132c (patch) | |
tree | 08eeb6e44a1bbba1fe93f11ce06d1fa38687f8f1 /meta/recipes-devtools | |
parent | d3c950e62254d5f1be0d591d858bde9a37dfabf3 (diff) | |
download | poky-6c508124a1aa7a963f7c5cc627ef31b51927132c.tar.gz |
dpkg/update-alternatives: Fix dpkg version of update-alternatives to be usable
The version of dpkg the updates-alternatives-dpkg recipe pointed
at no longer used a perl script but a compiled binary. This meant
the "all" architecture field was invalid, as as the sed operation
during do_patch. All things considered the separate recipe was
pretty pointless.
This patch moves update-alternatives back to being built as part
of the dpkg recipe. It also moves various functionalty to the .inc
file which it belongs and fixes building and packaging of the dpkg
perl modules.
(From OE-Core rev: fad496c759066d53bebf9b8cebc63e6478c91d19)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
5 files changed, 57 insertions, 70 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc index 8c2511dc43..a8486d9359 100644 --- a/meta/recipes-devtools/dpkg/dpkg.inc +++ b/meta/recipes-devtools/dpkg/dpkg.inc | |||
@@ -2,7 +2,7 @@ DESCRIPTION = "Package maintenance system for Debian." | |||
2 | LICENSE = "GPL" | 2 | LICENSE = "GPL" |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | 4 | ||
5 | INC_PR = "r5" | 5 | INC_PR = "r10" |
6 | 6 | ||
7 | SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \ | 7 | SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \ |
8 | file://ignore_extra_fields.patch" | 8 | file://ignore_extra_fields.patch" |
@@ -18,8 +18,24 @@ PARALLEL_MAKE = "" | |||
18 | 18 | ||
19 | inherit autotools gettext perlnative | 19 | inherit autotools gettext perlnative |
20 | 20 | ||
21 | DPKG_INIT_POSITION = "98" | 21 | export PERL_LIBDIR = "${libdir}/perl" |
22 | 22 | ||
23 | EXTRA_OECONF = "--without-static-progs \ | ||
24 | --without-dselect \ | ||
25 | --with-start-stop-daemon \ | ||
26 | --with-zlib \ | ||
27 | --with-bz2lib \ | ||
28 | --without-selinux \ | ||
29 | --without-sgml-doc" | ||
30 | |||
31 | do_configure () { | ||
32 | echo >> m4/compiler.m4 | ||
33 | sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure | ||
34 | autotools_do_configure | ||
35 | } | ||
36 | |||
37 | |||
38 | DPKG_INIT_POSITION ?= "98" | ||
23 | do_install_prepend () { | 39 | do_install_prepend () { |
24 | install -d ${D}/${sysconfdir}/rcS.d | 40 | install -d ${D}/${sysconfdir}/rcS.d |
25 | # this happens at S98 where our good 'ole packages script used to run | 41 | # this happens at S98 where our good 'ole packages script used to run |
@@ -30,7 +46,19 @@ rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure | |||
30 | chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure | 46 | chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure |
31 | } | 47 | } |
32 | 48 | ||
33 | do_configure () { | 49 | do_install_append () { |
34 | echo >> m4/compiler.m4 | 50 | mv ${D}${bindir}/update-alternatives ${D}${sbindir} |
35 | autotools_do_configure | ||
36 | } | 51 | } |
52 | |||
53 | PROVIDES += "virtual/update-alternatives" | ||
54 | |||
55 | PACKAGES =+ "update-alternatives-dpkg" | ||
56 | FILES_update-alternatives-dpkg = "${sbindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" | ||
57 | RPROVIDES_update-alternatives-dpkg += "update-alternatives" | ||
58 | |||
59 | PACKAGES += "${PN}-perl" | ||
60 | FILES_${PN}-perl = "${libdir}/perl" | ||
61 | |||
62 | BBCLASSEXTEND = "native" | ||
63 | |||
64 | |||
diff --git a/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch b/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch new file mode 100644 index 0000000000..45973f012d --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | We want to be able to set PERL_LIBDIR from the environment. This | ||
2 | hardcoded assignment prevents us from doing so and obtains an | ||
3 | incorrect value. | ||
4 | |||
5 | Upstream-Status: Inappropriate [in this form at least] | ||
6 | |||
7 | RP 14/11/2011 | ||
8 | |||
9 | Index: dpkg-1.15.8.7/m4/dpkg-progs.m4 | ||
10 | =================================================================== | ||
11 | --- dpkg-1.15.8.7.orig/m4/dpkg-progs.m4 2011-11-14 17:32:21.252053239 +0000 | ||
12 | +++ dpkg-1.15.8.7/m4/dpkg-progs.m4 2011-11-14 17:32:55.180052455 +0000 | ||
13 | @@ -9,9 +9,6 @@ | ||
14 | [AC_ARG_VAR([PERL], [Perl interpreter])dnl | ||
15 | AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])dnl | ||
16 | AC_ARG_VAR([PERL_LIBDIR], [Perl library directory])dnl | ||
17 | -PERL_LIBDIR=$($PERL -MConfig -e 'my $r = $Config{vendorlibexp}; | ||
18 | - $r =~ s/$Config{vendorprefixexp}/\$(prefix)/; | ||
19 | - print $r')dnl | ||
20 | ])# DPKG_PROG_PERL | ||
21 | |||
22 | # DPKG_PROG_PO4A | ||
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb index 99197c0b7f..8b45a00a6a 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.15.8.7.bb | |||
@@ -3,23 +3,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | |||
3 | 3 | ||
4 | SRC_URI += "file://noman.patch \ | 4 | SRC_URI += "file://noman.patch \ |
5 | file://check_snprintf.patch \ | 5 | file://check_snprintf.patch \ |
6 | file://check_version.patch" | 6 | file://check_version.patch \ |
7 | file://perllibdir.patch" | ||
7 | 8 | ||
8 | SRC_URI[md5sum] = "d1731d4147c1ea3b537a4d094519a6dc" | 9 | SRC_URI[md5sum] = "d1731d4147c1ea3b537a4d094519a6dc" |
9 | SRC_URI[sha256sum] = "1ec1376471b04717a4497e5d7a27cd545248c92116898ce0c53ced8ea94267b5" | 10 | SRC_URI[sha256sum] = "1ec1376471b04717a4497e5d7a27cd545248c92116898ce0c53ced8ea94267b5" |
10 | 11 | ||
11 | PR = "${INC_PR}.0" | 12 | PR = "${INC_PR}.0" |
12 | 13 | ||
13 | EXTRA_OECONF = "--without-static-progs \ | ||
14 | --without-dselect \ | ||
15 | --with-start-stop-daemon \ | ||
16 | --with-zlib \ | ||
17 | --with-bz2lib \ | ||
18 | --without-selinux \ | ||
19 | --without-sgml-doc" | ||
20 | |||
21 | BBCLASSEXTEND = "native" | ||
22 | |||
23 | do_install_append () { | ||
24 | rm ${D}${bindir}/update-alternatives | ||
25 | } | ||
diff --git a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc deleted file mode 100644 index c881ae0219..0000000000 --- a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | SUMMARY = "Manage alternatives" | ||
2 | DESCRIPTION = "update-alternatives creates, removes, maintains and displays information about the symbolic links \ | ||
3 | comprising the Debian alternatives system. The Debian alternatives system attempts solve the problem of several \ | ||
4 | programs fulfilling the same or similar functions and how they can be installed onto a single system at the same \ | ||
5 | time." | ||
6 | LICENSE = "GPL" | ||
7 | SECTION = "base" | ||
8 | SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2" | ||
9 | S = "${WORKDIR}/dpkg-${PV}" | ||
10 | PACKAGE_ARCH = "all" | ||
11 | INC_PR = "r3" | ||
12 | |||
13 | inherit gettext | ||
14 | |||
15 | do_patch () { | ||
16 | cat ${S}/scripts/update-alternatives.pl | \ | ||
17 | sed -n -e ' | ||
18 | /^\$admindir=.*staging/{ | ||
19 | x | ||
20 | s/^.*$/$D=$ENV{"D"} || ""\;/; | ||
21 | p; | ||
22 | x; | ||
23 | s,^\$admindir=.*staging.*$,$admindir="$D${localstatedir}/lib/dpkg"\;,; | ||
24 | }; | ||
25 | s,^\$altdir=.*$,$altdir="$D${sysconfdir}/alternatives"\;,; | ||
26 | p;' > ${S}/scripts/update-alternatives | ||
27 | } | ||
28 | |||
29 | do_install () { | ||
30 | install -d ${D}${sbindir} \ | ||
31 | ${D}${localstatedir}/lib/dpkg/alternatives \ | ||
32 | ${D}${sysconfdir}/alternatives | ||
33 | |||
34 | install -m 0755 scripts/update-alternatives ${D}${sbindir}/update-alternatives | ||
35 | } | ||
36 | |||
37 | PROVIDES += "virtual/update-alternatives" | ||
38 | RPROVIDES_${PN} += "update-alternatives" | ||
39 | EXTRA_RDEPENDS = "perl dpkg" | ||
40 | EXTRA_RDEPENDS_virtclass-native = "" | ||
41 | RDEPENDS_${PN} += "${EXTRA_RDEPENDS}" | ||
42 | |||
43 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.16.0.3.bb b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.16.0.3.bb deleted file mode 100644 index f2931773b7..0000000000 --- a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.16.0.3.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | require update-alternatives-dpkg.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | SRC_URI[md5sum] = "0266b06ef9da8278cea008d21e17e5f6" | ||
8 | SRC_URI[sha256sum] = "69669720020e67629d70aa5325e3c20c05cae7a9fc2d8abd442672c7b29e31d3" | ||