aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-04-23 07:26:04 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-04-23 07:26:04 +0000
commitdf28605d3eaf82a22fc7f42f012b53cc14d51fa5 (patch)
tree5423612b42bc5f0cd5d4cf52fa9ce74c4f9a987b
parentpym/portage.py: Adding setting of CBUILD to CHOST if it is not set. Fixed (diff)
downloadportage-cvs-df28605d3eaf82a22fc7f42f012b53cc14d51fa5.tar.gz
portage-cvs-df28605d3eaf82a22fc7f42f012b53cc14d51fa5.tar.bz2
portage-cvs-df28605d3eaf82a22fc7f42f012b53cc14d51fa5.zip
Added a 3 second delay after a failed Manifest commit. Fixed bug where
files at the category level were being treated as packages. pym/portage.py portage_util.py portage_db_cpickle.py: Replaced HIGHEST_PROTOCOL with its equivalent -1 to ensure python-2.2 compatibility. Added back ChangeLog and metadata.xml to Manifest generation for portage compatibility.
-rw-r--r--ChangeLog11
-rwxr-xr-xbin/repoman8
-rw-r--r--pym/portage.py13
-rw-r--r--pym/portage_db_cpickle.py6
-rw-r--r--pym/portage_util.py6
5 files changed, 29 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b96145..a7939d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,21 @@
# ChangeLog for Portage; the Gentoo Linux ports system
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Id: ChangeLog,v 1.796.2.98 2005/04/20 15:19:02 jstubbs Exp $
+# $Id: ChangeLog,v 1.796.2.99 2005/04/23 07:26:03 jstubbs Exp $
MAJOR CHANGES in 2.0.51:
1. /var/cache/edb/virtuals is no longer used at all. It's calculated now.
2. /var/cache/edb/world is now /var/lib/portage/world.
3. /etc/portage/profile/virtuals is _USER_ configs only.
+ 23 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> bin/repoman: Added a 3 second
+ delay after a failed Manifest commit. Fixed bug where files at the category
+ level were being treated as packages.
+
+ 23 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> pym/portage.py portage_util.py
+ portage_db_cpickle.py: Replaced HIGHEST_PROTOCOL with it's equivalent -1 to
+ ensure python-2.2 compatibility. Added back ChangeLog and metadata.xml to
+ Manifest generation for portage compatibility.
+
21 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> pym/portage.py: Adding
setting of CBUILD to CHOST if it is not set. Fixed getmaskingstatus to
choose an arch-based keyword over -*.
diff --git a/bin/repoman b/bin/repoman
index cbaa680..e16d873 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1,7 +1,7 @@
#!/usr/bin/python -O
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/repoman,v 1.98.2.17 2005/04/13 15:28:38 jstubbs Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/repoman,v 1.98.2.18 2005/04/23 07:26:04 jstubbs Exp $
# Next to do: dep syntax checking in mask files
# Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems)
@@ -1399,6 +1399,9 @@ else:
mysigs=[]
if myheaders or myupdates or myremoved or mynew:
myfiles=myheaders+myupdates+myremoved+mynew
+ for x in range(len(myfiles), -1, -1):
+ if not os.path.exists(myfiles[x]) or not os.path.isdir(myfiles[x]):
+ del myfiles[x]
mydone=[]
if repolevel==3: # In a package dir
repoman_settings["O"]="./"
@@ -1407,6 +1410,7 @@ else:
while(gpgsign(repoman_settings["O"]+"/Manifest")):
portage.writemsg("!!! YOU MUST sign the Manifest.\n")
portage.writemsg("!!! You can also disable this for the time being by removing FEATURES='sign'")
+ time.sleep(3)
#mysigs+=[sigfile]
elif repolevel==2: # In a category dir
for x in myfiles:
@@ -1422,6 +1426,7 @@ else:
while(gpgsign(repoman_settings["O"]+"/Manifest")):
portage.writemsg("!!! YOU MUST sign the Manifest.\n")
portage.writemsg("!!! You can also disable this for the time being by removing FEATURES='sign'")
+ time.sleep(3)
#mysigs+=[sigfile]
elif repolevel==1: # repo-cvsroot
print green("RepoMan sez:"), "\"You're rather crazy... doing the entire repository.\"\n"
@@ -1438,6 +1443,7 @@ else:
while(gpgsign(repoman_settings["O"]+"/Manifest")):
portage.writemsg("!!! YOU MUST sign the Manifest.\n")
portage.writemsg("!!! You can also disable this for the time being by removing FEATURES='sign'")
+ time.sleep(3)
#mysigs+=[sigfile]
else:
print red("I'm confused... I don't know where I am!")
diff --git a/pym/portage.py b/pym/portage.py
index 64ceab2..75ee1af 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1,10 +1,10 @@
# portage.py -- core Portage functionality
# Copyright 1998-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.524.2.58 2005/04/20 15:19:03 jstubbs Exp $
-cvs_id_string="$Id: portage.py,v 1.524.2.58 2005/04/20 15:19:03 jstubbs Exp $"[5:-2]
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.524.2.59 2005/04/23 07:26:04 jstubbs Exp $
+cvs_id_string="$Id: portage.py,v 1.524.2.59 2005/04/23 07:26:04 jstubbs Exp $"[5:-2]
-VERSION="$Revision: 1.524.2.58 $"[11:-2] + "-cvs"
+VERSION="$Revision: 1.524.2.59 $"[11:-2] + "-cvs"
# ===========================================================================
# START OF IMPORTS -- START OF IMPORTS -- START OF IMPORTS -- START OF IMPORT
@@ -2091,7 +2091,7 @@ def digestgen(myarchives,mysettings,overwrite=1,manifestonly=0):
print green(">>> Generating manifest file...")
mypfiles=listdir(pbasedir,recursive=1,filesonly=1,ignorecvs=1,EmptyOnError=1)
mypfiles=cvstree.apply_cvsignore_filter(mypfiles)
- for x in ["Manifest", "ChangeLog", "metadata.xml"]:
+ for x in ["Manifest"]:
if x in mypfiles:
mypfiles.remove(x)
@@ -7025,7 +7025,7 @@ if not os.path.exists(root+"var/lib/portage"):
except SystemExit, e:
raise
except:
- writemsg("portage: couldn't create /var/tmp; exiting.\n")
+ writemsg("portage: couldn't create /var/lib/portage; exiting.\n")
sys.exit(1)
@@ -7313,8 +7313,7 @@ def portageexit():
mymfn=mtimedbfile
try:
mtimedb["version"]=VERSION
- cPickle.dump(mtimedb, open(mymfn,"w"), cPickle.HIGHEST_PROTOCOL)
- #print "*** Wrote out mtimedb data successfully."
+ cPickle.dump(mtimedb, open(mymfn,"w"), -1)
except SystemExit, e:
raise
except Exception, e:
diff --git a/pym/portage_db_cpickle.py b/pym/portage_db_cpickle.py
index 151a8da..dabb2cf 100644
--- a/pym/portage_db_cpickle.py
+++ b/pym/portage_db_cpickle.py
@@ -1,7 +1,7 @@
# Copyright 2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/Attic/portage_db_cpickle.py,v 1.9.2.1 2005/01/16 02:35:33 carpaski Exp $
-cvs_id_string="$Id: portage_db_cpickle.py,v 1.9.2.1 2005/01/16 02:35:33 carpaski Exp $"[5:-2]
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/Attic/portage_db_cpickle.py,v 1.9.2.2 2005/04/23 07:26:04 jstubbs Exp $
+cvs_id_string="$Id: portage_db_cpickle.py,v 1.9.2.2 2005/04/23 07:26:04 jstubbs Exp $"[5:-2]
import anydbm,cPickle,types
from os import chown,access,R_OK,unlink
@@ -65,7 +65,7 @@ class database(portage_db_template.database):
try:
if os.path.exists(self.filename):
unlink(self.filename)
- cPickle.dump(self.db, open(self.filename,"w"), cPickle.HIGHEST_PROTOCOL)
+ cPickle.dump(self.db, open(self.filename,"w"), -1)
os.chown(self.filename,self.uid,self.gid)
os.chmod(self.filename, 0664)
except SystemExit, e:
diff --git a/pym/portage_util.py b/pym/portage_util.py
index 64b9103..0afe849 100644
--- a/pym/portage_util.py
+++ b/pym/portage_util.py
@@ -1,7 +1,7 @@
# Copyright 2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage_util.py,v 1.11.2.5 2005/01/16 02:35:33 carpaski Exp $
-cvs_id_string="$Id: portage_util.py,v 1.11.2.5 2005/01/16 02:35:33 carpaski Exp $"[5:-2]
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage_util.py,v 1.11.2.6 2005/04/23 07:26:04 jstubbs Exp $
+cvs_id_string="$Id: portage_util.py,v 1.11.2.6 2005/04/23 07:26:04 jstubbs Exp $"[5:-2]
import sys,string,shlex,os.path
@@ -384,7 +384,7 @@ def pickle_write(data,filename,debug=0):
import cPickle,os
try:
myf=open(filename,"w")
- cPickle.dump(data,myf,cPickle.HIGHEST_PROTOCOL)
+ cPickle.dump(data,myf,-1)
myf.flush()
myf.close()
writemsg("Wrote pickle: "+str(filename)+"\n",1)