-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luci-app-package-manager: apk update: fetch of package.adb index is shown in Errors output #7387
Comments
Hi @ynezz At a cursory glance at the source, it appears that a script captures stderr and stdout. So anything landing in the error output is what is, in fact, output by apk to stderr? ( I've not yet verified or run any new apk builds ) luci/applications/luci-app-package-manager/root/usr/libexec/package-manager-call Lines 90 to 99 in d650688
Could you test on your installation, comment out the later line which does luci/applications/luci-app-package-manager/root/usr/libexec/package-manager-call Line 109 in d650688
And double-check the contents of those files? |
Yes, its the case {
"code": 0,
"pkmcmd": "apk update ",
"stdout": " [https://downloads.openwrt.org/snapshots/targets/x86/64/packages/packages.adb]\n [https://downloads.openwrt.org/snapshots/packages/x86_64/base/packages.adb]\n [https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.60-1-2e46b6878177e1dea330c0dbbbcfb6be/packages.adb]\n [https://downloads.openwrt.org/snapshots/packages/x86_64/luci/packages.adb]\n [https://downloads.openwrt.org/snapshots/packages/x86_64/packages/packages.adb]\n [https://downloads.openwrt.org/snapshots/packages/x86_64/routing/packages.adb]\n [https://downloads.openwrt.org/snapshots/packages/x86_64/telephony/packages.adb]\nOK: 10505 distinct packages available",
"stderr": "fetch https://downloads.openwrt.org/snapshots/targets/x86/64/packages/packages.adb\nfetch https://downloads.openwrt.org/snapshots/packages/x86_64/base/packages.adb\nfetch https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.60-1-2e46b6878177e1dea330c0dbbbcfb6be/packages.adb\nfetch https://downloads.openwrt.org/snapshots/packages/x86_64/luci/packages.adb\nfetch https://downloads.openwrt.org/snapshots/packages/x86_64/packages/packages.adb\nfetch https://downloads.openwrt.org/snapshots/packages/x86_64/routing/packages.adb\nfetch https://downloads.openwrt.org/snapshots/packages/x86_64/telephony/packages.adb"
} |
@systemcrash magical way of handling apk... But it's probably not intended that those fetch command goes in stderr... I will propose a fix upstream |
Just to be sure we aren't on a wild goose chase, @ynezz can you test an equivalent apk command and try redirecting the relevant outputs? To see if it really is apk to blame? |
https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/libfetch/common.c?ref_type=heads#L176 root@OpenWrt:~# apk update 2>/dev/null
[https://downloads.openwrt.org/snapshots/targets/x86/64/packages/packages.adb]
[https://downloads.openwrt.org/snapshots/packages/x86_64/base/packages.adb]
[https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.60-1-2e46b6878177e1dea330c0dbbbcfb6be/packages.adb]
[https://downloads.openwrt.org/snapshots/packages/x86_64/luci/packages.adb]
[https://downloads.openwrt.org/snapshots/packages/x86_64/packages/packages.adb]
[https://downloads.openwrt.org/snapshots/packages/x86_64/routing/packages.adb]
[https://downloads.openwrt.org/snapshots/packages/x86_64/telephony/packages.adb]
OK: 10505 distinct packages available
root@OpenWrt:~# apk update 1>/dev/null
fetch https://downloads.openwrt.org/snapshots/targets/x86/64/packages/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/x86_64/base/packages.adb
fetch https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.60-1-2e46b6878177e1dea330c0dbbbcfb6be/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/x86_64/luci/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/x86_64/packages/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/x86_64/routing/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/x86_64/telephony/packages.adb
|
Wow. |
Well i checked the usage of fetch_info and it's really mixed for both error condition and real info so it just need some love :D |
BTW it's not even there... fetch comes from database.c |
Heh. "Ah, we just been usin' apk for like a decade, never noticed output bug. 🤷 " |
https://gitlab.alpinelinux.org/alpine/apk-tools/-/merge_requests/243 lets see how they get this... Eventually we can experiment with the -q option and see if stdout is printed anyway.... |
The reason for the duplicate output is that
It looks like your repositories ether don't have a description or apk is not handling descriptions of adb repositories correctly. |
@sertonix are you sure that output only comes from stdout and it's not mixed stderr and stdout? |
It is mixed stderr and stdout. I agree that this doesn't make sense. I am uncertain how to fix this. Just wanted to mention that the proposed fix introduces a regression. |
Is there an existing issue for this?
screenshots or captures
Actual behaviour
Update lists...
action buttonapk update
finishes it shows the output in the Errors section, which is misleading as its not an errorErrors
Expected behaviour
Only errors/issues are shown in the
Errors
section.Steps to reproduce
Update lists...
action buttonAdditional Information
What browsers do you see the problem on?
Firefox
Relevant log output
No response
The text was updated successfully, but these errors were encountered: