aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Rename pym→lib, for better distutils-r1 interoperabilityMichał Górny2018-07-181-397/+0
| | | | Closes: https://github.com/gentoo/portage/pull/343
* refresh many URIs in the code baseMike Frysinger2016-06-281-1/+1
| | | | | Use https where available, and update old links (like www.gentoo.org) to point to the new location.
* dispatch-conf: handle file/directory collisions (bug 256376)Zac Medico2015-05-101-14/+83
| | | | | | | | | Whenever a file/directory collision would have previously caused a problem, the colliding file or directory will now be renamed. X-Gentoo-Bug: 256376 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=256376 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* dispatch-conf: fix unicode handling (bug 545270)Zac Medico2015-04-011-3/+1
| | | | | | | | This avoids UnicodeDecodeError problems by using UTF-8 encoding regardless of the locale. X-Gentoo-Bug: 545270 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545270
* dispatch_conf: factor out _archive_copyZac Medico2015-01-121-56/+36
| | | | | | | | This eliminates 4 instances of duplicate code from the rcs_archive and file_archive functions. Suggested-by: Brian Dolbec <dolsen@gentoo.org> Acked-by: Brian Dolbec <dolsen@gentoo.org>
* dispatch-conf: avoid symlink "File exists" error (535850)Zac Medico2015-01-121-0/+24
| | | | | | | | | | | | | Since commit f17448317166bfac42dc279b8795cd581c189582, an existing symlink in /etc/config-archive could trigger a fatal "File exists" error. Handle this by removing the destination file if it exists. This was not necessary when dispatch-conf only supported regular files, since shutil.copy2 would simply overwrite the regular destination file. Fixes: f17448317166 ("dispatch-conf: symlink support for bug #485598") X-Gentoo-Bug: 535850 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=535850 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* dispatch-conf: symlink support for bug #485598Zac Medico2014-11-021-21/+136
| | | | | | | | | | | | | This includes numerous logic adjustments that are needed to support protected symlinks. The new diff_mixed function is used for diffs between arbitrary file types. For example, a diff between two symlinks looks like this: -SYM: /foo/bar -> baz +SYM: /foo/bar -> blah X-Gentoo-Bug: 485598 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=485598
* portage/dispatch_conf.py: Fix bug 512690Brian Dolbec2014-06-121-1/+2
| | | | | | This bug happened when a /etc/portage/package.* file was changed into a directory. File "/usr/lib64/portage/pym/portage/dispatch_conf.py", line 210, in file_archive_post_process os.rename(archive + '.dist.new', archive + '.dist') NotADirectoryError: [Errno 20] Not a directory: '/etc/config-archive/etc/portage/package.unmask/unmask.dist'
* Use local dispatch-conf.conf and make.globals when using Portage from ↵Arfrever Frehtes Taifersar Arahesis2014-02-051-2/+5
| | | | working copy or unpacked tarball.
* various pylint clean upsMike Frysinger2014-02-031-164/+165
| | | | Hopefully should be no functional changes here.
* Python 3.1: pass bytes to PopenZac Medico2013-06-221-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Python 3.1, it's possible to pass bytes to Popen as long as the executable has an absolute path, since otherwise we would trigger a TypeError in os._execvp (see http://bugs.python.org/issue8513). Note that Python <=3.1.3 produces the following message: TypeError: expected an object with the buffer interface Later 3.1.x releases produce a different message: TypeError: startswith first arg must be bytes or a tuple of bytes, not str The difference in messages is due to os.path.join() implementation changes, but both errors are triggered by the same underlying bug in os._execvp() which was fixed by using fsencode() in this hunk: --- a/Lib/os.py +++ b/Lib/os.py @@ -355,7 +355,11 @@ def _execvpe(file, args, env=None): return last_exc = saved_exc = None saved_tb = None - for dir in get_exec_path(env): + path_list = get_exec_path(env) + if name != 'nt': + file = fsencode(file) + path_list = map(fsencode, path_list) + for dir in path_list: fullname = path.join(dir, file)
* Add cross-prefix supportRuud Koolen2013-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch series adds support for using a portage installed in one prefix to build packages with a different prefix. The current portage has a single EPREFIX variable specifying both the prefix of the portage installation, and the prefix of the packages portage is building. This patch series splits it into two parts: the portage.const.EPREFIX variable specifying the prefix of the portage installation, used for constructing the PATH as well as the paths to files belonging to a portage installation itself rather than a target root; and the EPREFIX setting in config instances, specifying the prefix of the to-be-built packages and being used for almost everything else. The EPREFIX config setting defaults to const.EPREFIX, but can be overridden by the EPREFIX environment variable, as well as the emerge --prefix option. This allows one to install systems with different prefixes using `EPREFIX=/foo emerge @system`, though some unrelated changes need to happen elsewhere first in order to make that a reality. Ruud Koolen (3): Distinguish between portage prefix and package prefix Based GLOBAL_CONFIG_PATH and DEPCACHE_PATH on portage prefix Pick up EPREFIX environment variable
* dispatch-conf: use shlex to parse diff commandZac Medico2012-05-021-3/+7
|
* dispatch_conf: don't pass bytes for Popen cmdZac Medico2012-04-011-1/+1
| | | | This will fix bug #410417.
* dispatch_conf: emulate getstatusoutput with PopenZac Medico2012-03-311-12/+12
| | | | This will fix bug #410315.
* dispatch_conf: fix broken diffstatusoutput_lenv2.2.0_alpha92Zac Medico2012-03-181-1/+1
|
* dispatch-conf: do regex matching ourselvesMike Frysinger2012-03-101-4/+4
| | | | | | | This avoids having to pipe through multiple greps, as well as running diff multiple times on the same set of files. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Use portage.const.EPREFIX more.Zac Medico2011-12-091-2/+2
|
* dispatch-conf: substitute ${EPREFIX} archive-dirZac Medico2011-12-081-0/+5
| | | | This allows prefix installs to avoid hardcoding archive-dir.
* dispatch-conf: experimental prefix supportZac Medico2011-12-071-2/+3
|
* Use portage.subprocess_getstatusoutput() more.Zac Medico2011-07-121-5/+1
|
* dispatch-conf: restrict default archive-dir permsv2.2.0_alpha18Zac Medico2011-01-191-1/+4
| | | | | Also, add warnings about rcs and ci behavior in dispatch-conf.conf and dispatch-conf.1. This will fix bug #315603.
* dispatch-conf: suppress 'No such file' errors.Zac Medico2010-10-211-10/+13
| | | | This will fix bug #341463.
* Eliminate portage.env from baseline imports.Zac Medico2010-09-051-1/+2
|
* Ensure SystemExit is never caught.Zac Medico2010-08-261-2/+2
|
* Handle UnicodeDecodeError from subprocess.getstatusoutput() calls, reportedZac Medico2010-07-241-3/+18
| | | | with python3.1.
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Use dict.(keys|values|items)() instead of ↵Arfrever Frehtes Taifersar Arahesis2009-09-211-1/+1
| | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327
* Support print() function with Python 2 in more files.Arfrever Frehtes Taifersar Arahesis2009-09-201-0/+2
| | | | svn path=/main/trunk/; revision=14295
* Update system imports for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-2/+6
| | | | svn path=/main/trunk/; revision=14294
* Update syntax of calls to print() for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-11/+11
| | | | | | (2to3-3.1 -f print -nw ${FILES}) svn path=/main/trunk/; revision=14290
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-4/+4
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Use KeyValuePairFileLoader intead on getconfig(), since getconfig() is tooZac Medico2009-08-291-5/+9
| | | | | | strict about variable names now. svn path=/main/trunk/; revision=14169
* Use st_* attributes instead of the stat module.Zac Medico2009-08-181-5/+4
| | | | svn path=/main/trunk/; revision=14082
* Prepare 308 messages to localization.Arfrever Frehtes Taifersar Arahesis2009-08-151-11/+12
| | | | svn path=/main/trunk/; revision=14067
* Py3k compatibility patch #1 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-011-1/+1
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators.. svn path=/main/trunk/; revision=10870
* Bug #74615 - Quote all file paths inside dispatch-conf shell commands.Zac Medico2007-09-241-4/+4
| | | | svn path=/main/trunk/; revision=7803
* Revert r6967 since shutil.move() is broken internally.Zac Medico2007-06-231-7/+7
| | | | svn path=/main/trunk/; revision=6970
* For bug #182964, replace os.rename() with shutil.move() in order to handle ↵Zac Medico2007-06-231-7/+7
| | | | | | EXDEV errors that are triggered by layered filesystems. svn path=/main/trunk/; revision=6967
* Namespace sanitizing, step 1Marius Mauch2007-01-251-0/+161
svn path=/main/trunk/; revision=5778