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 # Attempt to initialize a rpmdb
21 AT_SETUP([rpm --initdb])
23 DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'`
24 rm -rf "${abs_builddir}"/testing"${DBPATH}"/*
27 --root="${abs_builddir}"/testing \
34 # Run rpm -qa on an empty rpmdb
37 DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'`
38 rm -rf "${abs_builddir}"/testing"${DBPATH}"/*
41 --root="${abs_builddir}"/testing \
45 --root="${abs_builddir}"/testing \
54 # install a package into a local rpmdb without --relocate and --nodeps
55 # * Must fail due to missing deps
56 # * Use --ignorearch because we don't know the arch
57 AT_SETUP([rpm -i *.i386.rpm])
59 DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'`
60 rm -rf "${abs_builddir}"/testing"${DBPATH}"/*
64 --root="${abs_builddir}"/testing \
67 [0],[ignore],[ignore])
72 --root="${abs_builddir}"/testing \
74 "${abs_srcdir}"/data/RPMS/hello-1.0-1.i386.rpm
78 [error: Failed dependencies:
79 /bin/sh is needed by hello-1.0-1.i386
80 libc.so.6 is needed by hello-1.0-1.i386
81 libc.so.6(GLIBC_2.0) is needed by hello-1.0-1.i386
82 rtld(GNU_HASH) is needed by hello-1.0-1.i386
88 # install a package into a local rpmdb
89 # * Shall only work with relocation
90 # * Use --ignorearch because we don't know the arch
91 AT_SETUP([rpm -i --relocate=.. *.i386.rpm])
93 DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'`
94 rm -rf "${abs_builddir}"/testing"${DBPATH}"/*
98 --root="${abs_builddir}"/testing \
101 [0],[ignore],[ignore])
106 --root="${abs_builddir}"/testing \
107 --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing \
108 "${abs_srcdir}"/data/RPMS/hello-1.0-1.i386.rpm
117 # install a package into a local rpmdb
118 # * Shall only work with relocation
119 # * Use --ignorearch because we don't know the arch
120 AT_SETUP([rpm -i --relocate=.. *.ppc64.rpm])
122 DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'`
123 rm -rf "${abs_builddir}"/testing"${DBPATH}"/*
127 --root="${abs_builddir}"/testing \
130 [0],[ignore],[ignore])
135 --root="${abs_builddir}"/testing \
136 --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing \
137 "${abs_srcdir}"/data/RPMS/hello-1.0-1.ppc64.rpm