aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2014-11-12 18:31:07 +0100
committerFabian Groffen <grobian@gentoo.org>2014-11-12 18:31:07 +0100
commitd46094a93302301accbce53621efd89dad45a47f (patch)
tree5b5de7b976b5fe8348db20d4b548fe34c8c2cad5
parentFEATURES=case-insensitive-fs for bug #524236 (diff)
parentUpdate version for the release (diff)
downloadportage-d46094a93302301accbce53621efd89dad45a47f.tar.gz
portage-d46094a93302301accbce53621efd89dad45a47f.tar.bz2
portage-d46094a93302301accbce53621efd89dad45a47f.zip
Merge tag 'v2.2.14' into prefix
Conflicts: bin/ebuild-helpers/portageq
-rw-r--r--NEWS9
-rw-r--r--RELEASE-NOTES36
-rwxr-xr-xbin/ebuild-helpers/portageq20
-rwxr-xr-xbin/ebuild-ipc.py64
-rw-r--r--bin/install-qa-check.d/90gcc-warnings4
-rw-r--r--man/emerge.14
-rwxr-xr-xmisc/emerge-delta-webrsync2
-rw-r--r--pym/_emerge/main.py2
-rw-r--r--pym/portage/dbapi/vartree.py32
-rw-r--r--pym/portage/tests/emerge/test_simple.py19
-rwxr-xr-xsetup.py4
11 files changed, 168 insertions, 28 deletions
diff --git a/NEWS b/NEWS
index 0a02907c1..84a592843 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,14 @@
News (mainly features/major bug fixes)
+portage-2.2.14
+-------------
+* Remaining bugs in build/install system should be fixed.
+
+
+portge-2.2.14_rc1
+-------------
+* Many new build/installation system errors fixed.
+
portage-2.2.13
-------------
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 7a46612d5..899b48ab4 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,6 +1,42 @@
Release Notes; upgrade information mainly.
Features/major bugfixes are listed in NEWS
+portage-2.2.14
+==================================
+* Bug Fixes:
+ - Bug # 508364 Tweak the previous patch commit for the comma warning.
+ - Bug # 524964 $PORTAGE_BIN_PATH/portageq no longer exists, which breaks
+ bin/ebuild-helpers/portageq.
+ - Bug # 524328 Use nonblocking write instead of a fork for writing to
+ the fifo.
+ - Bug # 523684 If a CONFIG_PROTECTed file was installed but no longer
+ exists in the file system, then it may have been deleted or renamed
+ by the admin.
+ - Bug # 506192 This fixes the sync_local function so that it doesn't
+ prematurely remove the whole TMPDIR when tarsync is not installed.
+ - Bug # <no number> setup.py: Fix typo in logrotatedir path.
+
+
+portage-2.2.14_rc1
+==================================
+* Bug Fixes:
+ - Bug # 508364 Update gcc warning checks.
+ - Bug # 523182 Rewrite default ebuild phase setting code
+ - Bug # 517310 Offer to read news while calcing deps
+ - Bug # 481578 emerge: --autounmask-write if --ask
+ - Bug # 523494 Use PATH instead of PORTAGE_BIN_PATH to locate emerge.
+ - Bug # 523532 This fixes depth increment to handle _UNREACHABLE_DEPTH.
+ - Bug # 523152 This fixes the unmerge-backup and downgrade-backup features
+ to be compatible with the new setup.py quickpkg install location...
+ - Bug # 522084 Fix _solve_non_slot_operator_slot_conflicts to add all
+ parents to the conflict_graph...
+ - Bug # 523048 This fixes _backtrack_depgraph to immediately report
+ necessary REQUIRED_USE changes instead of discarding the graph.
+ - Bug # 521990 Since self._dynamic_config._slot_operator_deps only contains
+ deps for packages added to the graph, it doesn't contain potentially
+ relevant deps of installed packages that have not been added to the graph.
+
+
portage-2.2.13
==================================
* Bug Fixes:
diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index 2c7c42895..935f548a2 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -2,9 +2,25 @@
# Copyright 2009-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+scriptpath=${BASH_SOURCE[0]}
+scriptname=${scriptpath##*/}
+
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
# Use safe cwd, avoiding unsafe import for bug #469338.
cd "${PORTAGE_PYM_PATH}"
-PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
- exec "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/portageq" "$@"
+
+IFS=':'
+set -f # in case ${PATH} contains any shell glob characters
+
+for path in ${PATH}; do
+ [[ -x ${path}/${scriptname} ]] || continue
+ [[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
+ PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
+ exec "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" \
+ "${path}/${scriptname}" "$@"
+done
+
+unset IFS
+echo "${scriptname}: command not found" 1>&2
+exit 127
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index 5a702417e..66e70e67c 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -5,6 +5,7 @@
# This is a helper which ebuild processes can use
# to communicate with portage's main python process.
+import errno
import logging
import os
import pickle
@@ -44,19 +45,66 @@ import portage
portage._internal_caller = True
portage._disable_legacy_globals()
-from portage.util._async.ForkProcess import ForkProcess
from portage.util._eventloop.global_event_loop import global_event_loop
+from _emerge.AbstractPollTask import AbstractPollTask
from _emerge.PipeReader import PipeReader
-class FifoWriter(ForkProcess):
+RETURNCODE_WRITE_FAILED = 2
- __slots__ = ('buf', 'fifo',)
+class FifoWriter(AbstractPollTask):
- def _run(self):
- # Atomically write the whole buffer into the fifo.
- with open(self.fifo, 'wb', 0) as f:
- f.write(self.buf)
- return os.EX_OK
+ __slots__ = ('buf', 'fifo', '_fd', '_reg_id',)
+
+ def _start(self):
+ try:
+ self._fd = os.open(self.fifo, os.O_WRONLY|os.O_NONBLOCK)
+ except OSError as e:
+ if e.errno == errno.ENXIO:
+ # This happens if the daemon has been killed.
+ self.returncode = RETURNCODE_WRITE_FAILED
+ self._unregister()
+ self._async_wait()
+ return
+ else:
+ raise
+ self._reg_id = self.scheduler.io_add_watch(
+ self._fd,
+ self.scheduler.IO_OUT | self.scheduler.IO_HUP | \
+ self._exceptional_events, self._output_handler)
+ self._registered = True
+
+ def _output_handler(self, fd, event):
+ if event & self.scheduler.IO_OUT:
+ # The whole buf should be able to fit in the fifo with
+ # a single write call, so there's no valid reason for
+ # os.write to raise EAGAIN here.
+ buf = self.buf
+ while buf:
+ buf = buf[os.write(fd, buf):]
+ self.returncode = os.EX_OK
+ self._unregister()
+ self.wait()
+ return False
+ else:
+ self._unregister_if_appropriate(event)
+ if not self._registered:
+ self.returncode = RETURNCODE_WRITE_FAILED
+ self.wait()
+ return False
+ return True
+
+ def _cancel(self):
+ self.returncode = self._cancelled_returncode
+ self._unregister()
+
+ def _unregister(self):
+ self._registered = False
+ if self._reg_id is not None:
+ self.scheduler.source_remove(self._reg_id)
+ self._reg_id = None
+ if self._fd is not None:
+ os.close(self._fd)
+ self._fd = None
class EbuildIpc(object):
diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index 9703c39de..b18651ece 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -35,8 +35,8 @@ gcc_warn_check() {
'warning: .*will always overflow destination buffer'
'warning: .*assuming pointer wraparound does not occur'
'warning: .*escape sequence out of range'
- # left/right-hand operand of comma expression has no effect
- 'warning: .*comma.*\[-Wunused-value\]'
+ # left-hand operand of comma expression has no effect
+ 'warning: .*left.*comma.*\[-Wunused-value\]'
# converting to non-pointer type ... from NULL and likes
'warning: .*\[-Wconversion-null\]'
# NULL used in arithmetic
diff --git a/man/emerge.1 b/man/emerge.1
index c9c57214a..1429767d6 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "Sep 2014" "Portage VERSION" "Portage"
+.TH "EMERGE" "1" "Oct 2014" "Portage VERSION" "Portage"
.SH "NAME"
emerge \- Command\-line interface to the Portage system
.SH "SYNOPSIS"
@@ -399,7 +399,7 @@ Creates binary packages for all ebuilds processed without actually
merging the packages. This comes with the caveat that all build-time
dependencies must already be emerged on the system.
.TP
-.BR "\-\-changed\-use"
+.BR "\-\-changed\-use " (\fB\-U\fR)
Tells emerge to include installed packages where USE flags have
changed since installation. This option also implies the
\fB\-\-selective\fR option. Unlike \fB\-\-newuse\fR, the
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 3ecfc7ff0..4435c71a9 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -333,7 +333,7 @@ sync_local() {
cd "${DISTDIR}"
__vecho "Cleaning up ..."
- rm -fr "${TMPDIR}"
+ rm -fr "${TMPDIR}"/portage
fi
if has metadata-transfer ${FEATURES} ; then
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 567cf29ad..a5de7c349 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -70,7 +70,7 @@ shortmapping={
"r":"--resume",
"s":"--search", "S":"--searchdesc",
"t":"--tree",
-"u":"--update",
+"u":"--update", "U":"--changed-use",
"V":"--version"
}
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index f7823b357..a0881a25d 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -4740,10 +4740,7 @@ class dblink(object):
zing = "!!!"
mymtime = None
protected = self.isprotected(mydest)
- if mydmode != None:
- # destination file exists
-
- if stat.S_ISDIR(mydmode):
+ if mydmode is not None and stat.S_ISDIR(mydmode):
# install of destination is blocked by an existing directory with the same name
newdest = self._new_backup_path(mydest)
msg = []
@@ -4756,12 +4753,15 @@ class dblink(object):
self._eerror("preinst", msg)
mydest = newdest
- elif stat.S_ISREG(mydmode) or (stat.S_ISLNK(mydmode) and os.path.exists(mydest) and stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])):
+ elif mydmode is None or stat.S_ISREG(mydmode) or \
+ (stat.S_ISLNK(mydmode) and os.path.exists(mydest)
+ and stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])):
# install of destination is blocked by an existing regular file,
# or by a symlink to an existing regular file;
# now, config file management may come into play.
# we only need to tweak mydest if cfg file management is in play.
- if protected:
+ destmd5 = None
+ if protected and mydmode is not None:
destmd5 = perform_md5(mydest, calc_prelink=calc_prelink)
if protect_if_modified:
contents_key = \
@@ -4774,7 +4774,21 @@ class dblink(object):
if protected:
# we have a protection path; enable config file management.
cfgprot = 0
- if mymd5 == destmd5:
+ cfgprot_force = False
+ if mydmode is None:
+ if self._installed_instance is not None and \
+ self._installed_instance._match_contents(
+ myrealdest) is not False:
+ # If the file doesn't exist, then it may
+ # have been deleted or renamed by the
+ # admin. Therefore, force the file to be
+ # merged with a ._cfg name, so that the
+ # admin will be prompted for this update
+ # (see bug #523684).
+ cfgprot_force = True
+ moveme = True
+ cfgprot = True
+ elif mymd5 == destmd5:
#file already in place; simply update mtimes of destination
moveme = 1
else:
@@ -4802,7 +4816,9 @@ class dblink(object):
del cfgfiledict[myrealdest]
if cfgprot:
- mydest = new_protect_filename(mydest, newmd5=mymd5)
+ mydest = new_protect_filename(mydest,
+ newmd5=mymd5,
+ force=cfgprot_force)
# whether config protection or not, we merge the new file the
# same way. Unless moveme=0 (blocking directory)
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 0bb83ae4e..6fc81abd7 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -12,7 +12,8 @@ from portage.const import (BASH_BINARY, PORTAGE_BASE_PATH,
from portage.process import find_binary
from portage.tests import TestCase
from portage.tests.resolver.ResolverPlayground import ResolverPlayground
-from portage.util import ensure_dirs
+from portage.util import (ensure_dirs, find_updated_config_files,
+ shlex_split)
class SimpleEmergeTestCase(TestCase):
@@ -42,6 +43,10 @@ src_install() {
doins "${T}"/regular-file
dosym regular-file /usr/lib/${P}/symlink || die
+ # Test CONFIG_PROTECT
+ insinto /etc
+ newins "${T}"/regular-file ${PN}-${SLOT%/*}
+
# Test code for bug #381629, using a copyright symbol encoded with latin-1.
# We use $(printf "\\xa9") rather than $'\\xa9', since printf apparently
# works in any case, while $'\\xa9' transforms to \\xef\\xbf\\xbd under
@@ -267,8 +272,18 @@ pkg_preinst() {
emerge_cmd + ("--pretend", "--depclean", "--verbose", "dev-libs/B"),
emerge_cmd + ("--pretend", "--depclean",),
emerge_cmd + ("--depclean",),
- quickpkg_cmd + ("dev-libs/A",),
+ quickpkg_cmd + ("--include-config", "y", "dev-libs/A",),
+ # Test bug #523684, where a file renamed or removed by the
+ # admin forces replacement files to be merged with config
+ # protection.
+ lambda: self.assertEqual(0,
+ len(list(find_updated_config_files(eroot,
+ shlex_split(settings["CONFIG_PROTECT"]))))),
+ lambda: os.unlink(os.path.join(eprefix, "etc", "A-0")),
emerge_cmd + ("--usepkgonly", "dev-libs/A"),
+ lambda: self.assertEqual(1,
+ len(list(find_updated_config_files(eroot,
+ shlex_split(settings["CONFIG_PROTECT"]))))),
emaint_cmd + ("--check", "all"),
emaint_cmd + ("--fix", "all"),
fixpackages_cmd,
diff --git a/setup.py b/setup.py
index 22d779056..dba853951 100755
--- a/setup.py
+++ b/setup.py
@@ -340,7 +340,7 @@ class x_install(install):
('portage_datadir', '$datarootdir/portage'),
# not customized at the moment
- ('logrotatedir', '$sysconfdir/logrotate'),
+ ('logrotatedir', '$sysconfdir/logrotate.d'),
('portage_confdir', '$portage_datadir/config'),
('portage_setsdir', '$portage_confdir/sets'),
]
@@ -598,7 +598,7 @@ def get_manpages():
setup(
name = 'portage',
- version = '2.2.14_rc1',
+ version = '2.2.14',
url = 'https://wiki.gentoo.org/wiki/Project:Portage',
author = 'Gentoo Portage Development Team',
author_email = 'dev-portage@gentoo.org',