summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Jones <carpaski@gentoo.org>2003-08-16 07:28:22 +0000
committerNicholas Jones <carpaski@gentoo.org>2003-08-16 07:28:22 +0000
commit68a2f18f14b6af9760b6f5749f79a6d18835b459 (patch)
tree37ec4a1f5e36935d65971eedc2fd9007ff9b4242
parentQuick updates, userpriv fix. (diff)
downloadportage-cvs-68a2f18f14b6af9760b6f5749f79a6d18835b459.tar.gz
portage-cvs-68a2f18f14b6af9760b6f5749f79a6d18835b459.tar.bz2
portage-cvs-68a2f18f14b6af9760b6f5749f79a6d18835b459.zip
General fixes.
portage-2.0.49_pre18
-rw-r--r--ChangeLog14
-rwxr-xr-xbin/ebuild.sh4
-rwxr-xr-xbin/emerge20
-rwxr-xr-xbin/emergehelp.py14
-rw-r--r--cnf/make.conf5
-rw-r--r--pym/cvstree.py21
-rw-r--r--pym/portage.py72
7 files changed, 107 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 5edda7f..15c49da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for Portage; the Gentoo Linux ports system
# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Id: ChangeLog,v 1.467 2003/08/16 00:01:38 carpaski Exp $
+# $Id: ChangeLog,v 1.468 2003/08/16 07:28:22 carpaski Exp $
+
+*portage-2.0.49_pre18 (15 Aug 2003): Fixes.
+
+ 15 Aug 2003; Nicholas Jones <carpaski@gentoo.org> ebuild.sh: Nakano's
+ fix for a glob expansion bug on a tar call.
+
+ 15 Aug 2003; Nicholas Jones <carpaski@gentoo.org> emerge: Nakano's fixes
+ for exiting on a signal and incorrect output for the unmerge screen.
+
+ 15 Aug 2003; Nicholas Jones <carpaski@gentoo.org> portage.py: Added in
+ patch to shuffle thirdparty mirrors. Nakano's fixes for digests+fetching
+ bugs/messages/errors. Virtual stripping fix.
15 Aug 2003; Nicholas Jones <carpaski@gentoo.org> *: Fix to emerge -V
and related output. Typo fixes. Parent thread no longer drops root in
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index b890139..9af31de 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/ebuild.sh,v 1.138 2003/08/16 00:01:38 carpaski Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/ebuild.sh,v 1.139 2003/08/16 07:28:22 carpaski Exp $
if [ "$*" != "depend" ] && [ "$*" != "clean" ]; then
if [ -f ${T}/successful ]; then
@@ -725,7 +725,7 @@ dyn_compile() {
dyn_package() {
trap "abort_package" SIGINT SIGQUIT
cd ${BUILDDIR}/image
- tar cpvf - * | bzip2 -f > ../bin.tar.bz2 || die "Failed to create tarball"
+ tar cpvf - ./ | bzip2 -f > ../bin.tar.bz2 || die "Failed to create tarball"
cd ..
xpak build-info inf.xpak
tbz2tool join bin.tar.bz2 inf.xpak ${PF}.tbz2
diff --git a/bin/emerge b/bin/emerge
index c8c57ec..041432d 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1,12 +1,12 @@
#!/usr/bin/env python2.2
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.222 2003/08/16 00:01:38 carpaski Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.223 2003/08/16 07:28:22 carpaski Exp $
import os
os.environ["PORTAGE_CALLER"]="emerge"
-import sys,emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit
+import sys,emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit,signal
from stat import *
from output import *
@@ -217,6 +217,11 @@ def emergeexit():
xtermTitleReset()
atexit.register(emergeexit)
+def emergeexitsig(signum, frame):
+ emergeexit()
+ sys.exit(100+signum)
+signal.signal(signal.SIGINT, emergeexitsig)
+
def countdown(secs=5, doing="Starting"):
if secs:
print ">>> Waiting",secs,"seconds before starting..."
@@ -1469,8 +1474,17 @@ def unmerge(unmerge_action, unmerge_files):
pkgmap[mykey]["selected"].append(slotmap[myslot][ckey])
numselected=numselected+1
#ok, now the last-merged package is protected, and the rest are selected
+ for x in candidate_catpkgs:
+ if not mymatch and x[0] not in "<>=~":
+ #add a "=" if missing
+ mydep="="+x
+ mymatch=localtree.dep_match(mydep)
+ else:
+ mydep=x
for y in localtree.dep_nomatch(mydep):
- if not y in pkgmap[mykey]["omitted"]:
+ if y not in pkgmap[mykey]["omitted"] and \
+ y not in pkgmap[mykey]["selected"] and \
+ y not in pkgmap[mykey]["protected"]:
pkgmap[mykey]["omitted"].append(y)
if global_unmerge and not numselected:
diff --git a/bin/emergehelp.py b/bin/emergehelp.py
index 2b3703d..afdb459 100755
--- a/bin/emergehelp.py
+++ b/bin/emergehelp.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python2.2
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/Attic/emergehelp.py,v 1.15 2003/08/03 21:42:30 aether Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/Attic/emergehelp.py,v 1.16 2003/08/16 07:28:22 carpaski Exp $
import os,sys
from output import *
@@ -168,6 +168,18 @@ def help(myaction,myopts,havecolor=1):
print " used in combination with --pretend all the SRC_URIs will be"
print " displayed multiple mirrors per line, one line per file."
print
+ print " "+green("--getbinpkg")+" ("+green("-g")+" short option)"
+ print " Using the server and location defined in PORTAGE_BINHOST, portage"
+ print " will download the information from each binary file there and it"
+ print " will use that information to help build the dependency list. This"
+ print " option implies '-k'. (Use -gK for binary-only merging.)"
+ print
+ print " "+green("--getbinpkgonly")+" ("+green("-G")+" short option)"
+ print " This option is identical to -g, as above, except it will not use"
+ print " ANY information from the local machine. All binaries will be"
+ print " downloaded from the remote server without consulting packages"
+ print " existing in the packages directory."
+ print
print " "+green("--noconfmem")
print " Portage keeps track of files that have been placed into"
print " CONFIG_PROTECT directories, and normally it will not merge the"
diff --git a/cnf/make.conf b/cnf/make.conf
index aa428ab..a9ae53b 100644
--- a/cnf/make.conf
+++ b/cnf/make.conf
@@ -1,6 +1,6 @@
# Copyright 2000-2003 Daniel Robbins, Gentoo Technologies, Inc.
# Contains local system settings for Portage system
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/cnf/make.conf,v 1.65 2003/07/16 12:59:18 carpaski Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/cnf/make.conf,v 1.66 2003/08/16 07:28:22 carpaski Exp $
# Please review 'man make.conf' for more information.
@@ -267,7 +267,8 @@ CHOST="i686-pc-linux-gnu"
# CCACHE_SIZE sets the space use limitations for ccache. The default size is
# 2G, and will be set if not defined otherwise and ccache is in features.
# Portage will set the default ccache dir if it is not present in the
-# user's environment: ${PORTAGE_TMPDIR}/ccache (/var/tmp/ccache).
+# user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
+# (/var/tmp/ccache), and for regular use the default is /root/.ccache.
# Sizes are specified with 'G' 'M' or 'K'.
# '4G' for 4 gigabytes, '4096M' for 4 gigabytes, etc... Default is 2G
#CCACHE_SIZE="2G"
diff --git a/pym/cvstree.py b/pym/cvstree.py
index 679eac9..1ee6fa7 100644
--- a/pym/cvstree.py
+++ b/pym/cvstree.py
@@ -1,10 +1,9 @@
# cvstree.py -- cvs tree utilities
# Copyright 1998-2003 Gentoo Technologies, Inc.
# Distributed under the GNU Public License v2
-# Author: Nicholas Jones <carpaski@gentoo.org>
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/cvstree.py,v 1.4 2003/07/16 12:59:18 carpaski Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/cvstree.py,v 1.5 2003/08/16 07:28:22 carpaski Exp $
-import string,os,time,sys
+import string,os,time,sys,re
from stat import *
# [D]/Name/Version/Date/Flags/Tags
@@ -38,6 +37,22 @@ def isadded(entries, path):
if mytarget:
if "cvs" in mytarget["status"]:
return 1
+
+ basedir=os.path.dirname(path)
+ filename=os.path.basename(path)
+
+ try:
+ myfile=open(basedir+"/CVS/Entries","r")
+ except IOError:
+ return 0
+ mylines=myfile.readlines()
+ myfile.close()
+
+ rep=re.compile("^\/"+filename+"\/");
+ for x in mylines:
+ if rep.search(x):
+ return 1
+
return 0
def findnew(entries,recursive=0,basedir=""):
diff --git a/pym/portage.py b/pym/portage.py
index f16fc32..c929979 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1,7 +1,7 @@
# portage.py -- core Portage functionality
# Copyright 1998-2003 Daniel Robbins, Gentoo Technologies, Inc.
# Distributed under the GNU Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.333 2003/08/16 00:01:39 carpaski Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.334 2003/08/16 07:28:22 carpaski Exp $
VERSION="2.0.49"
@@ -10,6 +10,7 @@ from commands import *
from select import *
from output import *
from time import sleep
+from random import shuffle
import string,sys,os
import getbinpkg
@@ -1096,7 +1097,12 @@ def fetch(myuris, listonly=0, fetchonly=0):
print ">>> \"mirror\" mode and \"nomirror\" restriction enabled; skipping fetch."
return 1
global thirdpartymirrors
- mymirrors=settings["GENTOO_MIRRORS"].split()
+
+ if ("nomirror" in settings["RESTRICT"].split()):
+ mymirrors=[]
+ else:
+ mymirrors=settings["GENTOO_MIRRORS"].split()
+
fetchcommand=settings["FETCHCOMMAND"]
resumecommand=settings["RESUMECOMMAND"]
fetchcommand=string.replace(fetchcommand,"${DISTDIR}",settings["DISTDIR"])
@@ -1151,6 +1157,7 @@ def fetch(myuris, listonly=0, fetchonly=0):
if eidx != -1:
mirrorname = myuri[9:eidx]
if thirdpartymirrors.has_key(mirrorname):
+ shuffle(thirdpartymirrors[mirrorname])
for locmirr in thirdpartymirrors[mirrorname]:
filedict[myfile].append(locmirr+"/"+myuri[eidx+1:])
else:
@@ -1350,13 +1357,13 @@ def digestgen(myarchives,overwrite=1,manifestonly=0):
mycvstree=cvstree.getentries(pbasedir, recursive=1)
myunaddedfiles=""
if not manifestonly and not cvstree.isadded(mycvstree,digestfn):
- if digestfn[:len(pbasedir)+1]==pbasedir+"/":
- myunaddedfiles=digestfn[len(pbasedir)+1:]+" "
+ if digestfn[:len(pbasedir)]==pbasedir:
+ myunaddedfiles=digestfn[len(pbasedir):]+" "
else:
myunaddedfiles=digestfn+" "
- if not cvstree.isadded(mycvstree,manifestfn):
+ if not cvstree.isadded(mycvstree,manifestfn[len(pbasedir):]):
if manifestfn[:len(pbasedir)]==pbasedir:
- myunaddedfiles=manifestfn[len(pbasedir):]+" "
+ myunaddedfiles+=manifestfn[len(pbasedir):]+" "
else:
myunaddedfiles+=manifestfn
if myunaddedfiles:
@@ -1586,7 +1593,7 @@ def doebuild(myebuild,mydo,myroot,debug=0,listonly=0,fetchonly=0):
return myso[0]
# Build directory creation isn't required for any of these.
- if mydo not in ["digest","manifest"]:
+ if mydo not in ["fetch","digest","manifest"]:
try:
if ("nouserpriv" not in string.split(settings["RESTRICT"])):
if ("userpriv" in features) and (portage_uid and portage_gid):
@@ -1625,27 +1632,6 @@ def doebuild(myebuild,mydo,myroot,debug=0,listonly=0,fetchonly=0):
return 1
try:
- if not os.path.exists(settings["DISTDIR"]):
- os.makedirs(settings["DISTDIR"])
- if not os.path.exists(settings["DISTDIR"]+"/cvs-src"):
- os.makedirs(settings["DISTDIR"]+"/cvs-src")
- except OSError, e:
- print "!!! File system problem. (ReadOnly? Out of space?)"
- print "!!!",str(e)
- return 1
-
- try:
- mystat=os.stat(settings["DISTDIR"]+"/cvs-src")
- if (mystat[ST_GID]!=portage_gid) or ((mystat[ST_MODE]&02770)!=02770):
- print "*** Adjusting cvs-src permissions for portage user..."
- os.chown(settings["DISTDIR"]+"/cvs-src",0,portage_gid)
- os.chmod(settings["DISTDIR"]+"/cvs-src",02770)
- spawn("chgrp -R "+str(portage_gid)+" "+settings["DISTDIR"]+"/cvs-src", free=1)
- spawn("chmod -R g+rw "+settings["DISTDIR"]+"/cvs-src", free=1)
- except:
- pass
-
- try:
if ("userpriv" in features) and ("ccache" in features):
if (not settings.has_key("CCACHE_DIR")) or (settings["CCACHE_DIR"]==""):
settings["CCACHE_DIR"]=settings["PORTAGE_TMPDIR"]+"/ccache"
@@ -1726,6 +1712,26 @@ def doebuild(myebuild,mydo,myroot,debug=0,listonly=0,fetchonly=0):
fetchme=newuris
checkme=alist
+ try:
+ if not os.path.exists(settings["DISTDIR"]):
+ os.makedirs(settings["DISTDIR"])
+ if not os.path.exists(settings["DISTDIR"]+"/cvs-src"):
+ os.makedirs(settings["DISTDIR"]+"/cvs-src")
+ except OSError, e:
+ print "!!! File system problem. Could not create DISTDIR and cvs-src dir."
+ print "!!! Fetching may fail:",str(e)
+
+ try:
+ mystat=os.stat(settings["DISTDIR"]+"/cvs-src")
+ if (mystat[ST_GID]!=portage_gid) or ((mystat[ST_MODE]&02770)!=02770):
+ print "*** Adjusting cvs-src permissions for portage user..."
+ os.chown(settings["DISTDIR"]+"/cvs-src",0,portage_gid)
+ os.chmod(settings["DISTDIR"]+"/cvs-src",02770)
+ spawn("chgrp -R "+str(portage_gid)+" "+settings["DISTDIR"]+"/cvs-src", free=1)
+ spawn("chmod -R g+rw "+settings["DISTDIR"]+"/cvs-src", free=1)
+ except:
+ pass
+
if not fetch(fetchme, listonly, fetchonly):
return 1
@@ -4327,13 +4333,17 @@ class dblink:
newvirts[myvirt]=[]
for mykey in myvirts[myvirt]:
if mykey == self.cat+"/"+pkgsplit(self.pkg)[0]:
- if myprovides.has_key(myvirt) and (mykey in myprovides[myvirt]):
- newvirts[myvirt].append(mykey)
+ if myprovides.has_key(myvirt) and \
+ (self.cat+"/"+self.pkg in myprovides[myvirt]) and \
+ (len(myprovides[myvirt]) > 1):
+ if mykey not in newvirts[myvirt]:
+ newvirts[myvirt].append(mykey)
sys.stderr.write("--- Leaving virtual '"+mykey+"' from '"+myvirt+"'\n")
else:
sys.stderr.write("<<< Removing virtual '"+mykey+"' from '"+myvirt+"'\n")
else:
- newvirts[myvirt].append(mykey)
+ if mykey not in newvirts[myvirt]:
+ newvirts[myvirt].append(mykey)
if newvirts[myvirt]==[]:
del newvirts[myvirt]
writedict(newvirts,self.myroot+"var/cache/edb/virtuals")