summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2018-03-29 14:19:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-30 00:31:18 +0100
commit4ab3e6f1a1fa936aefe7522228aa1ee0e7567623 (patch)
tree10afac85d889c4a8c1afd60db59c8bfc6f167f4b /scripts
parent0cbc20c6ced8520b7f08d5e524a25ae222a3dda2 (diff)
downloadpoky-4ab3e6f1a1fa936aefe7522228aa1ee0e7567623.tar.gz
scripts/oe-setup-rpmrepo: remove the script
After we switched to RSS, this script was not working for a long time. 'bitbake package-index' can do the same thing and works well. So remove this script. (From OE-Core rev: 94fea92f5e7f7c0765e89743a1586b22186a16cd) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-setup-rpmrepo103
1 files changed, 0 insertions, 103 deletions
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
deleted file mode 100755
index df1c61435c..0000000000
--- a/scripts/oe-setup-rpmrepo
+++ /dev/null
@@ -1,103 +0,0 @@
1#!/bin/bash
2#
3# This utility setup the necessary metadata for an rpm repo
4#
5# Copyright (c) 2011 Intel Corp.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 2 as
9# published by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14# See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20
21# Don't use TMPDIR from the external environment, it may be a distro
22# variable pointing to /tmp (e.g. within X on OpenSUSE)
23# Instead, use OE_TMPDIR for passing this in externally.
24TMPDIR="$OE_TMPDIR"
25
26setup_tmpdir() {
27 if [ -z "$TMPDIR" ]; then
28 # Try to get TMPDIR from bitbake
29 type -P bitbake &>/dev/null || {
30 echo "In order for this script to dynamically infer paths";
31 echo "to kernels or filesystem images, you either need";
32 echo "bitbake in your PATH or to source oe-init-build-env";
33 echo "before running this script" >&2;
34 exit 1; }
35
36 # We have bitbake in PATH, get TMPDIR from bitbake
37 TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
38 if [ -z "$TMPDIR" ]; then
39 echo "Error: this script needs to be run from your build directory,"
40 echo "or you need to explicitly set TMPDIR in your environment"
41 exit 1
42 fi
43 fi
44}
45
46setup_tmpdir
47
48function usage() {
49 echo 'Usage: oe-setup-rpmrepo rpm-dir'
50 echo ''
51 echo 'OpenEmbedded setup-rpmrepo - setup rpm repository'
52 echo ''
53 echo 'arguments:'
54 echo " rpm-dir rpm repo directory, default is $TMPDIR/deploy/rpm"
55 echo ''
56}
57
58if [ $# -gt 1 -o "$1" = '--help' -o "$1" = '-h' ]; then
59 usage
60 exit 2
61fi
62
63setup_sysroot() {
64 # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
65 # environment script. If that variable isn't set, we're
66 # either in an in-tree poky scenario or the environment
67 # script wasn't source'd.
68 if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
69 setup_tmpdir
70 BUILD_ARCH=`uname -m`
71 BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
72 BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
73
74 OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
75 fi
76}
77
78setup_sysroot
79
80
81if [ -n "$1" ]; then
82 RPM_DIR="$1"
83else
84 RPM_DIR="$TMPDIR/deploy/rpm"
85fi
86
87if [ ! -d "$RPM_DIR" ]; then
88 echo "Error: rpm dir $RPM_DIR doesn't exist"
89 exit 1
90fi
91
92CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
93if [ ! -e "$CREATEREPO" ]; then
94 echo "Error: can't find createrepo binary"
95 echo "please run bitbake createrepo-native first"
96 exit 1
97fi
98
99export PATH=${PATH}:${OECORE_NATIVE_SYSROOT}/usr/bin
100
101$CREATEREPO "$RPM_DIR"
102
103exit 0