summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-09-01 14:42:25 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-09-01 14:42:25 +0000
commit1b1f845635a1542fc2b7fda43d8dc44e55a8fded (patch)
tree0fecbe5b910b08edf7837a6a2be02d7af7c85bc5
parentdon't commit the remenants from applying a patch (diff)
downloadportage-multirepo-1b1f845635a1542fc2b7fda43d8dc44e55a8fded.tar.gz
portage-multirepo-1b1f845635a1542fc2b7fda43d8dc44e55a8fded.tar.bz2
portage-multirepo-1b1f845635a1542fc2b7fda43d8dc44e55a8fded.zip
68928-spawn-command-isabs-zmedico.patch (spawn included "." in PATH)
98727_sleep_locale_cleanup.patch (sleep was defined twice for "." and "," locales) 98827_lchown_normal_files.patch (lchown was being used on known-to-be-regular files) 98827_darwin_noop_lchown.patch (lchwon was aliased to chown on darwin) 99101_ccache_perms_adjust.patch (perms test and adjustment didn't match) 99120_uid_gid_mixup.patch (portage gid used in place of uid) 99418_merge_retcode_ignored.patch (dispatch-conf ignored result of merge command) 100382_incomplete_world.patch (versioned atoms were not being added to world) broken-stat-perms.patch (result of conditional execution being unconditionally tested) svn path=/main/branches/2.0/; revision=1960
-rwxr-xr-xbin/dispatch-conf5
-rwxr-xr-xbin/ebuild.sh34
-rwxr-xr-xbin/emerge2
-rw-r--r--pym/portage.py15
-rw-r--r--pym/portage_data.py5
-rw-r--r--pym/portage_exec.py2
6 files changed, 35 insertions, 28 deletions
diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 0d316126..5007353f 100755
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@ -186,7 +186,10 @@ class dispatch:
elif c == 'm':
merged = SCRATCH_DIR+"/"+os.path.basename(conf['current'])
print
- os.system (self.options['merge'] % (merged, conf ['current'], newconf))
+ ret = os.system (self.options['merge'] % (merged, conf ['current'], newconf))
+ if ret:
+ print "Failure running 'merge' command"
+ continue
shutil.copyfile(merged, mrgconf)
os.remove(merged)
mystat = os.lstat(conf['new'])
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index ab3e05c7..ffb2c25d 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -867,15 +867,11 @@ dyn_compile() {
echo "!!! that you know what you are doing... You have 5 seconds to abort..."
echo
- echo -ne "\a"; sleep 0.25 &>/dev/null; echo -ne "\a"; sleep 0.25 &>/dev/null
- echo -ne "\a"; sleep 0.25 &>/dev/null; echo -ne "\a"; sleep 0.25 &>/dev/null
- echo -ne "\a"; sleep 0.25 &>/dev/null; echo -ne "\a"; sleep 0.25 &>/dev/null
- echo -ne "\a"; sleep 0.25 &>/dev/null; echo -ne "\a"; sleep 0.25 &>/dev/null
-
- echo -ne "\a"; sleep 0,25 &>/dev/null; echo -ne "\a"; sleep 0,25 &>/dev/null
- echo -ne "\a"; sleep 0,25 &>/dev/null; echo -ne "\a"; sleep 0,25 &>/dev/null
- echo -ne "\a"; sleep 0,25 &>/dev/null; echo -ne "\a"; sleep 0,25 &>/dev/null
- echo -ne "\a"; sleep 0,25 &>/dev/null; echo -ne "\a"; sleep 0,25 &>/dev/null
+ for x in 1 2 3 4 5 6 7 8; do
+ echo -ne "\a"
+ LC_ALL=C sleep 0.25
+ done
+
sleep 3
fi
@@ -1129,10 +1125,12 @@ dyn_install() {
local count=0
find "${D}/" -user portage | while read file; do
count=$(( $count + 1 ))
- [[ ! -L "${file}" ]] && s=$(stat_perms "$file")
- if [ -z "${s}" ]; then
- ewarn "failed stat_perm'ing $file. User intervention during install isn't wise..."
- continue
+ if [ ! -L "${file}" ]; then
+ s=$(stat_perms "$file")
+ if [ -z "${s}" ]; then
+ ewarn "failed stat_perm'ing $file. User intervention during install isn't wise..."
+ continue
+ fi
fi
chown root "$file"
[[ ! -L "${file}" ]] && chmod "$s" "$file"
@@ -1144,10 +1142,12 @@ dyn_install() {
count=0
find "${D}/" -group portage | while read file; do
count=$(( $count + 1 ))
- [[ ! -L "${file}" ]] && s=$(stat_perms "$file")
- if [ -z "${s}" ]; then
- echo "failed stat_perm'ing '$file' . User intervention during install isn't wise..."
- continue
+ if [ ! -L "${file}" ]; then
+ s=$(stat_perms "$file")
+ if [ -z "${s}" ]; then
+ echo "failed stat_perm'ing '$file' . User intervention during install isn't wise..."
+ continue
+ fi
fi
chgrp 0 "${file}"
[[ ! -L "${file}" ]] && chmod "$s" "$file"
diff --git a/bin/emerge b/bin/emerge
index 987c37df..e749b535 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1114,7 +1114,7 @@ class depgraph:
if not self.mysd:
return (0,myfavorites)
elif not "--oneshot" in myopts:
- myfavorites.append(mykey)
+ myfavorites.append(portage.dep_getkey(mykey))
missing=0
if "--usepkgonly" in myopts:
diff --git a/pym/portage.py b/pym/portage.py
index f986e281..d264ef68 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2530,19 +2530,19 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
os.makedirs(mysettings["CCACHE_DIR"])
mystat = os.stat(mysettings["CCACHE_DIR"])
if ("userpriv" in features):
- if mystat[stat.ST_UID] != portage_gid or ((mystat[stat.ST_MODE]&02070)!=02070):
+ if mystat[stat.ST_UID] != portage_uid or ((mystat[stat.ST_MODE]&02070)!=02070):
writemsg("* Adjusting permissions on ccache in %s\n" % mysettings["CCACHE_DIR"])
spawn("chgrp -R "+str(portage_gid)+" "+mysettings["CCACHE_DIR"], mysettings, free=1)
spawn("chown "+str(portage_uid)+":"+str(portage_gid)+" "+mysettings["CCACHE_DIR"], mysettings, free=1)
spawn("chmod -R ug+rw "+mysettings["CCACHE_DIR"], mysettings, free=1)
- spawn("find "+mysettings["CCACHE_DIR"]+" -type d -exec chmod g+s \{\} \;", mysettings, free=1)
+ spawn("find "+mysettings["CCACHE_DIR"]+" -type d -exec chmod g+xs \{\} \;", mysettings, free=1)
else:
if mystat[stat.ST_UID] != 0 or ((mystat[stat.ST_MODE]&02070)!=02070):
writemsg("* Adjusting permissions on ccache in %s\n" % mysettings["CCACHE_DIR"])
spawn("chgrp -R "+str(portage_gid)+" "+mysettings["CCACHE_DIR"], mysettings, free=1)
spawn("chown 0:"+str(portage_gid)+" "+mysettings["CCACHE_DIR"], mysettings, free=1)
spawn("chmod -R ug+rw "+mysettings["CCACHE_DIR"], mysettings, free=1)
- spawn("find "+mysettings["CCACHE_DIR"]+" -type d -exec chmod g+s \{\} \;", mysettings, free=1)
+ spawn("find "+mysettings["CCACHE_DIR"]+" -type d -exec chmod g+xs \{\} \;", mysettings, free=1)
except OSError, e:
print "!!! File system problem. (ReadOnly? Out of space?)"
print "!!! Perhaps: rm -Rf",mysettings["BUILD_PREFIX"]
@@ -2872,7 +2872,10 @@ def movefile(src,dest,newmtime=None,sstat=None,mysettings=None):
return None # failure
try:
if didcopy:
- lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
+ if stat.S_ISLNK(sstat[stat.ST_MODE]):
+ lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
+ else
+ os.chown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
os.unlink(src)
except SystemExit, e:
@@ -6745,7 +6748,7 @@ class dblink:
if bsd_chflags:
bsd_chflags.lchflags(mydest, dflags)
os.chmod(mydest,mystat[0])
- lchown(mydest,mystat[4],mystat[5])
+ os.chown(mydest,mystat[4],mystat[5])
print ">>>",mydest+"/"
else:
#destination doesn't exist
@@ -6757,7 +6760,7 @@ class dblink:
os.chmod(mydest,mystat[0])
if bsd_chflags:
bsd_chflags.lchflags(mydest, bsd_chflags.lgetflags(mysrc))
- lchown(mydest,mystat[4],mystat[5])
+ os.chown(mydest,mystat[4],mystat[5])
print ">>>",mydest+"/"
outfile.write("dir "+myrealdest+"\n")
# recurse and merge this directory
diff --git a/pym/portage_data.py b/pym/portage_data.py
index a0f055a8..2afd0466 100644
--- a/pym/portage_data.py
+++ b/pym/portage_data.py
@@ -16,8 +16,9 @@ if ostype=="Linux" or ostype.lower().endswith("gnu"):
os.environ["XARGS"]="xargs -r"
elif ostype == "Darwin":
userland="Darwin"
- os.environ["XARGS"]="xargs"
- lchown=os.chown
+ os.environ["XARGS"]="xargs"
+ def lchown(*pos_args, **key_args):
+ pass
elif ostype in ["FreeBSD","OpenBSD"]:
userland="BSD"
os.environ["XARGS"]="xargs"
diff --git a/pym/portage_exec.py b/pym/portage_exec.py
index 18cfc0c6..8a92c7ae 100644
--- a/pym/portage_exec.py
+++ b/pym/portage_exec.py
@@ -70,7 +70,7 @@ def spawn(mycommand,env={},opt_name=None,fd_pipes=None,returnpid=False,uid=None,
if type(mycommand)==types.StringType:
mycommand=mycommand.split()
myc = mycommand[0]
- if not os.access(myc, os.X_OK):
+ if not os.path.isabs(myc) or not os.access(myc, os.X_OK):
if not path_lookup:
return None
myc = find_binary(myc)