Skip to content

Commit

Permalink
fix a few issues with pkg-stage to work with mport
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Aug 11, 2024
1 parent 0d3b349 commit 5812d75
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions release/scripts/pkg-stage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export PORTSDIR="${PORTSDIR:-/usr/mports}"

_DVD_PACKAGES="archivers/unzip
devel/git
emulators/linux_base-c6
graphics/drm-fbsd11.2-kmod
emulators/linux_base-c7
graphics/drm-fbsd12.0-kmod
net/mpd5
net/rsync
shells/bash
Expand All @@ -23,7 +23,7 @@ sysutils/tmux
www/firefox
www/links
x11-drivers/xf86-video-vmware
x11/gnome3
x11/gnome
x11/xorg"

if [ ! -f ${PORTSDIR}/Makefile ]; then
Expand All @@ -33,14 +33,9 @@ if [ ! -f ${PORTSDIR}/Makefile ]; then
exit 0
fi
export DVD_DIR="dvd/packages"
export PKG_ABI=$(pkg config ABI)
export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null)
export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}"
export PKG_REPODIR="${DVD_DIR}"

/bin/mkdir -p ${PKG_REPODIR}
if [ ! -z "${PKG_ALTABI}" ]; then
(cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI})
fi

# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
# final list.
Expand All @@ -63,15 +58,8 @@ fi

# Print pkg(8) information to make debugging easier.
${PKGCMD} index
cp /var/db/mport/index.db ${PKG_REPODIR}/index.db
${PKGCMD} download -o ${PKG_REPODIR} -d ${DVD_PACKAGES}

# Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works
# using the on-disc packages.
mkdir -p ${PKG_REPODIR}/Latest
(cd ${PKG_REPODIR}/Latest && \
ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)

${PKGCMD} repo ${PKG_REPODIR}

# Always exit '0', even if pkg(8) complains about conflicts.
exit 0

0 comments on commit 5812d75

Please sign in to comment.