3 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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; version 2 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 function rpm.importGPGPubKeys
31 for file in "$i"/*; do
32 test -f "$file" || continue
34 pkgs=( "${pkgs[@]}" "$file" )
38 test "$pkgs" || return 0
39 "$_VRPM" "$dst" -- --import "${pkgs[@]}"
42 function rpm.initVariables
44 test "$WORKAROUND_106057" && \
45 RPMDB_PATH=/.rpmdb || \
48 findDir RPMLIBDIR "$CONFDIR/.distributions/$DISTRIBUTION/rpmlib" "$DISTRIBDIR/$DISTRIBUTION/rpmlib" /
51 function rpm.initFilesystem
53 test -z "$WORKAROUND_106057" || mkdir -p "$RPMDB_PATH"
54 mkdir -p "$VDIR$RPMDB_PATH"
56 test -z "$WORKAROUND_APT_DBPATH" || {
57 mkdir -p "$VDIR/var/lib"
58 ln -s "$RPMDB_PATH" "$VDIR/var/lib/rpm"
61 mkdir -p "$PKGCFGDIR"/rpm/{etc,state}
62 populateDirectory "$PKGCFGDIR/rpm/etc" \
63 "$DISTRIBDIR/defaults/rpm" \
64 "$DISTRIBDIR/$DISTRIBUTION/rpm" \
65 "$CONFDIR/.distributions/$DISTRIBUTION/rpm"
67 echo "%_dbpath $RPMDB_PATH" >>"$pkgcfg/etc/macros"
69 test "$RPMLIBDIR" = / || ln -s "$RPMLIB" "$confdir/apps/pkgmgmt/rpmlib"
74 RPM_FLAVOR=d "$_VRPM" "$1" -- --initdb