diff options
| author | Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org> | 2015-04-10 15:15:29 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-13 22:33:22 +0100 |
| commit | eb6d324d60726e9014e640b92aaa188273a92032 (patch) | |
| tree | d2a2613e6b28e801bb44269c0f9124796259d6fd | |
| parent | 23a88e24f07608d53726a3ed37ad356a088d8c77 (diff) | |
| download | poky-eb6d324d60726e9014e640b92aaa188273a92032.tar.gz | |
package_manager: RpmPM: Fix scriptlet for rpm 4
Path of rpm post install script is different between rpm 4 and 5
(From OE-Core rev: a880669f767532ce3c39eb160fa9deb9fce29677)
Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oe/package_manager.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index ed0c9a7d3d..0460415699 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
| @@ -937,8 +937,10 @@ class RpmPM(PackageManager): | |||
| 937 | # | 937 | # |
| 938 | if self.rpm_version == 4: | 938 | if self.rpm_version == 4: |
| 939 | scriptletcmd = "$2 $3 $4\n" | 939 | scriptletcmd = "$2 $3 $4\n" |
| 940 | scriptpath = "$3" | ||
| 940 | else: | 941 | else: |
| 941 | scriptletcmd = "$2 $1/$3 $4\n" | 942 | scriptletcmd = "$2 $1/$3 $4\n" |
| 943 | scriptpath = "$1/$3" | ||
| 942 | 944 | ||
| 943 | SCRIPTLET_FORMAT = "#!/bin/bash\n" \ | 945 | SCRIPTLET_FORMAT = "#!/bin/bash\n" \ |
| 944 | "\n" \ | 946 | "\n" \ |
| @@ -956,10 +958,10 @@ class RpmPM(PackageManager): | |||
| 956 | " mkdir -p $1/etc/rpm-postinsts\n" \ | 958 | " mkdir -p $1/etc/rpm-postinsts\n" \ |
| 957 | " num=100\n" \ | 959 | " num=100\n" \ |
| 958 | " while [ -e $1/etc/rpm-postinsts/${num}-* ]; do num=$((num + 1)); done\n" \ | 960 | " while [ -e $1/etc/rpm-postinsts/${num}-* ]; do num=$((num + 1)); done\n" \ |
| 959 | " name=`head -1 $1/$3 | cut -d\' \' -f 2`\n" \ | 961 | " name=`head -1 " + scriptpath + " | cut -d\' \' -f 2`\n" \ |
| 960 | ' echo "#!$2" > $1/etc/rpm-postinsts/${num}-${name}\n' \ | 962 | ' echo "#!$2" > $1/etc/rpm-postinsts/${num}-${name}\n' \ |
| 961 | ' echo "# Arg: $4" >> $1/etc/rpm-postinsts/${num}-${name}\n' \ | 963 | ' echo "# Arg: $4" >> $1/etc/rpm-postinsts/${num}-${name}\n' \ |
| 962 | " cat $1/$3 >> $1/etc/rpm-postinsts/${num}-${name}\n" \ | 964 | " cat " + scriptpath + " >> $1/etc/rpm-postinsts/${num}-${name}\n" \ |
| 963 | " chmod +x $1/etc/rpm-postinsts/${num}-${name}\n" \ | 965 | " chmod +x $1/etc/rpm-postinsts/${num}-${name}\n" \ |
| 964 | " else\n" \ | 966 | " else\n" \ |
| 965 | ' echo "Error: pre/post remove scriptlet failed"\n' \ | 967 | ' echo "Error: pre/post remove scriptlet failed"\n' \ |
