Lines Matching refs:cache
121 cache=$1
131 mkdir -p "$cache/partial-$arch"
134 echo "Failed to create '$cache/partial-$arch' directory"
138 # download a mini opensuse into a cache
140 mkdir -p "$cache/partial-$arch-packages"
141 zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/distribution/$DISTRO/repo/oss/ repo-oss || return 1
144 zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss/ update || return 1
146 zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
148 zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
149 zypper --root $cache/partial-$arch-packages --non-interactive in --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog || return 1
150 cat > $cache/partial-$arch-packages/opensuse.conf << EOF
177 echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf
183 echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf
189 echo "Support: net-tools iproute2" >> $cache/partial-$arch-packages/opensuse.conf
193 mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i686/
194 for i in "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i586/*" ; do
195 ln -s $i $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i686/
197 mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/update/i686
198 for i in "$cache/partial-$arch-packages/var/cache/zypp/packages/update/i586/*" ; do
199 ln -s $i $cache/partial-$arch-packages/var/cache/zypp/packages/update/i686/
204 [ -d $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch ] || mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch
206 CLEAN_BUILD=1 BUILD_ARCH="$arch" BUILD_ROOT="$cache/partial-$arch" BUILD_DIST="$cache/partial-$arch-packages/opensuse.conf" PATH="$PATH:$BUILD_DIR" $BUILD_DIR/init_buildsystem --clean --configdir $BUILD_DIR/configs --cachedir $cache/partial-$arch-cache --repository $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/$arch --repository $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/noarch --repository $cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch --repository $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch || return 1
207 chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/distribution/$DISTRO/repo/oss repo-oss || return 1
210 chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss update || return 1
212 chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
216 rm -fr $cache/partial-$arch/{.build,.guessed_dist,.srcfiles*,installed-pkg}
217 rm -fr $cache/partial-$arch/dev
219 mkdir -p "$cache/partial-$arch/dev"
220 mknod -m 666 $cache/partial-$arch/dev/null c 1 3
221 mknod -m 666 $cache/partial-$arch/dev/zero c 1 5
223 rm -f $cache/partial-$arch/etc/mtab
224 ln -sf /proc/self/mounts $cache/partial-$arch/etc/mtab
227 rm -fr $cache/partial-$arch/var/run
228 ln -s -f ../run $cache/partial-$arch/var/run
234 rm -fr "$cache/partial-$arch-packages"
243 cache=$1
250 rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1
256 # Allow the cache base to be set by environment variable
257 cache="${LXC_CACHE_PATH:-@LOCALSTATEDIR@/cache/lxc/opensuse/$DISTRO}"
267 echo "Checking cache download in $cache/rootfs-$arch ... "
268 if [ ! -e "$cache/rootfs-$arch" ]; then
269 download_opensuse $cache $arch
276 echo "Copy $cache/rootfs-$arch to $rootfs ... "
277 copy_opensuse $cache $arch $rootfs
380 cache="${LXC_CACHE_PATH:-@LOCALSTATEDIR@/cache/lxc/opensuse}"
382 if [ ! -e $cache ]; then
394 echo -n "Purging the download cache..."
395 rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1