YunoHost-Apps / Experimental_helpers

6 stars 12 forks source link

Pinning repos and backports repos. #12

Closed frju365 closed 5 years ago

frju365 commented 6 years ago

I tried something... but not tested yet (I've no app with backports repos). I can cut the file in different part as the pinning part can be used for all types of repos. I don't know is the syntax is correct too. And finally I don't know, if one person already did a helper to pin repos :-)

Conclusion : comments are welcome. Work in Progress.

frju365 commented 6 years ago

I added the remove part. Can someone test review it ? (btw: Thank you very much @maniackcrudelis ! Normally I've fixed everything.)

frju365 commented 6 years ago

I don't know if @Josue-T or someone tested but I will surely test this, this afternoon.

anmol26s commented 6 years ago

So, is this working? I will implement it on peertube and test it. https://github.com/YunoHost-Apps/peertube_ynh/blob/testing/scripts/install#L99

frju365 commented 6 years ago

Pas sûr que ça fonctionne, mais on peut tester (j'ai oublié de le faire, honte à moi).

frju365 commented 6 years ago

Any comment is welcome.

anmol26s commented 6 years ago

What should be the order for adding the backport repos?

ynh_add_secure_backport()
ynh_add_dependencies ynh_add_repos()

This should be good for install script? And will adding this to the install and update script check the duplicate repos for other apps?

frju365 commented 6 years ago

well... yes, indeed. I has not thought about installation itself of the package, it was just to try to pin the repos. But, normally, I wanted to do a helper to install just backport package... normally, if you want to install a package with this helper for instance :

ynh_add_secure_backport
apt install -t jessie-backports $package

Well... it's not that good. Tomorrow, I will try to improve this situation.

Jibec commented 6 years ago

Hi, what is "pinning" ? what does it solve?

frju365 commented 6 years ago

pining a repos will set a priority between the repos. For example if you don't want that it upgrade directly from this repos, you can set a low pin number. As opposite, if you want that the repo have the hightest priority, you can set an higher number.

maniackcrudelis commented 5 years ago

As we have a lot of problem with extra repositories, I'll work on that helper and merge it as soon as possible. @frju365, I'm probably going to make a lot of modification on your code, if that's a problem for you, I can merge that helper as it is, and make another one aside. As I did for some other experimental helpers.

frju365 commented 5 years ago

I wanted to say, that it's not a problem. It's my fault (I didn't update the PR following the last change for argument with declare). Thank you very much !