1 # rpmdb.at: test rpmdb access
3 # Copyright (C) 2007 Ralf Corsépius <corsepiu@fedoraproject.org>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 # ------------------------------
21 # Attempt to initialize a rpmdb
22 AT_SETUP([rpm --initdb])
31 # ------------------------------
32 # Run rpm -qa on an empty rpmdb
38 --root="${abs_builddir}"/testing \
47 # ------------------------------
48 # install a package into a local rpmdb without --relocate and --nodeps
49 # * Must fail due to missing deps
50 # * Use --ignorearch because we don't know the arch
51 AT_SETUP([rpm -i *.i386.rpm])
55 [0],[ignore],[ignore])
60 --root="${abs_builddir}"/testing \
62 "${abs_srcdir}"/data/RPMS/hello-1.0-1.i386.rpm
66 [error: Failed dependencies:
67 /bin/sh is needed by hello-1.0-1.i386
68 libc.so.6 is needed by hello-1.0-1.i386
69 libc.so.6(GLIBC_2.0) is needed by hello-1.0-1.i386
70 rtld(GNU_HASH) is needed by hello-1.0-1.i386
76 # ------------------------------
77 # install a package into a local rpmdb
78 # * Shall only work with relocation
79 # * Use --ignorearch because we don't know the arch
80 AT_SETUP([rpm -i --relocate=.. *.i386.rpm])
84 [0],[ignore],[ignore])
89 --root="${abs_builddir}"/testing \
90 --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing/check \
91 "${abs_srcdir}"/data/RPMS/hello-1.0-1.i386.rpm
100 # ------------------------------
101 # install a package into a local rpmdb
102 # * Shall only work with relocation
103 # * Use --ignorearch because we don't know the arch
104 AT_SETUP([rpm -i --relocate=.. *.ppc64.rpm])
108 [0],[ignore],[ignore])
113 --root="${abs_builddir}"/testing \
114 --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing/check \
115 "${abs_srcdir}"/data/RPMS/hello-1.0-1.ppc64.rpm