summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updates for portage-2.3.11 releaseportage-2.3.11Zac Medico2017-10-022-1/+15
|
* want_restart_for_use_change: backtrack only if needed (bug 632598)Zac Medico2017-10-022-4/+95
| | | | | | | | | | | Only backtrack if changes break a USE dependency. Prior to this fix, the included test case succeeded only with a --backtrack setting of 3 or more, but now it succeeds with a --backtrack setting of 2. X-Gentoo-bug: 632598 X-Gentoo-bug-url: https://bugs.gentoo.org/632598 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* postinst-qa-check.d/50xdg-utils: local all_files (bug 632696)Zac Medico2017-10-021-2/+2
| | | | | | Fixes: c4edb9ca3a6c ("postinst-qa-check.d: fix [[ ${files[@]} ]] logic in for loops") X-Gentoo-bug: 632696 X-Gentoo-bug-url: https://bugs.gentoo.org/632696
* postinst-qa-check.d: Skip checks if required tools are missingMichał Górny2017-10-022-0/+6
| | | | | Closes: https://bugs.gentoo.org/631820 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* _solve_..slot_conflicts: handle forced reinstall (bug 632202)Zac Medico2017-09-291-1/+2
| | | | | | | | | | Fix the slot conflict solver to use the _want_installed_pkg method to identify installed packages that are intended to be reinstalled for some reason (such as @preserved-rebuild). X-Gentoo-bug: 632202 X-Gentoo-bug-url: https://bugs.gentoo.org/632202 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* _solve_..slot_conflicts: make "forced" set recursive (bug 632210)Zac Medico2017-09-292-1/+14
| | | | | | | | | | | | | | | When the slot conflict solver decides that it is "forced" to choose a particular package, recursively force the dependencies as well. Prior to this fix, substitution of @world in the arguments for SlotConflictMaskUpdateTestCase caused the test to fail because the solver removed boost-build-1.53.0 from the graph event though it had added the parent boost-1.53.0 package to the "forced" set. X-Gentoo-bug: 632210 X-Gentoo-bug-url: https://bugs.gentoo.org/632210 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* search: only pass Atom instance to dbapi match methodsZac Medico2017-09-241-1/+7
| | | | | | | | | | | | | | | | | | This fixes errors like the following: File "_emerge/depgraph.py", line 3972, in _select_files self._frozen_config.spinner, self._frozen_config.myopts) File "_emerge/depgraph.py", line 9474, in ambiguous_package_name s.output() File "_emerge/search.py", line 469, in output self.getInstallationStatus(mycat+'/'+mypkg)) File "_emerge/search.py", line 494, in getInstallationStatus installed_package = self._vardb.match(package) File "_emerge/FakeVartree.py", line 111, in _match_wrapper matches = self._match(cpv, use_cache=use_cache) File "_emerge/resolver/DbapiProvidesIndex.py", line 39, in match if atom.soname: AttributeError: 'str' object has no attribute 'soname'
* depgraph: make _minimize_children deterministic (bug 631894)Zac Medico2017-09-241-0/+9
| | | | | | | | | | | In order for the eliminate_pkg loop to produce deterministic results, the order of the pkgs list must not be random. Prefer to eliminate installed packages first, in case rebuilds are needed, and also sort in ascending order so that older versions are eliminated first. X-Gentoo-bug: 631894 X-Gentoo-bug-url: https://bugs.gentoo.org/631894 Reviewed-by: Manuel Rüger <mrueg@gentoo.org>
* postinst-qa-check.d: remove redundant local vars and obsolete commentsZac Medico2017-09-202-9/+3
| | | | | Fixes: c4edb9ca3a6c ("postinst-qa-check.d: fix [[ ${files[@]} ]] logic in for loops") Reported-by: Michał Górny <mgorny@gentoo.org>
* gnome2-utils postinst: fix ${missing} variable referenceZac Medico2017-09-191-1/+1
| | | | Fixes: 361f820b88de ("postinst-qa-check.d: fix false positive and expensive eqatag on first run")
* Updates for portage-2.3.10 releaseportage-2.3.10Zac Medico2017-09-192-1/+8
|
* postinst-qa-check.d: fix false positive and expensive eqatag on first runZac Medico2017-09-192-9/+15
| | | | | | | | | When caches were missing, calls to eqatag could be prohibitively expensive when a large number of files where found. Those files did not necessaryily belong to the current package, so it was also a false positive. Bug: https://bugs.gentoo.org/631454
* postinst-qa-check.d: fix [[ ${files[@]} ]] logic in for loopsZac Medico2017-09-192-10/+13
| | | | | | Use a separate all_files array to accumulate the results from all loops, so that [[ ${files[@]} ]] only checks for files found during the current loop.
* Updates for portage-2.3.9 releaseportage-2.3.9Zac Medico2017-09-192-1/+13
|
* misc-functions.sh: Fix 'within' typo in commentR0b0t12017-09-181-1/+1
| | | | Closes: https://github.com/gentoo/portage/pull/206
* Fix emerge --info when using webrsync (bug 630538)Nicolas Porcel2017-09-171-4/+4
| | | | | | | | When calling retrieve_head from a SyncBase object, it is expected to raise a NotImplementedError. However, all classes that do not inherit from NewBase will raise an AttributeError which is not caught. Fixes: 0e1699ad6b3f ("emerge: Add head commit per repo to --info")
* AsynchronousLock: allow missing dummy_threading for Python 3.7Zac Medico2017-09-112-2/+12
| | | | | | | | | Python 3.7 does not support thread-less builds. Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> See: https://bugs.python.org/issue31370 X-Gentoo-bug: 630730 X-Gentoo-bug-url: https://bugs.gentoo.org/630730
* ebuild.sh: Completely ban external commands in global scopeMichał Górny2017-09-112-1/+9
| | | | | | | | | | Set PATH to /dev/null when sourcing the ebuild for dependency resolution in order to prevent shell from finding external commands via PATH lookup. While this does not prevent executing programs via full path, it should catch the majority of accidental uses. Closes: https://github.com/gentoo/portage/pull/199 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* repoman: Update --bug/--closes description for bugs.g.o hooksMichał Górny2017-09-111-2/+11
| | | | | | | | | Update the description for --bug and --closes to account for the fact that the tags are now handled by git hooks on Gentoo Infra, and cause actions on Gentoo Bugzilla. Closes: https://github.com/gentoo/portage/pull/203 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* repoman: Unify usage of --bug and --closes optionsMichał Górny2017-09-112-16/+8
| | | | | | | | | | | | | | | | | | Replace the different logic used for --bug and --closes options with a uniform solution. As a result, --closes now interprets numbers as Gentoo bug numbers rather than GitHub pull request numbers. This change is mostly done since the 'Closes' tag now started being used to resolve Gentoo bugs. While changing the logic could be confusing, it has not made it into a release yet and the GitHub default would not be very useful anyway. After all, repoman is normally used to commit the changes before a pull request is created, which implies that the user does not know the pull request number yet. The 'Closes' tag for pull request is usually added by the reviewer before merging, using 'git --amend' since repoman has no amending option. That considered, it is quite unlikely that anyone would find --closes with pull request numbers useful.
* Do not enable optimizations by default to work-around pycparser issueMichał Górny2017-09-027-7/+7
| | | | | | | | | | | | | | dev-python/pycparser-2.18+ exposes a design flaw in dev-python/ply that makes it unable to work with -OO code. Given that Gentoo compiles its Python packages with -OO and both -O and -OO use the same files for Python < 3.5, using -O in Portage implicitly means -OO for those implementations. Remove the optimizations from Portage shebangs to prevent triggering the issue until we find a proper solution for it. Bug: https://bugs.gentoo.org/628386 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* config/env_blacklist: add DOCS (bug 627106)Zac Medico2017-09-021-1/+1
| | | | | | | DOCS is used by default_src_install. X-Gentoo-bug: 627106 X-Gentoo-bug-url: https://bugs.gentoo.org/627106
* config/env_blacklist: add REQUIRED_USEZac Medico2017-09-021-1/+1
| | | | Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
* ebuild.sh: Fail on command-not-found in global scopeMichał Górny2017-08-311-0/+4
| | | | | | | | | | | | | | | | | | The PMS specifies that ebuilds must not call external commands in global scope. We can not prevent that from happening at the moment since a few ebuilds in Gentoo are still doing that. Instead, start increasing strictness by explicitly failing if ebuilds call external commands that are not found. This is not going to really break any ebuilds that are not broken already (since command-not-found usually indicates something is going wrong), and it will help noticing typos and reliance on non-common external commands. A similar change has been tested in pkgcore, and confirmed not to cause any failures with the current state of the Gentoo repository. Closes: https://github.com/gentoo/portage/pull/198 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* ebuild.sh: Explicitly ban get_libdir in global scopeMichał Górny2017-08-311-0/+1
| | | | | | | | | | | | | The value of get_libdir depends on the profile, and so it is not useful for dependency calculations. Furthermore, it seems that Portage does not handle defining it in global scope well due to EAPI checking magic. Ban it completely where it is defined as EAPI function to let developers catch their mistakes early rather than see them as 'command not found' errors during dependency calculation / cache updates. Bug: https://bugs.gentoo.org/629010 Closes: https://github.com/gentoo/portage/pull/197 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* gnome2-utils postinst: Restrict file types to fix false positivesMichał Górny2017-08-291-1/+6
| | | | | | | | | | | Restrict the file types checked by the gtk-icon-cache-update check to match the one used inside the tool. This ensures that we do not report any false positives for files that are intentionally skipped. Bug: https://bugs.gentoo.org/629148 Closes: https://github.com/gentoo/portage/pull/196 Reviewed-by: Gilles Dartiguelongue <eva@gentoo.org> Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
* __dyn_install: fix output by fixing the call to padlFabian Groffen2017-08-281-1/+1
| | | | | | In case both build tree and image tree are larger than 1MiB, the output would lack MiB/GiB/etc and be misaligned due to the arguments not being quoted.
* __dyn_install: improve reporting of build and image sizesFabian Groffen2017-08-281-4/+49
| | | | | | | | | | | | | | | | | | | | | | Prior to this commit, the reported sizes would look like: * Final size of build directory: 34942 KiB * Final size of installed tree: 5627 KiB Because the sizes aren't aligned, it is hard to (visually) compare them. On top of this, because the numbers are sometimes bigger, print a human friendly size after the KiB size if applicable, like so: * Final size of build directory: 1906 KiB (1.8 MiB) * Final size of installed tree: 7 KiB It should be noted that in case both sizes have a human-readable variant, they are also aligned. The helper functions are defined and used in a subshell to avoid pollution of the caller's environment. Reviewed-by: Zac Medico <zmedico@gentoo.org>
* RepoConfigLoader: Fix compatibility with Python 3.7 (bug #629146).Arfrever Frehtes Taifersar Arahesis2017-08-271-2/+2
| | | | | | Set default value of sync-rsync-extra-opts to "" instead of None, which is no longer supported since: https://github.com/python/cpython/commit/44e6ad87340d50f48daf53b6a61138377d0d0d10
* _collision_protect: report progress in work todoFabian Groffen2017-08-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Currently Portage reports its progress in checking collisions forward every 1000th file like so: * checking 4149 files for package collisions 1000 files checked ... 2000 files checked ... 3000 files checked ... 4000 files checked ... >>> Merging sys-apps/portage-2.3.8 to / Change it to countdown style so it is easier to anticipate what the next action will be: * checking 4149 files for package collisions 3149 files remaining ... 2149 files remaining ... 1149 files remaining ... 149 files remaining ... >>> Merging sys-apps/portage-2.3.8 to / Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Update caches after reporting missing cache updatesMichał Górny2017-08-262-0/+27
| | | | | | | | | Call the appropriate updater to update caches after reporting a missing cache update, in order to stop repeating the same issue on subsequent packages that did not install any relevant files. Closes: https://github.com/gentoo/portage/pull/195 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Use ctime in cache post-postinst checksMichał Górny2017-08-262-3/+3
| | | | | | | | Use ctime rather than mtime in cache post-postinst checks since mtime may be preserved from the original tarball, and therefore be 'long time ago'. ctime is more reliable in this regard. Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Add post-postinst checks for a few missed cache updatesMichał Górny2017-08-262-0/+103
| | | | | | | | | | | | | | | Add postinst-qa-check.d checks for missed desktop, mime-info and GTK+ icon cache updates. In all of the cases the checks simply look for any installed files that are newer than the cache. This check has some limitations: it assumes that mtime is not preserved when copying files to D, it can't distinguish whether the files were installed by the current package (it reports all new files since the last cache update) and it can't distinguish between the update on postinst and postrm. However, it's certainly a step forward and will help find a few bugs. Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Support post-postinst QA checksMichał Górny2017-08-262-1/+61
| | | | | | | | | Extend the QA check mechanics in Portage to support post-postinst QA checks. They are like post-install QA checks, except they are run after pkg_postinst(), and so they can be used to verify that necessary postinst actions were performed (e.g. regenerating caches). Reviewed-by: Zac Medico <zmedico@gentoo.org>
* digraph: search for relevant priority in descending orderZac Medico2017-08-211-4/+4
| | | | | It's more likely that a higher valued priority will not be ignored, therefore search in descending order.
* digraph.add: sort priorities with bisect.insortZac Medico2017-08-211-2/+2
| | | | | Reported-by: Sergei Trofimovich <slyfox@gentoo.org> Reviewed-by: Manuel Rüger <mrueg@gentoo.org>
* Updates for portage-2.3.8 releaseZac Medico2017-08-202-1/+8
|
* elog mod_echo: Print log path if PORT_LOGDIR is usedMichał Górny2017-08-171-3/+10
| | | | | | | | | | | | | | | | | Include the path to the log file if PORT_LOGDIR is being used (and therefore the log is going to be preserved past the build). This is useful when elog messages contain QA warnings or other errors that require reporting a bug. In such case, having a path to the log is handy. After this commit, the mod_echo output becomes: * Messages for package dev-foo/bar-1: * Log file: /var/log/portage/dev-foo:bar-1:20170816-100533.log * test Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
* quickpkg: handle unsuccessful compressor exit in quickpkg_atomZac Medico2017-08-161-1/+10
| | | | Fixes: cff2c0149142 ("Support different compressors for binary packages")
* quickpkg: revert premature return from quickpkg_atom (bug 628060)Zac Medico2017-08-161-4/+4
| | | | | | | | | | Revert premature return from the quickpkg_atom function for atoms that match multiple slots. This fixes it to create packages for all matched slots, rather than just the lowest version. Fixes: cff2c0149142 ("Support different compressors for binary packages") X-Gentoo-bug: 628060 X-Gentoo-bug-url: https://bugs.gentoo.org/628060
* quickpkg: revert accidental changes to "protect" function (bug 628010)Zac Medico2017-08-161-3/+3
| | | | | | | | | | Revert accidental changes to the "protect" function's return value that were mixed in with changes to the "quickpkg_atom" function's return value. Fixes: cff2c0149142 ("Support different compressors for binary packages") X-Gentoo-bug: 628010 X-Gentoo-bug-url: https://bugs.gentoo.org/628010
* NEWS: Add some more features that made it into 2.3.7Manuel Rüger2017-08-131-0/+2
| | | | Closes: https://github.com/gentoo/portage/pull/189
* portage-2.3.7 releaseportage-2.3.7Zac Medico2017-08-123-1/+30
|
* setup.py: x_sdist default root owner for archive filesZac Medico2017-08-121-1/+5
|
* emerge: add --autounmask-keep-keywords option (bug 622480)Zac Medico2017-08-124-4/+96
| | | | | | | | | | | | The option prevents --autounmask from making changes to package.accept_keywords. This option does not imply --autounmask-keep-masks, so --autounmask is still allowed to create package.unmask changes unless the --autounmask-keep-masks is also specified. X-Gentoo-bug: 622480 X-Gentoo-bug-url: https://bugs.gentoo.org/622480 Reviewed-by: Manuel Rüger <mrueg@gentoo.org>
* eapply_user: combine sort for all dirs (bug 608880)Zac Medico2017-08-111-7/+28
| | | | | | | | | | | | | | | | | | | Combine the patch basenames from all matched directories into a list, and apply them in POSIX sorted order. This allows patches in more-specific directories to override patches of the same basename found in less-specific directories. An empty patch (or /dev/null symlink) negates a patch with the same basename found in a less-specific directory. This behavior is much more flexible and intuitive than the previous one, while remaining backward-compatible to some extent. NOTE: The implementation uses an associative array, which requires bash version 4 or later. X-Gentoo-bug: 608880 X-Gentoo-bug-url: https://bugs.gentoo.org/608880 Reviewed-by: Manuel Rüger <mrueg@gentoo.org>
* GitSync.retrieve_head: return str, not bytes (bug 625888)Zac Medico2017-08-091-2/+3
| | | | Fixes: 0e1699ad6b3f ("emerge: Add head commit per repo to --info")
* GitSync: fix subprocess.CalledProcessError reference (bug 627416)Zac Medico2017-08-091-1/+1
| | | | Fixes: 0e1699ad6b3f ("emerge: Add head commit per repo to --info")
* repoman commit: Support --bug (-b) and --closes (-c) for git footerMichał Górny2017-08-063-1/+71
| | | | | | | | | | | | | | | | | | | | Support two new options: --bug (-b) and --closes (-c) to add a plain 'Bug' reference and a 'Closes' footer for a GitHub pull request. Both options can be specified multiple times, resulting in multiple footer tags being written. The --bug option accepts either a Gentoo Bugzilla bug number or an URL to any bug tracker. In the latter case, it performs two trivial transformations automatically: replaces long 'show_bug.cgi' Bugzilla URLs with the short 'https://bugs.gentoo.org/NNNNNN', and forces https:// for a few known services. The --closes option accepts either a GitHub Gentoo repository pull request number or an URL to any pull request (or bug) that uses the 'Closes' tag. In the latter case, https:// is forced for a few known services. Reviewed-by: Zac Medico <zmedico@gentoo.org>
* repoman commit: Merge code generating common part of the footer (DCO)Michał Górny2017-08-061-6/+7
| | | | | | | | | The DCO Signed-off-by footer looks the same on the git branch, and on the branch for other VCS-es. Therefore, move the code generating it above the split branches. This also prepares the code for further footer elements being added. Reviewed-by: Zac Medico <zmedico@gentoo.org>