On 03/16/2012 12:59 PM, Dieter Plaetinck wrote:
On Fri, 16 Mar 2012 02:26:36 -0300
Gerardo Exequiel Pozzi<[email protected]>  wrote:

This allow to execute build.sh in 32-bit-compat without using a chroot
and doing tricks.

Signed-off-by: Gerardo Exequiel Pozzi<[email protected]>
---
  configs/releng/build.sh |    9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index f206caf..5c010ef 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -132,11 +132,12 @@ make_core_repo() {
          local _url _urls _pkg_name _cached_pkg _dst _pkgs
          mkdir -p ${work_dir}/repo-core-any
          mkdir -p ${work_dir}/repo-core-${arch}
-        pacman -Sy
-        _pkgs=$(comm -2 -3<(pacman -Sql core | sort | sed 's@^@core/@') \
+        mkdir -p ${work_dir}/pacman.db/var/lib/pacman
+        pacman -Sy -r ${work_dir}/pacman.db
+        _pkgs=$(comm -2 -3<(pacman -Sql -r ${work_dir}/pacman.db core | sort | 
sed 's@^@core/@') \
                             <(grep -v ^# ${script_path}/core.exclude.${arch} | 
sort | sed 's@^@core/@'))
-        _urls=$(pacman -Sddp ${_pkgs})
-        pacman -Swdd --noprogressbar --noconfirm ${_pkgs}
+        _urls=$(pacman -Sddp -r ${work_dir}/pacman.db ${_pkgs})
+        pacman -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm 
${_pkgs}
          for _url in ${_urls}; do
              _pkg_name=${_url##*/}
              _cached_pkg=/var/cache/pacman/pkg/${_pkg_name}
some code comments seem helpful here.

Dieter

1) Fetch pacman package sync database. (-Sy)
2) Build a list of [core] packages minus excluded packages. (-Sl)
3) Download packages (-Sw)

--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

Reply via email to