Skip to content

Commit

Permalink
Merge pull request #1008 from NeroReflex/pacman_db_fix
Browse files Browse the repository at this point in the history
Move the whole pacman directory
  • Loading branch information
NeroReflex authored Aug 6, 2024
2 parents 446d505 + 641c68c commit a3c32d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ postinstallhook
pacman -Q > /manifest
# preserve installed package database
mkdir -p /usr/var/lib/pacman
cp -a /var/lib/pacman/local /usr/var/lib/pacman/
mkdir -p /usr/var/lib/
mv /var/lib/pacman /usr/var/lib/
# Remove the fallback: it is never used and takes up space
if [ -e "/boot/initramfs-${KERNEL_PACKAGE}-fallback.img" ]; then
Expand Down
4 changes: 2 additions & 2 deletions rootfs/usr/lib/frzr.d/unlock-0002-pacman-db.unlock
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ post_unlock() {
SUBVOL_DATA="${DEPLOYMENT_DATA}/${NAME}"

if [ -d "${SUBVOL_DATA}/var_overlay/upperdir" ]; then
if cp -a "${SUBVOL}/usr/var/lib/pacman/local" "${SUBVOL_DATA}/var_overlay/upperdir/lib/pacman/"; then
if cp -a "${SUBVOL}/usr/var/lib/pacman" "${SUBVOL_DATA}/var_overlay/upperdir/lib/"; then
echo "OK"
else
echo "ERROR: Could not copy the pacman database at '${SUBVOL_DATA}/var_overlay/upperdir/lib/pacman'"
echo "ERROR: Could not copy the pacman database at '${SUBVOL_DATA}/var_overlay/upperdir/lib/'"
fi
else
echo "ERROR: Could not find the /var overlay directory '${SUBVOL_DATA}/var_overlay/upperdir'"
Expand Down

0 comments on commit a3c32d1

Please sign in to comment.