Description of problem: When trying to start fedora-update-feedback-2.1.2-3.fc39.x86_64, it asks for FAS password, after typing the correct password it start querying the repositories and returns: Error: "Failed to parse dnf output: input contains invalid characters" Version-Release number of selected component (if applicable): fedora-update-feedback-2.1.2-3.fc39.x86_64 dnf 4.18.0-2.fc39 How reproducible: allways Steps to Reproduce: 1.start fedora-update-feedback 2.type FAS password and wait 3.get ERROR Actual results: Error message Expected results: Query repos and start feedback session Aditional info: After downgrade back to dnf-4.17.0-6.fc39 fedora-update-feedback worked again
From fedora-update-feedback sources it looks like the error is raised here: https://github.com/ironthree/fedora-update-feedback/blob/66b163c113cef52ff151f354d44e5e990bcbc5f4/src/sysinfo.rs#L203 This line parses install time from output of the `dnf --quiet repoquery --cacheonly --installed --qf "%{name}-%{version}-%{release}.%{arch}\t%{installtime}"` command. Unfortunately the error message does not contain the incorrect input line. Maybe running this command with dnf-4.17 and dnf-4.18 and comparing the outputs might help? Unfortunately I cannot reproduce the issue on my system. I also checked the changes in dnf between 4.17 and 4.18 and did not noticed any change related to repoquery.
I also cannot reproduce this issue with dnf 4.18.0-2.fc39 and fedora-update-feedback-2.1.2-3.fc39.x86_64. The error you see comes from `Utc.datetime_from_str(installtime, "%Y-%m-%d %H:%M")`, so it looks like on your system, some packages don't have valid installtime timestamps in the dnf database ... have you used dnf5 to install / upgrade some packages on this system?
Yes, I have tested some install and remove packages using dnf5. But that was some weeks ago, before dnf was upgraded, and fedora-update-feedback was working fine (and still working after I downgraded dnf) I'll try test this on a VM to see if I can reproduce it there.
(In reply to Fabio Valentini from comment #2) > I also cannot reproduce this issue with dnf 4.18.0-2.fc39 and > fedora-update-feedback-2.1.2-3.fc39.x86_64. > > The error you see comes from `Utc.datetime_from_str(installtime, "%Y-%m-%d > %H:%M")`, so it looks like on your system, some packages don't have valid > installtime timestamps in the dnf database ... have you used dnf5 to install > / upgrade some packages on this system? Fabio, how can I certify that this is happening on my install? I already did a sudo rpm -v --rebuilddb and the problems persists.
You can try running: $ dnf --quiet repoquery --cacheonly --installed --qf "%{name}-%{version}-%{release}.%{arch}\t%{installtime}" The second column (after the TAB character) should contain valid timestamps for all installed packages, but on your system, it appears that this is not the case with dnf 4.18.
@geraldo.simiao.kutz Please, run $ dnf --quiet repoquery --cacheonly --installed --qf "%{name}-%{version}-%{release}.%{arch}\t%{installtime}" command with both dnf 4.18 and dnf 4.17 and post here the diff of results. It should help identify installed packages with strange installtime causing fedora-update-feedback to fail.
Created attachment 1995507 [details] dnf 4.18 and 4.17 output diff Yeah, the problem is really this: at dnf 4.18 here the output is DDMMYYYY and with dnf 4.17 is YYYYMMDD Ex: dnf 4.18 => Box2D-2.4.1-11.fc39.x86_64 21-09-2023 01:54 dnf 4.17 => Box2D-2.4.1-11.fc39.x86_64 2023-09-21 01:54
Created attachment 1995508 [details] dnf 4.18 output on a fresh installed F39 KDE Now I tested the new RC iso from https://dl.fedoraproject.org/pub/alt/stage/39_RC-1.1/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-39-1.1.iso on a VM and it have the same output from my installed F39 baremetal install. Both are System Locale: LANG=pt_BR.UTF-8
Thank you, I think I understand it now: This commit - https://github.com/rpm-software-management/dnf/commit/1daf3467e60bbd54998cab79bcabe4e3a8d4d153, enabled translators to modify formatting strings for their respective languages. Although the commit was merged some time ago, the issue only came to light when translators actually modified the timestamp formatting string for the pt_BR locale. This change occurred during the 4.18 release cycle, as you can see here: https://github.com/rpm-software-management/dnf/blob/6a6b575244b0c5a5713dbd16949f4922e21f1ef6/po/pt_BR.po#L2108-L2116
I think it's a bad idea to mark something that's machine-parseable as translatable. If the date format returned for `%{installtime}` is not stable in `repoquery`, then I cannot rely on it, and would need to drop a feature that was requested by multiple people.
Right, I'll prepare a patch to revert this change.
PR https://github.com/rpm-software-management/dnf/pull/2008 reverts repoquery timestamps format translating.
Looks great, thank you!
I just did a build with this commit on my copr, and test it. It works fine, really fix the bug at my setup. https://copr.fedorainfracloud.org/coprs/geraldosimiao/testing/package/dnf/
so, now its just wait for the PR to be accepted, a new build and then the bodhi update with it, right?
Yes. The patch has been merged to upstream and will be part of next dnf release for Fedoras.
Meanwhile you can workaround the issue by setting "C" locale: $ LANG="C" fedora-update-feedback
FEDORA-2023-20e641bc5a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-20e641bc5a
FEDORA-2023-20e641bc5a has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-20e641bc5a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-20e641bc5a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
New update fixed confirmed. All is fine again. Thanks.
FEDORA-2023-20e641bc5a has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.