YunoHost-Apps / Experimental_helpers

6 stars 12 forks source link

ynh_add_secure_repos__2 generate error with package_check at remove step #36

Closed yalh76 closed 5 years ago

yalh76 commented 5 years ago

To @maniackcrudelis When using ynh_add_secure_repos__2, package_check delete test fail:

Capture

To check that, I generated the smallest package possible: https://github.com/yalh76/test_ynh , ynh_add_secure_repos__2 is only used during install

Tests done on the same fresh package_check installation

There are three branches:

Delete test is also working with_ynh_add_secure_repos__2 when removing https://github.com/YunoHost-Apps/Experimental_helpers/blob/ab1a0c1947357d641ba8e91696a747c9ebbdb7e3/ynh_add_secure_repos/ynh_add_secure_repos__2#L146

PS: the delete error only apply when using package_check, normal delete works

maniackcrudelis commented 5 years ago

But why would you not remove the repo during the remove script ? And with ynh_remove_extra_repo it works ?

yalh76 commented 5 years ago

I don't used ynh_remove_extra_repo to be sure the error didn't come from it. I first add the error on two packages with ynh_remove_extra_repo in the removce script

I will launch another branch with ynh_remove_extra_repo just to be 100% sure and let you know the result

yalh76 commented 5 years ago

Well... with ynh_remove_extra_repo in the remove script, it works.... remove test success I completing misunderstanding. I will check with two two other packages....

maniackcrudelis commented 5 years ago

Apparently the error "Binary file (standard input) matches is not installed" would be related to grep. Can't see why or how though...

yalh76 commented 5 years ago

Moving forward...

yalh76 commented 5 years ago

Apparently the error "Binary file (standard input) matches is not installed" would be related to grep. Can't see why or how though...

Error only apply with package_check. standard remove with yunohost app remove works well So difficult to handle...

kay0u commented 5 years ago

I have the same problem, I fixed it by adding a > /dev/null at the end of this line:

wget -q "$key" -O - | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.$key_ext

yalh76 commented 5 years ago

I have the same problem, I fixed it by adding a > /dev/null at the end of this line:

wget -q "$key" -O - | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.$key_ext

It tooks me 2 days to identify the bug and find a way to reproduce and test it ^^

kay0u commented 5 years ago

Tell me if it works for you, and if it does, I'll push this fix.

maniackcrudelis commented 5 years ago

Thanks @kay0u I was about to do something like that, I saw that the key was into the log.

yalh76 commented 5 years ago

I confirm, it solved the issue, tested on two packages

kay0u commented 5 years ago

Fix pushed, thank you for this report :-)