Closed yagebu closed 4 years ago
it seems what this package https://aur.archlinux.org/packages/python-pikepdf/ have a mailformed depends field (here is a right example of how to put depends field for such case: https://aur.archlinux.org/packages/xfe/)
however other AUR helpers which i tested are ignoring this problem, so i guess i'll implement the same
@Morganamilo do you have any opinion on this?
and extra proof: https://wiki.archlinux.org/index.php/PKGBUILD#depends
Yeah bash arrays are whitespace separated, not comma separated. Still you could use a more user friendly error message.
mb it will be better to have validity check of aur metadata and if's not passes -- propose to edit PKGBUILD (and so read it and replace aur metadata retrieved from aur rpc with the .SRCINFO generated from freshly-edited PKGBUILD, the same as when editing PKGBUILDs before the build)
Hello!
Got this call stack while performing 'pikaur -Su'. Seems like one of my installed packages has malformed 'depends' field, but I even can't get information which one.
I think in this case pikaur should report about problem in specific PKGBUILD and ignore the malformed package.
@vasiliev-vb i don't agree it should skip it, but indeed it would make sense to write in which exactly package that problem happened so user can ignore it or use [m]anual package selection
(i'll make a patch in git master later today so you could test it and let you know here)
@vasiliev-vb i don't agree it should skip it, but indeed it would make sense to write in which exactly package that problem happened so user can ignore it or use [m]anual package selection
I think that would be nice solution. Waiting for patch.
sorry for the delay, here it is ^
Works as intended. Thanks!
thanks for checking!
Not sure about closing full issue because the original problem with malformed 'depends' field remains (by 'works as intended' I have meant printing out bad package name).
You can try yourself: at the moment package 'vimb' in the AUR has 'depends' field with commas.
what do you propose instead?
Speaking about the original problem (pikaur -S <package_with_malformed_depends>
) I don't think that printing python stacktrace in case of error is user-friendly.
I propose two possible solutions:
Speaking about problems during pikaur -Su
with already installed bad package, I think solution you proposed
it would make sense to write in which exactly package that problem happened so user can ignore it or use [m]anual package selection
is good, but at the moment pikaur doesn't work that way. After your fix pikaur prints message about malformed dependencies for package during 'pikaur -Su', but still prints out stacktrace, not proposing to ignore bad package or use [m]anual package selection.
but your proposal is just to guess which next syntax error in bash some aur packager gonna make, i see no point re-implementing shellcheck
logic in pikaur
while "eating" any exception during aur deps resolution will make application harder to debug
so i still don't see any solution for this which would be either general or following some specific spec
however i am not saying what there is no such solution -- if you'll propose something reasonable (especially as a PR) -- why not (i'll reopen this again as a discussion
)
I can't reproduce this issue, neither with pikaur -S vimb
nor pikaur -S ocrmypdf
, probably because they fixed the error upstream;
if you can provide an issued-case, it will be helpful for further debugging.
Talking about possible solutions proposed by @vasiliev-vb ,
I think n.2 (try to automatically fix the issue) is to avoid: we can never fix all error-case (today is a white-space, a comma, etc...) or at least it is time-expensive and pikaur users are computer-wise: if it's a problem they should be able to investigate and fix it by themselves!
I think the definitive solution is n.1: do not crash, inform the user about problem, try to give it the most accurately possible information, ask him to edit PKGBUILD, or where the issue is) and keep into account again, pikaur users are computer-wise: if it's a problem the should be able to investigate and fix it by themselves!
for reproducing the issue you could just edit any PKGBUILD and add commas between the items of depends
array
as i already answered to this above: you can't know which part of PKGBUILD written wrong unless you do shellcheck on it (and i even not speaking about logical mistakes, which would pass through shellcheck easily)
Attached log: