Skip to content
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

Reflector and parallel downloads support #198

Merged
merged 8 commits into from
Oct 14, 2022
Merged

Conversation

TessaiMusa
Copy link
Contributor

#184 #160 #180
These would significantly increase the speed of downloading packages.

I have also given the option to edit reflector.conf so that people could customize mirror ranking/filtering

numpkg=$(whiptail --backtitle "${apptitle}" --title "${txtparallelprompt}" --inputbox "" 0 0 "5" 3>&1 1>&2 2>&3)
if [ "$?" = "0" ]; then
if [[ "$numpkg" =~ ^[1-9][0-9]*$ ]] ; then
sed -i "s/.*ParallelDownloads.*/ParallelDownloads = ${numpkg}/" /etc/pacman.conf
Copy link

@maltejur maltejur Nov 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great for me, but I would have also expected that ParallelDownloads is set in the actual system. This probably wasn't added since the command runs before pacstrap, but could something like this work?

Suggested change
sed -i "s/.*ParallelDownloads.*/ParallelDownloads = ${numpkg}/" /etc/pacman.conf
sed -i "s/.*ParallelDownloads.*/ParallelDownloads = ${numpkg}/" /etc/pacman.conf
mkdir /mnt/etc && cp /etc/pacman.conf /mnt/etc

Since this seems pretty ugly to me, maybe a second option in the configuration menu after pacstrap would also be a good idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we just copy the files over, people might have issues with outdated ISO's and stuff, so instead we could just update pacman.conf right after after pacstrap finishes. I think this is better.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah that sounds better

Copy link

@maltejur maltejur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great for me

@MatMoul MatMoul added the review label Oct 14, 2022
@MatMoul
Copy link
Owner

MatMoul commented Oct 14, 2022

Good Job, after one year, I merge it :-(

@MatMoul MatMoul merged commit 636e6c8 into MatMoul:src Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants