* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/
@ 2011-03-11 21:02 Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-03-11 21:02 UTC (permalink / raw
To: gentoo-commits
commit: 83e677766650e73071813c0d46547647e5f66029
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 11 21:02:31 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 11 21:02:31 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=83e67776
Make all temp dirs under $PORTAGE_TMPDIR/portage.
Before, some temporary directories would be created directly in
$PORTAGE_TMPDIR. Now, all are subdirectories of $PORTAGE_TMPDIR/portage
since it's common for people to assume that this is the case anyway.
With the default PORTAGE_TMPDIR setting of /var/tmp, this allows
/var/tmp to be mounted with the "noexec" option, as long as the
/var/tmp/portage subdirectory is a separate mount (people have already
tended to assume that they can do this, so we're making it a reality
in order to avoid any more bug reports). This will fix bug #346899.
---
pym/portage/dbapi/vartree.py | 18 +++++++++---------
pym/portage/package/ebuild/doebuild.py | 7 +++++--
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 376b382..32b4852 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3865,15 +3865,15 @@ class dblink(object):
# so imports won't fail during portage upgrade/downgrade.
portage.proxy.lazyimport._preload_portage_submodules()
settings = self.settings
- base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"])
- from tempfile import mkdtemp
-
- # Make the temp directory inside PORTAGE_TMPDIR since, unlike
- # /tmp, it can't be mounted with the "noexec" option.
- base_path_tmp = mkdtemp("", "._portage_reinstall_.",
- settings["PORTAGE_TMPDIR"])
- from portage.process import atexit_register
- atexit_register(shutil.rmtree, base_path_tmp)
+
+ # Make the temp directory inside $PORTAGE_TMPDIR/portage, since
+ # it's common for /tmp and /var/tmp to be mounted with the
+ # "noexec" option (see bug #346899).
+ build_prefix = os.path.join(settings["PORTAGE_TMPDIR"], "portage")
+ ensure_dirs(build_prefix)
+ base_path_tmp = tempfile.mkdtemp(
+ "", "._portage_reinstall_.", build_prefix)
+ portage.process.atexit_register(shutil.rmtree, base_path_tmp)
dir_perms = 0o755
for subdir in "bin", "pym":
var_name = "PORTAGE_%s_PATH" % subdir.upper()
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 5272f23..3d03171 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -281,9 +281,12 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
if portage_bin_path not in mysplit:
mysettings["PATH"] = portage_bin_path + ":" + mysettings["PATH"]
+ # All temporary directories should be subdirectories of
+ # $PORTAGE_TMPDIR/portage, since it's common for /tmp and /var/tmp
+ # to be mounted with the "noexec" option (see bug #346899).
mysettings["BUILD_PREFIX"] = mysettings["PORTAGE_TMPDIR"]+"/portage"
- mysettings["PKG_TMPDIR"] = mysettings["PORTAGE_TMPDIR"]+"/binpkgs"
-
+ mysettings["PKG_TMPDIR"] = mysettings["BUILD_PREFIX"]+"/._unmerge_"
+
# Package {pre,post}inst and {pre,post}rm may overlap, so they must have separate
# locations in order to prevent interference.
if mydo in ("unmerge", "prerm", "postrm", "cleanrm"):
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/
@ 2011-06-05 0:10 Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-06-05 0:10 UTC (permalink / raw
To: gentoo-commits
commit: 70c1c399615ae3a2ed15d1684a99f32126305d15
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 5 00:08:08 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jun 5 00:08:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=70c1c399
Uniformly check EAPI when avoiding setcpv calls.
---
pym/portage/dbapi/_MergeProcess.py | 2 +-
pym/portage/dbapi/vartree.py | 2 +-
pym/portage/package/ebuild/doebuild.py | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index 78e1ecd..3b9ad82 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -41,7 +41,7 @@ class MergeProcess(SpawnProcess):
cpv = "%s/%s" % (self.mycat, self.mypkg)
settings = self.settings
if cpv != settings.mycpv or \
- "IUSE" not in settings.configdict["pkg"]:
+ "EAPI" not in settings.configdict["pkg"]:
settings.reload()
settings.reset()
settings.setcpv(cpv, mydb=self.mydbapi)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 16cf48b..5c6166c 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1676,7 +1676,7 @@ class dblink(object):
break
if self.mycpv != self.settings.mycpv or \
- "SLOT" not in self.settings.configdict["pkg"]:
+ "EAPI" not in self.settings.configdict["pkg"]:
# We avoid a redundant setcpv call here when
# the caller has already taken care of it.
self.settings.setcpv(self.mycpv, mydb=self.vartree.dbapi)
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4cdd765..5c81fbd 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -167,12 +167,12 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
# call would lead to infinite 'depend' phase recursion.
mysettings.setcpv(mycpv)
else:
- # If IUSE isn't in configdict['pkg'], it means that setcpv()
+ # If EAPI isn't in configdict["pkg"], it means that setcpv()
# hasn't been called with the mydb argument, so we have to
# call it here (portage code always calls setcpv properly,
# but api consumers might not).
if mycpv != mysettings.mycpv or \
- 'IUSE' not in mysettings.configdict['pkg']:
+ "EAPI" not in mysettings.configdict["pkg"]:
# Reload env.d variables and reset any previous settings.
mysettings.reload()
mysettings.reset()
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/
@ 2012-03-17 21:56 Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2012-03-17 21:56 UTC (permalink / raw
To: gentoo-commits
commit: 141408ea103bb3217a9204577a26d4c0724401ad
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 17 21:56:37 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar 17 21:56:37 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=141408ea
Use eqawarn for install of non UTF-8 file names.
This will fix bug #406749.
---
pym/portage/dbapi/vartree.py | 3 ++-
pym/portage/package/ebuild/doebuild.py | 18 +++---------------
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 6d354af..f1e74ae 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3581,7 +3581,8 @@ class dblink(object):
break
if unicode_errors:
- eerror(_merge_unicode_error(unicode_errors))
+ self._elog("eqawarn", "preinst",
+ _merge_unicode_error(unicode_errors))
if paths_with_newlines:
msg = []
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4ff3eea..5d2586b 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1805,7 +1805,7 @@ def _post_src_install_uid_fix(mysettings, out):
if unicode_errors:
for l in _merge_unicode_error(unicode_errors):
- eerror(l, phase='install', key=mysettings.mycpv, out=out)
+ eqawarn(l, phase='install', key=mysettings.mycpv, out=out)
build_info_dir = os.path.join(mysettings['PORTAGE_BUILDDIR'],
'build-info')
@@ -2006,10 +2006,8 @@ def _post_src_install_soname_symlinks(mysettings, out):
def _merge_unicode_error(errors):
lines = []
- msg = _("This package installs one or more file names containing "
- "characters that do not match your current locale "
- "settings. The current setting for filesystem encoding is '%s'.") \
- % _encodings['merge']
+ msg = _("QA Notice: This package installs one or more file names "
+ "containing characters that are not encoded with the UTF-8 encoding.")
lines.extend(wrap(msg, 72))
lines.append("")
@@ -2017,16 +2015,6 @@ def _merge_unicode_error(errors):
lines.extend("\t" + x for x in errors)
lines.append("")
- if _encodings['merge'].lower().replace('_', '').replace('-', '') != 'utf8':
- msg = _("For best results, UTF-8 encoding is recommended. See "
- "the Gentoo Linux Localization Guide for instructions "
- "about how to configure your locale for UTF-8 encoding:")
- lines.extend(wrap(msg, 72))
- lines.append("")
- lines.append("\t" + \
- "http://www.gentoo.org/doc/en/guide-localization.xml")
- lines.append("")
-
return lines
def _prepare_self_update(settings):
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/
@ 2012-03-17 22:11 Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2012-03-17 22:11 UTC (permalink / raw
To: gentoo-commits
commit: 5a12bcd48f209002c654d72fe3ad7c000ff5eddf
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 17 22:11:47 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar 17 22:11:47 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5a12bcd4
Omit EPREFIX from paths in unicode QA Notice.
---
pym/portage/dbapi/vartree.py | 7 ++++---
pym/portage/package/ebuild/doebuild.py | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index f1e74ae..4811e60 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3498,6 +3498,8 @@ class dblink(object):
# inexpensive since we call os.walk() here anyway).
unicode_errors = []
line_ending_re = re.compile('[\n\r]')
+ srcroot_len = len(srcroot)
+ ed_len = len(self.settings["ED"])
while True:
@@ -3507,7 +3509,6 @@ class dblink(object):
myfilelist = []
mylinklist = []
paths_with_newlines = []
- srcroot_len = len(srcroot)
def onerror(e):
raise
walk_iter = os.walk(srcroot, onerror=onerror)
@@ -3535,7 +3536,7 @@ class dblink(object):
encoding=_encodings['merge'], errors='replace')
os.rename(parent, new_parent)
unicode_error = True
- unicode_errors.append(new_parent[srcroot_len:])
+ unicode_errors.append(new_parent[ed_len:])
break
for fname in files:
@@ -3554,7 +3555,7 @@ class dblink(object):
new_fpath = os.path.join(parent, new_fname)
os.rename(fpath, new_fpath)
unicode_error = True
- unicode_errors.append(new_fpath[srcroot_len:])
+ unicode_errors.append(new_fpath[ed_len:])
fname = new_fname
fpath = new_fpath
else:
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 5d2586b..31ecf8c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1689,6 +1689,7 @@ def _post_src_install_uid_fix(mysettings, out):
_preinst_bsdflags(mysettings)
destdir = mysettings["D"]
+ ed_len = len(mysettings["ED"])
unicode_errors = []
while True:
@@ -1712,7 +1713,7 @@ def _post_src_install_uid_fix(mysettings, out):
encoding=_encodings['merge'], errors='replace')
os.rename(parent, new_parent)
unicode_error = True
- unicode_errors.append(new_parent[len(destdir):])
+ unicode_errors.append(new_parent[ed_len:])
break
for fname in chain(dirs, files):
@@ -1731,7 +1732,7 @@ def _post_src_install_uid_fix(mysettings, out):
new_fpath = os.path.join(parent, new_fname)
os.rename(fpath, new_fpath)
unicode_error = True
- unicode_errors.append(new_fpath[len(destdir):])
+ unicode_errors.append(new_fpath[ed_len:])
fname = new_fname
fpath = new_fpath
else:
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/
@ 2013-03-19 20:10 Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2013-03-19 20:10 UTC (permalink / raw
To: gentoo-commits
commit: 273b785644b859b9f54600ec572641a308cf7292
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 19 20:10:28 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Mar 19 20:10:28 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=273b7856
config: make circular vartree import lazy
---
pym/portage/dbapi/vartree.py | 3 +--
pym/portage/package/ebuild/config.py | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 77220bb..9bc6e89 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3597,11 +3597,10 @@ class dblink(object):
slot_matches.append(self.mycpv)
others_in_slot = []
- from portage import config
for cur_cpv in slot_matches:
# Clone the config in case one of these has to be unmerged since
# we need it to have private ${T} etc... for things like elog.
- settings_clone = config(clone=self.settings)
+ settings_clone = portage.config(clone=self.settings)
settings_clone.pop("PORTAGE_BUILDDIR_LOCKED", None)
settings_clone.reset()
others_in_slot.append(dblink(self.cat, catsplit(cur_cpv)[1],
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 2ac59f0..5f3e1c6 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -21,6 +21,7 @@ from _emerge.Package import Package
import portage
portage.proxy.lazyimport.lazyimport(globals(),
'portage.data:portage_gid',
+ 'portage.dbapi.vartree:vartree',
'portage.package.ebuild.doebuild:_phase_func_map',
)
from portage import bsd_chflags, \
@@ -32,7 +33,6 @@ from portage.const import CACHE_PATH, \
USER_VIRTUALS_FILE
from portage.dbapi import dbapi
from portage.dbapi.porttree import portdbapi
-from portage.dbapi.vartree import vartree
from portage.dep import Atom, isvalidatom, match_from_list, use_reduce, _repo_separator, _slot_separator
from portage.eapi import eapi_exports_AA, eapi_exports_merge_type, \
eapi_supports_prefix, eapi_exports_replace_vars, _get_eapi_attrs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/
@ 2013-05-24 0:06 Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2013-05-24 0:06 UTC (permalink / raw
To: gentoo-commits
commit: 9abb6fae60fa7700d8aa900f1cc2730581d84279
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 00:06:32 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May 24 00:06:32 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9abb6fae
fetch: correctly handle file name without scheme
Before, the file name would be passed directly to FETCHCOMMAND as
though it were a valid URI. Now, FETCHCOMMAND will only be called when
there is a valid URI or a mirror to try.
---
pym/portage/dbapi/porttree.py | 11 ++++++++++-
pym/portage/package/ebuild/fetch.py | 13 ++++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 77f633f..a2082a3 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -44,6 +44,11 @@ import sys
import traceback
import warnings
+try:
+ from urllib.parse import urlparse
+except ImportError:
+ from urlparse import urlparse
+
if sys.hexversion >= 0x3000000:
basestring = str
long = int
@@ -1164,7 +1169,11 @@ def _parse_uri_map(cpv, metadata, use=None):
# while ensuring uniqueness.
uri_set = OrderedDict()
uri_map[distfile] = uri_set
- uri_set[uri] = True
+
+ # SRC_URI may contain a file name with no scheme, and in
+ # this case it does not belong in uri_set.
+ if urlparse(uri).scheme:
+ uri_set[uri] = True
# Convert OrderedDicts to tuples.
for k, v in uri_map.items():
diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 162c7c2..50a1b72 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -14,6 +14,10 @@ import stat
import sys
import tempfile
+try:
+ from urllib.parse import urlparse
+except ImportError:
+ from urlparse import urlparse
import portage
portage.proxy.lazyimport.lazyimport(globals(),
@@ -402,9 +406,14 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
for myfile, uri_set in myuris.items():
for myuri in uri_set:
file_uri_tuples.append((myfile, myuri))
+ if not uri_set:
+ file_uri_tuples.append((myfile, None))
else:
for myuri in myuris:
- file_uri_tuples.append((os.path.basename(myuri), myuri))
+ if urlparse(myuri).scheme:
+ file_uri_tuples.append((os.path.basename(myuri), myuri))
+ else:
+ file_uri_tuples.append((os.path.basename(myuri), None))
filedict = OrderedDict()
primaryuri_dict = {}
@@ -414,6 +423,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
filedict[myfile]=[]
for y in range(0,len(locations)):
filedict[myfile].append(locations[y]+"/distfiles/"+myfile)
+ if myuri is None:
+ continue
if myuri[:9]=="mirror://":
eidx = myuri.find("/", 9)
if eidx != -1:
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-24 0:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19 20:10 [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2013-05-24 0:06 Zac Medico
2012-03-17 22:11 Zac Medico
2012-03-17 21:56 Zac Medico
2011-06-05 0:10 Zac Medico
2011-03-11 21:02 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox