I am using the following string in one of my scripts to copy/rename ebuilds: qatom -F "%{CATEGORY}/%{PN}/%{PN}-${TARGET_VERSION}.ebuild" ${CATEGORY}/${PF} practical example: TARGET_VERSION="1.4.1" qatom -F "%{CATEGORY}/%{PN}/%{PN}-${TARGET_VERSION}.ebuild" media-sound/bluez-alsa Result: media-sound/bluez-alsa/bluez-alsa-1.4.1.ebuild This used to work nicely until portage-utils-0.80_pre20190530. Now it just prints an empty line. When I reduce the string to this: qatom -F "%{CATEGORY}/%{PN}/%{PN}" media-sound/bluez-alsa I get: media-sound/bluez-alsa/bluez-alsa But as soon as I add a single character to the format instruction, the output is empty again: qatom -F "%{CATEGORY}/%{PN}/%{PN}-" media-sound/bluez-alsa
Yes, bug. % ./qatom -F "%{CATEGORY}/%{PN}/%{PN}-%{X}" media-sound/bluez-alsa media-sound/bluez-alsa/bluez-alsa-<BAD:X> seems to suggest it incorrectly stops after no longer finding any expandos
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=85c445dbc0d3526ff2df263f1d48dbc67433cd10 commit 85c445dbc0d3526ff2df263f1d48dbc67433cd10 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-06-05 09:14:19 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-06-05 09:14:19 +0000 libq/atom: retain all input in atom_format_r Copy the remainder, as well as data before and inbetween expandos. Bug: https://bugs.gentoo.org/687416 Signed-off-by: Fabian Groffen <grobian@gentoo.org> libq/atom.c | 3 +-- qatom.c | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-)
I installed portage-utils-9999 after your commit but "qatom -F" is still broken in the exact same way.
man I feel stupid, sorry
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e39cbfcefe03f6160894201df6174cec4b4e7946 commit e39cbfcefe03f6160894201df6174cec4b4e7946 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-06-05 13:09:51 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-06-05 13:09:51 +0000 libq/atom: really fix retaining input in atom_format_r return the start of the buffer, not the end (= empty) add tests this time that show the bug is now fixed Bug: https://bugs.gentoo.org/687416 Signed-off-by: Fabian Groffen <grobian@gentoo.org> libq/atom.c | 2 +- tests/qatom/dotest | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Now it's fixed. Thank you very much. :)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aba4a67be6bd97dcbb9b6fdeb61c25cefba48e86 commit aba4a67be6bd97dcbb9b6fdeb61c25cefba48e86 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-06-06 07:26:17 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-06-06 07:27:05 +0000 app-portage/portage-utils: version bump 0.80 pre Closes: https://bugs.gentoo.org/687416 Closes: https://bugs.gentoo.org/687374 Closes: https://bugs.gentoo.org/687372 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11 app-portage/portage-utils/Manifest | 2 +- ...ls-0.80_pre20190530.ebuild => portage-utils-0.80_pre20190605.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-)