Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2012 22:21:31 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r301696 - in head/ports-mgmt/pkg: . files
Message-ID:  <201207292221.q6TMLVsA011492@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Jul 29 22:21:30 2012
New Revision: 301696
URL: http://svn.freebsd.org/changeset/ports/301696

Log:
  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

Added:
  head/ports-mgmt/pkg/files/
  head/ports-mgmt/pkg/files/patch-ports__pkg2ng   (contents, props changed)
Modified:
  head/ports-mgmt/pkg/Makefile

Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile	Sun Jul 29 21:17:24 2012	(r301695)
+++ head/ports-mgmt/pkg/Makefile	Sun Jul 29 22:21:30 2012	(r301696)
@@ -7,6 +7,7 @@
 
 PORTNAME=	pkg
 DISTVERSION=	1.0-rc4
+PORTREVISION=	1
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	LOCAL/portmgr \
 		http://files.etoilebsd.net/pkg/

Added: head/ports-mgmt/pkg/files/patch-ports__pkg2ng
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-ports__pkg2ng	Sun Jul 29 22:21:30 2012	(r301696)
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207292221.q6TMLVsA011492>