emerge: Don't split suggestion (bug 487074)

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
Revert 'packages' profile as directory patches

This reverts commit 0c416cbb70858a5db2a1a23b2e90a95c0a1f2ea8 and
b4d8e300c04b768be7cd5c64116d6cc0453219b4.

Jorge Manuel B. S. Vicetto pointed out[0] that this is not useful. The
commits were made by me after talking to Michael Palimaka on IRC.
Apparently I did not get the full story straight, and made the commits
prematurely.

[0] https://bugs.gentoo.org/show_bug.cgi?id=282296#c14

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
Turn a traceback into a graceful error

Prior to this patch, the following would traceback:

mkdir -p /etc/portage/make.profile/packages
emerge foo

This patch turns such a traceback into an error by implementing
IsADirectory error handling.

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
emerge: Implement "--alert"

Implement "--alert" (short option "-A"), which adds a terminal bell
character ('\a') to all prompts, when it is set to True or "y". It may
be used without an option, like e.g. --ask, to mean True.

The patch refactors userquery to a class, UserQuery, to accommodate
--alert. It also adds the option to the emerge man page.

A quick example is to do 'emerge -PAc portage'.

If you have your terminal emulator set up to make '\a' into a window
manager urgency hint, move your cursor to a different window to get the
effect. 'sleep 2 && emerge' is another way to test this.

The --alert option is especially useful if you, like me, tend to fire up
a big world update when you get to the office in the morning (or night),
and then immediately change your focus to something else. If you now do
'emerge -auAD world', emerge will courteously point out when it has
finished calculating the graph, and again when it has finished emerging.

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
Revert "emerge: Implement "--alert""

This reverts commit 1a00ddf5fb089724a127c8dc72d63f10ae72abbf. It had
some furiously annoying mistakes in the commit message. Also, someone
alluded to the man page being too short. Thanks, Brian.

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
emerge: Implement "--alert"

Implement "--alert" (short option "-A"), which adds a terminal bell
character ('\a') to all prompts, when it is set to True or "y".

The patch refactors userquery to a class, UserQuery, to accommodate
--alert. It also adds the option to the emerge man page.

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
man/emerge.1: Make the --alert example more safe

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
Suggested-by:  Steve J. Long      <slong@rathaus.eclipse.co.uk>
repoman: Fix broken userquery import

Commit: 15433c52866e09967142fd2352bd7aad9ad5026f
Author: Alexander Berntsen <bernalex@gentoo.org> (Thu 08 May 2014 08:47:58 AM PDT)
Subject: emerge: Implement "--alert"
portage/emaint/module.py: Fix an indent error in get_class()

Multiple calls to get_class for the same module triggered this bug.
Thanks for triggerring it twitch153.
ebuild-helpers/xattr/install: use install-xattr

Currently bin/ebuild-helpers/xattr/install uses ${PORTAGE_BIN_PATH}/install.py
as a wrapper to coreutils' install to preserve a file's extended attributes when
installing, usually during src_install().  This is needed, for instance, when
preserving xattr based PaX flags, bug #465000.  However the python wrapper is
very slow, comment #42 of bug #465000.  A C wrapper was developed and tested,
bugs #501534 and #511984.  This patch checks for the existence of the C wrapper,
and uses it, falling back on the python wrapper only if not found, or if over-
ridden by ${PORTAGE_INSTALL_XATTR_IMPLEMENTATION}.
man/repoman: Note line inaccuracies (bug 517416)

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
repoman: Warn if virtuals depend on perl-core, bug 516428

Reported-by:   Andreas K. Hüttel  <dilfridge@gentoo.org>
Authored-by:   Andreas K. Hüttel  <dilfridge@gentoo.org>
Reviewed-by:   Alexander Berntsen <bernalex@gentoo.org>
Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
Update release notes

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
Update release notes

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
pym/_emerge/Binpkg.py: Add missing line feed to output.
bin/chpathtool.py: fix py3.2 &py3.3 test failure

The magic module for those 2 python versions do not handle byte strings correctly.
forcing the filename to str() fixes it for all pythons tested.
Move -MERGING- string to a constant.

Remove extra whitespace.
New emaint module: Merges

This emaint module scans for failed package merges and will display or
fix any failed packages found. This module also saves failed merges
found using a tracking file. Subsequent runs of the module will re-load
that info for re-display, re-emerge of those packages.  Fix typo:
-collision-detect ==> -collision-protect <Brian Dolbec>
pym/_emerge/depgrapgh.py: Fix bug 518968

Fixes commit: 1a00ddf5fb089724a127c8dc72d63f10ae72abbf
Author: Alexander Berntsen <bernalex@gentoo.org> (Thu 08 May 2014 08:47:58 AM PDT)
Subject: emerge: Implement "--alert"

self.query was not assigned using the correct UserQuery instance.
self.uq was not used by anything anywhere.  This patch consolidates it to the one initialized instance in 1 line of code.
Original bug reproduced and fixed by: Mike Gilbert <floppym@gentoo.org>
Revert incorrect commit 9351edad48523bb38b1bf651506786bdc8814f62, which broke file type detection
in chpathtool.py with Python 3 and magic module present.

>>> import magic
>>> m = magic.open(magic.MIME_TYPE)
>>> m.load()
0
>>> m.file(b"/etc/fstab")
'text/plain'
>>> m.file(str(b"/etc/fstab"))
"cannot open `b'/etc/fstab'' (No such file or directory)"