repoman: fix PORTDIR consistency for herds.xml
authorZac Medico <zmedico@gentoo.org>
Sun, 16 Jan 2011 15:40:20 +0000 (07:40 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 16 Jan 2011 15:40:20 +0000 (07:40 -0800)
This fixes a case in which repoman could use the PORTDIR setting in
make.conf to grab herds.xml, even though cwd refers to a different
path (cvs tree rather than rsync tree).

bin/repoman

index 8c926ca41e9eac8d538f6af69332a53446358eac..3938f49cfbe2b8e6176ca3850631fa1b390fea57 100755 (executable)
@@ -578,6 +578,8 @@ portdir_overlay = os.path.realpath(portdir_overlay)
 repo_info = portdb._repo_info[portdir_overlay]
 portdb.porttrees = list(repo_info.eclass_db.porttrees)
 portdir = portdb.porttrees[0]
+repoman_settings['PORTDIR'] = portdir
+repoman_settings.backup_changes('PORTDIR')
 
 # Generate an appropriate PORTDIR_OVERLAY value for passing into the
 # profile-specific config constructor calls.