diff --git a/README.md b/README.md index c52057f..1b4b863 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,28 @@ permissions. Since JuJu gives the possibility to install packages either as root or as normal user you need to remember that and remove the package with the right user! +###No servers configured for repository### +-**Q**: Why I cannot install packages? +``` + pacman -S lsof + Packages (1): lsof-4.88-2 + + Total Download Size: 0.09 MiB + Total Installed Size: 0.21 MiB + + error: no servers configured for repository: core + error: no servers configured for repository: community + error: failed to commit transaction (no servers configured for repository) + Errors occurred, no packages were upgraded. +``` + +-**A**: You need simply to update the mirrorlist file according to your location: +``` + # Uncomment the repository line according to your location + nano /etc/pacman.d/mirrorlist + pacman -Syy +``` + License ------- Copyright (c) 2012-2014 diff --git a/lib/core.sh b/lib/core.sh index 11a1f69..b881f47 100644 --- a/lib/core.sh +++ b/lib/core.sh @@ -108,6 +108,9 @@ function _setup_juju(){ imagepath=$1 tar -zxpf ${imagepath} -C ${JUJU_HOME} mkdir -p ${JUJU_HOME}/run/lock + warn "Warn: Change the mirrorlist file according to your location:" + info " nano /etc/pacman.d/mirrorlist" + info " pacman -Syy" info "JuJu installed successfully" } @@ -233,7 +236,7 @@ function build_image_juju(){ mkdir -p ${maindir}/root _prepare_build_directory info "Installing pacman and its dependencies..." - pacstrap -d ${maindir}/root pacman arch-install-scripts binutils libunistring + pacstrap -M -d ${maindir}/root pacman arch-install-scripts binutils libunistring nano info "Generating the locales..." ln -sf /usr/share/zoneinfo/posix/UTC ${maindir}/root/etc/localtime diff --git a/tests/test_core.sh b/tests/test_core.sh index 1a4be0c..9f8da7c 100755 --- a/tests/test_core.sh +++ b/tests/test_core.sh @@ -50,7 +50,7 @@ function test_setup_juju(){ tar -czvf juju-${ARCH}.tar.gz file } WGET=wget_mock - setup_juju 1> /dev/null + setup_juju &> /dev/null [ -e $JUJU_HOME/file ] || return 1 [ -e $JUJU_HOME/run/lock ] || return 1 } @@ -59,7 +59,7 @@ function test_setup_juju(){ function test_setup_from_file_juju(){ touch file tar -czvf juju-${ARCH}.tar.gz file 1> /dev/null - setup_from_file_juju juju-${ARCH}.tar.gz 1> /dev/null + setup_from_file_juju juju-${ARCH}.tar.gz &> /dev/null [ -e $JUJU_HOME/file ] || return 1 [ -e $JUJU_HOME/run/lock ] || return 1