aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt/pkg
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-07-30 06:21:30 +0800
committerbapt <bapt@FreeBSD.org>2012-07-30 06:21:30 +0800
commitea49f4dd2f0067e346cfdfbd37e570a9539b0c0b (patch)
tree6300bbb4b1bb6d7607297dcabc64757478943f4f /ports-mgmt/pkg
parent218790064b8d02c5d601a8d69d80f96f8783e823 (diff)
downloadfreebsd-ports-gnome-ea49f4dd2f0067e346cfdfbd37e570a9539b0c0b.tar.gz
freebsd-ports-gnome-ea49f4dd2f0067e346cfdfbd37e570a9539b0c0b.tar.zst
freebsd-ports-gnome-ea49f4dd2f0067e346cfdfbd37e570a9539b0c0b.zip
add a fix to pkg2ng preventing losing track of some dependency origins leading
to a failure of the conversion. Reported by: Pierre Guinoiseau (via gitub issue #314) Tested by: Pierre Guinoiseau
Diffstat (limited to 'ports-mgmt/pkg')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-ports__pkg2ng46
2 files changed, 47 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 868d86f580c6..23ff0e48c9fa 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pkg
DISTVERSION= 1.0-rc4
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/portmgr \
http://files.etoilebsd.net/pkg/
diff --git a/ports-mgmt/pkg/files/patch-ports__pkg2ng b/ports-mgmt/pkg/files/patch-ports__pkg2ng
new file mode 100644
index 000000000000..9a6adc8a0cb1
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-ports__pkg2ng
@@ -0,0 +1,46 @@
+--- ./ports/pkg2ng.orig 2012-07-20 22:06:38.000000000 +0200
++++ ./ports/pkg2ng 2012-07-30 00:16:30.916916951 +0200
+@@ -11,12 +11,12 @@
+ ARCH=$( uname -m )
+ failed_pkgs=""
+ MOVED=0
++DBDIR="/var/db"
++PKGDB="${DBDIR}/pkg"
++PKGBAK="${DBDIR}/pkg.bak"
+
+ for PKG in $( pkg_info -Ea )
+ do
+- DBDIR="/var/db"
+- PKGDB="${DBDIR}/pkg"
+- PKGBAK="${DBDIR}/pkg.bak"
+ DB="${PKGDB}/${PKG}"
+ DESC="${DB}/+DESC"
+ if [ ! -e "${PKGBAK}" ]; then
+@@ -84,10 +84,6 @@
+ failed_pkgs="${failed_pkgs} ${PKG}"
+ else
+ rm -rf ${MANIFEST}
+- if [ -e ${DB} ]; then
+- mv ${DB} ${PKGBAK}/${PKG}
+- MOVED=1
+- fi
+ fi
+
+ rm -rf ${MDIR}
+@@ -101,6 +97,16 @@
+ echo "" >&2
+ echo "!!! Some packages failed to register !!!" >&2
+ echo "Failed packages: ${failed_pkgs}" >&2
++else
++ for PKG in $( pkg_info -Ea ); do
++ DB="${PKGDB}/${PKG}"
++ if [ -e ${DB} ]; then
++ mv ${DB} ${PKGBAK}/${PKG}
++ MOVED=1
++ fi
++ done
++ echo "Conversion has been successfully finished"
++ echo "Your old packages database has been moved to: ${PKGBAK}."
+ fi
+
+ # Delete the portupgrade pkgdb to avoid discrepencies. It will be auto recreated.