summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2024-06-07bin/merge-driver-ekeyword: Move logic to a separate moduleMatt Turner
To facilitate unit testing. Signed-off-by: Matt Turner <mattst88@gentoo.org>
2024-06-07bin/merge-driver-ekeyword: Don't pass program name to main()Matt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2024-06-07bin/merge-driver-ekeyword: Don't sys.exit() from main()Matt Turner
Makes unit testing easier. Signed-off-by: Matt Turner <mattst88@gentoo.org>
2024-06-07bin/merge-driver-ekeyword: Store merged output in correct locationMatt Turner
Fixes: a667d93 ("bin/merge-driver-ekeyword: Look for KEYWORDS changes in upstream commit") Signed-off-by: Matt Turner <mattst88@gentoo.org>
2024-05-24bin/merge-driver-ekeyword: Look for KEYWORDS changes in upstream commitMatt Turner
Previously we only looked for changes to the KEYWORDS= line in our local commit being rebased. If it contained no changes to KEYWORDS= then the merge-driver gave up. However our local patch may conflict with an upstream patch that changed KEYWORDS. In that case, we can look for changes to the KEYWORDS= line in the other patch and try to apply its change to ours. This happened in gentoo.git commits 2c5cd6c4e004 ("sys-fs/squashfs-tools-ng: Stabilize 1.3.0 amd64, #930693") 7129c2e4e5f3 ("sys-fs/squashfs-tools-ng: run elibtoolize in non-live ebuild") leading to a rebase mistake in the latter (later fixed by commit 7579afbd4aa1 ("sys-fs/squashfs-tools-ng: stabilize 1.3.0 for amd64")). With this patch applied, the merge conflicts are automatically resolved between the two commits regardless of which is "ours" vs "theirs". Signed-off-by: Matt Turner <mattst88@gentoo.org>
2024-05-24bin/merge-driver-ekeyword: Two blank lines after function defMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2024-05-24bin/merge-driver-ekeyword: Remove unused importsMatt Turner
Fixes: 1a2c70d ("Run `pyupgrade --py39-plus`") Signed-off-by: Matt Turner <mattst88@gentoo.org>
2023-10-12Migrate to PEP517 meson-python buildZac Medico
Bug: https://bugs.gentoo.org/909888 Signed-off-by: Zac Medico <zmedico@gentoo.org> Closes: https://github.com/gentoo/gentoolkit/pull/36 Signed-off-by: Sam James <sam@gentoo.org>
2023-08-29bin/merge-driver-ekeyword: replace os.system with os.execlpMike Gilbert
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
2023-08-29bin/merge-driver-ekeyword: mangle exit code correctlySam James
Fixes: 263e3d64adac1ee2968233e151d1ee590532f42d Signed-off-by: Sam James <sam@gentoo.org>
2023-08-29bin/merge-driver-ekeyword: fix compatibility with >=git-2.42.0Sam James
Commit 2b7b788fb31a74bcbff4e4c6efc6f3db6c3a49b7 upstream makes more use of the result from a merge driver. Correctly surface the result from `git merge-file` so that we don't wrongly throw away information but also don't make git think the driver crashed (-1 is for exceptional cases, not "failed to merge"). Signed-off-by: Sam James <sam@gentoo.org>
2023-08-07Run `pyupgrade --py39-plus`Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2023-03-22Support the NO_COLOR environment variableUlrich Müller
Bug: https://bugs.gentoo.org/902551 Signed-off-by: Ulrich Müller <ulm@gentoo.org> Closes: https://github.com/gentoo/gentoolkit/pull/26 Signed-off-by: Sam James <sam@gentoo.org>
2022-12-03ebump: Use `git rev-parse --is-inside-work-tree`Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-12-03ebump: Replace which(1) with `command -v`Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-07-11revdep-rebuild.sh: Create its cache dir if it doesn't existBrian Dolbec
Bug: https://bugs.gentoo.org/382009 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09revdep-rebuild.sh: use awk instead of gawkHadrien Lacour
Bug: https://bugs.gentoo.org/652078 Signed-off-by: Zac Medico <zmedico@gentoo.org> Closes: https://github.com/gentoo/gentoolkit/pull/6 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-08metadata.py: Don't fail on unmatched packageMarco Sirabella
Added a warning hook too to reuse the GentoolkitNoMatches machinery This allows users to do something like: equery list @selected | xargs equery metadata successfuly, even if there are some selected packages that don't exist anymore. Signed-off-by: Marco Sirabella <marco@sirabella.org> Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-05-15euse: egrep -> grep -ESam James
egrep is considered an obsolete alias and newer greps will warn on this. Signed-off-by: Sam James <sam@gentoo.org>
2022-02-09*/*: drop obsolete Changelog referencesSam James
We got rid of Changelogs years ago in ::gentoo and most Portage support is gone too. Closes: https://bugs.gentoo.org/832369 Signed-off-by: Sam James <sam@gentoo.org>
2021-09-20Change tabs to spaces (using autopep8). Also, format repo using black.Wolfgang E. Sanyer
The following command was used to change the tabs to spaces: autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r . And then black was run as `black .` on the entire tree Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
2021-03-11bin: Fix type annotationsMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2021-02-24bin: Handle case of no KEYWORD removalsMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-31bin: Add merge-driver-ekeywordMatt Turner
Since the KEYWORDS=... assignment is a single line, git struggles to handle conflicts. When rebasing a series of commits that modify the KEYWORDS=... it's usually easier to throw them away and reapply on the new tree than it is to manually handle conflicts during the rebase. git allows a 'merge driver' program to handle conflicts; this program handles conflicts in the KEYWORDS=... assignment. E.g., given an ebuild with these keywords: KEYWORDS="~alpha amd64 arm arm64 ~hppa ppc ppc64 x86" One developer drops the ~alpha keyword and pushes to gentoo.git, and another developer stabilizes hppa. Without this merge driver, git requires the second developer to manually resolve the conflict which is tedious and prone to mistakes when rebasing a long series of patches. With the custom merge driver, it automatically resolves the conflict. To use the merge driver, configure your gentoo.git as such: gentoo.git/.git/config: [merge "keywords"] name = KEYWORDS merge driver driver = merge-driver-ekeyword %O %A %B %P gentoo.git/.git/info/attributes: *.ebuild merge=keywords Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20Remove $Header$Matt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20Remove imports from __future__Matt Turner
gentoolkit supports only Python 3.6+ now, so these are not used. Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-03-16euse: don't fail on repos missing use.descBen Kohler
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
2019-08-18glsa-check moved to portage repository (bug 463952)Zac Medico
This copy of glsa-check is no longer need since it has moved to the portage repository. Bug: https://bugs.gentoo.org/463952 Signed-off-by: Zac Medico <zmedico@gentoo.org>
2017-03-22update old Gentoo project nameMike Frysinger
2017-03-22imlate: Initial updates for the gentoolkit eco-systemBrian Dolbec
2017-03-22ekeyword: Initial updates for gentoolkit eco-systemBrian Dolbec
2017-03-22ebump: Add to setup.py, minor update to man pageBrian Dolbec
Update script to use VERSION like the other scripts
2017-03-22Add README 'Motivation' info to the scriptBrian Dolbec
2017-03-22Initial move of ebump main files to new gentoolkit locationsBrian Dolbec
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2016-10-17eread: Fix bash error when the elog directory is emptyPaul Varner
This fixes the following error from bash which causes an infinite loop. /usr/bin/eread: line 64: break: only meaningful in a `for', `while', or `until' loop X-Gentoo-bug: 597132 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=597132
2016-06-06glsa-check: Apply list only affected versions patch from bug 400763Paul Varner
Author: Roland Hopferwieser <gentoo@int0x80.at> X-Gentoo-bug: 400763 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=400763
2015-06-02euse: Fix 'grep: Unmatched ( or \(' errors with euse -iPaul Varner
2015-04-23euse: Fix PORTDIR deprecation message. Bug 505160Paul Varner
This change removes the concepts of PORTDIR and PORTDIR_OVERLAY. Portage is moving to the concept of just repositories. This fix searches all repository paths for the USE flag information.
2015-01-23Fix eread to only display elog files. (Bug 534686)Paul Varner
2014-11-11revdep-rebuild.sh: Look for issues with symbols. (Bug 63643)Paul Varner
These changes cause revdep-rebuild.sh to unconditionally look for "Symbol not defined" in ldd -d -r ouput. Additionally, it adds the options -u, --search-symbols to look for "undefined symbol". Using this option will cause false positives in the revdep-rebuild output.
2014-10-24Fix gawk warning escape sequence \. treated as plain. Bug 526400Paul Varner
2014-03-06Update revdep-rebuild.sh to use new path for functions.sh. (Bug 373219)Paul Varner
2014-02-12revdep_rebuild: Remove bin/revdep-ng accidently merged in.Brian Dolbec
Commit: 4335bf979f374300ac6678765f490f92ee805ab4 slis <lis.slawek@gmail.com> (Tue 21 Jan 2014 02:48:32 AM PST) Merged revdep-rebuild branch
2014-01-21Merged revdep-rebuild branchslis
2013-11-21Handle numbers in package namesVikraman Choudhury
Fixes bug 491764
2013-11-19revdep-rebuild.sh: Change la_SEARCH_DIRS to use the library paths fromPaul Varner
ld.so.conf. (Bug 491658) la_SEARCH_DIRS was using SEARCH_DIRS to locate libraries in .la files. This is incorrect, it should be using the standard library path.
2013-11-05euse: use portageq for get_portdir function unconditionally.Paul Varner
Newer versions of portage don't define PORTDIR in make.conf or make.defaults. Additionally, if it is defined, it can still be overridden in repos.conf. Use portageq to ensure we have the correct value.
2013-09-10Add fallback to using portageq for get_portdir function.Paul Varner
Newer versions of portage no longer define PORTDIR in make.defaults or make.conf. This change uses portageq to get the value of PORTDIR if it is not found in make.defaults or make.conf.
2013-09-10Fix Ctrl-C handling when running emerge (Bug 476740).Paul Varner
2013-09-10Fix use of REVDEP_REBUILD_DEFAULT_OPTS (Bug 484340).Paul Varner