FS#35434 - Allow using pacstrap without internet connection
Attached to Project:
Arch Linux
Opened by Chee-Yang Chau (ccy) - Thursday, 23 May 2013, 02:50 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 23 May 2013, 19:33 GMT
Opened by Chee-Yang Chau (ccy) - Thursday, 23 May 2013, 02:50 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 23 May 2013, 19:33 GMT
|
Details
The pacstrap script always sync the package database list
with mirrors via Internet as indicated in this line of
code:
if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then It would be great if the pacstrap offer an option to use in offline mode. I attached a version written by teateawhy posted to https://bbs.archlinux.org/viewtopic.php? pid=1276604#p1276604 |
This task depends upon
Closed by Dave Reisner (falconindy)
Thursday, 23 May 2013, 19:33 GMT
Reason for closing: Won't implement
Additional comments about closing: This isn't trivial, and calling pacman is more suited to the task.
Thursday, 23 May 2013, 19:33 GMT
Reason for closing: Won't implement
Additional comments about closing: This isn't trivial, and calling pacman is more suited to the task.
# pacstrap /mnt base
with
# pacman /mnt base
and get the same result?
Regarding the bug report, i think there are 4 options now:
1. Close this bug report without commiting changes. If people want "offline" mode let them enter the necessary pacman command.
2. Introduce this option which does not change default behaviour of pacstrap, and can be used for "offline" mode.
3. Change the default pacman command in the pacman script from 'pacman -Sy' to 'pacman -S'. Then the old behaviour comes back with 'pacstrap -y /mnt base'.
4. Something else
My suggestion is number 2., and i am interested in your opinion about this.
# mkdir foo
# ./pacstrap -do foo
==> Creating install root at foo
==> Installing packages to foo
warning: database file for 'staging' does not exist
warning: database file for 'testing' does not exist
warning: database file for 'core' does not exist
warning: database file for 'extra' does not exist
warning: database file for 'community-staging' does not exist
warning: database file for 'community-testing' does not exist
warning: database file for 'community' does not exist
warning: database file for 'multilib-testing' does not exist
warning: database file for 'multilib' does not exist
error: target not found: base
==> ERROR: Failed to install packages to new root
I'm inclined to go with #1 as the logic required to copy existing sync DBs to the new chroot is more complex than I want it to be for an *edgecase*. #3 isn't an option as it changes the interface and breaks the majority use case. Feel free to try and convince me otherwise but I don't think there's going to be anything done here.
https://bbs.archlinux.org/viewtopic.php?pid=1276896#p1276896
It seems that this offline functionality is harder to achieve, than i have thought before. Go with #1 then.