You are not logged in.

#1 2007-07-27 13:30:37

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Download packages manually

I've moved recently and still haven't got my Internet connection set up. So, I'd like to fetch packages manually from a Windows box at work and install them via pacman -A at home. Can that be done?

EDIT:

I've browsed through the package lists on www.archlinux.org, but there doesn't seem to be a way to actually download the package(s).

Last edited by foxbunny (2007-07-27 13:31:29)

Offline

#2 2007-07-27 13:31:50

IsSuE
Member
Registered: 2006-04-29
Posts: 309

Re: Download packages manually

Sure, but dependency tracking and downloading will be pain in the ass.
Browse a arch mirror of your choice and download the files.

Last edited by IsSuE (2007-07-27 13:32:59)

Offline

#3 2007-07-27 13:35:50

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: Download packages manually

It's possible though time-consuming.

You can choose one mirror, for example ftp.archlinux.org and download the packages manually. But if you have no pacman that can download it manually it can be a mess because of all the dependencies.

As ftp.archlinux.org ist throttled, you may want to chose another mirror. Here's a list:
http://wiki.archlinux.org/index.php/Mirror


Hail to the thief!

Offline

#4 2007-07-27 13:41:41

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Re: Download packages manually

Okay... Uh, thanks to pacman, I completely forgot those were ftp sites. big_smile

I know it's a pain, but that seems to be the only option right now, because my LUG has only one Archer so far (that I know of) and that's me. tongue

Offline

#5 2007-07-27 14:11:25

miko
Member
From: Poland
Registered: 2006-04-16
Posts: 49

Re: Download packages manually

foxbunny wrote:

I've moved recently and still haven't got my Internet connection set up. So, I'd like to fetch packages manually from a Windows box at work and install them via pacman -A at home. Can that be done?

Why don't you use LiveCD with Archlinux/pacman, and do pacman -Sw packagelist... at work? Then you will get dependencies also.

miko

Offline

#6 2007-07-27 14:37:27

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Re: Download packages manually

Because the admins at work do not permit that. Can't boot the CD. Don't ask why. (shrug)

Offline

#7 2007-07-27 14:48:28

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Download packages manually

You know, I've heard this request often enough that it might be worthwhile to make a small tool specifically for downloading pkg files from a mirror - resolve the deps and all that jazz.  Subset of pacman's functionality, but written in a portable way that could have binaries produced for any OS supporting standard C++....  hmmmmm......  I'm getting ideas.

Offline

#8 2007-07-27 15:18:34

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Re: Download packages manually

Cerebral wrote:

'm getting ideas.

Oooh! Excellent! big_smile That would be terrific.

Offline

#9 2007-07-27 16:03:46

miko
Member
From: Poland
Registered: 2006-04-16
Posts: 49

Re: Download packages manually

foxbunny wrote:

Okay... Uh, thanks to pacman, I completely forgot those were ftp sites. big_smile

I know it's a pain, but that seems to be the only option right now, because my LUG has only one Archer so far (that I know of) and that's me. tongue

So you need to get the same set of packages which you have on your computer? Try this script to generate URLs of
packages to get:

#!/bin/sh

MIRROR="ftp://ftp.belnet.be/packages/archlinux"
ARCH=i686

for pv in `pacman -Q|tr ' ' -`; do
  package=`echo $pv|cut -f1 -d- `
  version=`echo $pv|cut -f2 -d- `
  repos=`echo /var/lib/pacman/*/$package-$version-*`
  for repopath in /var/lib/pacman/*/$package-$version-* ; do
    repo=`echo $repopath|cut -d/ -f5`
    pvr=`echo $repopath|cut -d/ -f6`
    #Don't want to get packages found in local repository
    if [ "x-$repo" != "x-local" ] ; then
      break
    fi
  done
  # Here is the url
  echo "$MIRROR/$repo/os/$ARCH/$pvr.pkg.tar.gz"
done

Offline

#10 2007-07-27 17:41:51

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Download packages manually

miko wrote:

So you need to get the same set of packages which you have on your computer? Try this script to generate URLs of
packages to get:

pacman has a command-line flag to spit out the URLs instead of downloading the files... I think it's -Sp.  Check the manpage (I would, but I'm at work and don't have access to pacman here)

You could do something like this:

#!/bin/sh

pacman -Sy

for pkg in $(pacman -Q | cut -f1); do
    pacman -Sp $pkg   # replace with correct flag.
done

Of course, this may grab some custom-built stuff too, but pacman'll just error out for that one (print to stderr, so no biggie) if it can't find it in the repos.

Last edited by Cerebral (2007-07-27 17:43:04)

Offline

Board footer

Powered by FluxBB