Skip to content

Instantly share code, notes, and snippets.

@splbio
Created April 18, 2014 01:17
Show Gist options
  • Save splbio/11020055 to your computer and use it in GitHub Desktop.
Save splbio/11020055 to your computer and use it in GitHub Desktop.
Fix for pkg+freebsd10-stable
diff --git a/nanobsd/common b/nanobsd/common
index dc7c0a4..f7da3d4 100644
--- a/nanobsd/common
+++ b/nanobsd/common
@@ -291,7 +291,11 @@ do_add_pkg ()
mount -t nullfs -o noatime ${NANO_OBJ}/ports/packages \
${NANO_WORLDDIR}/usr/ports/packages
- CR "cd /usr/ports/packages/All;env SIGNATURE_TYPE=none pkg add -f $1.txz && touch $1.txz.added "
+ local delete_it=true
+ if echo $1 | egrep -q '^pkg-[0-9._]+' ; then
+ delete_it=false
+ fi
+ CR "cd /usr/ports/packages/All; ${delete_it} && pkg info $1 && pkg remove -fy $1; env SIGNATURE_TYPE=none pkg add $1.txz && touch $1.txz.added "
set -e
umount -f ${NANO_WORLDDIR}/usr/ports/packages
rmdir ${NANO_WORLDDIR}/usr/ports/packages/All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment