1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing package repository

Discussion in 'Installation and Maintenance of Ports or Packages' started by rahulsinner, Apr 20, 2009.

  1. rahulsinner

    rahulsinner New Member

    Messages:
    20
    Thanks Received:
    0
    Hi,

    How do I change the package repository for pkg_add/portupgrade? I tried defining PACKAGEROOT:

    Code:
    $export PACKAGEROOT="ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/All/"
    


    But it still won't listen and spit out following crap:

    Code:
    Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/kde4.tbz: File unavailable (e.g., file not found, no access)
    pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/kde4.tbz' by URL
    


    The ftp resources being mentioned does not exist.

    I tried changing /usr/local/etc/pkgtools.conf but continued to get same errors:

    Code:
    ENV['PKG_PATH'] = '/All'
      ENV['PACKAGEROOT'] = 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages'
    


    I read somewhere that pkg_add/portupgrade does some appending to the PACKAGEROOT according to pre-defined rules. The repository I have listed(well, looks like the official repo to me) doesn't follow the naming convention it is searching for.

    How do I get it to work?

    I am no big fan of ports because it takes enormous amounts of disk space. I alloted 1 GB for ports and compilation(/usr/ports is a symlink to a different file system) and it keeps up filling it. I try to compile a package and it has tens of dependencies. By the time all of them are downloaded and compiled, the package I wanted to install won't install because it runs out of disk space.
     
  2. tangram

    tangram New Member

    Messages:
    524
    Thanks Received:
    66
  3. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,866
    Thanks Received:
    2,491
    My /usr/ports is about 4GB and is 97% in use, this includes distfiles but not packages. My build packages are stored separately and is usually somewhere between 600MB and 900MB, depending on what I've build. I've set WRKDIRPREFIX to /tmp/build to keep the clutter out and improve performance somewhat, /tmp is a stripped disk set and is about 6GB. I haven't ran out of disk space yet.

    1GB will never cut it. To keep the distfiles in check I regularly run portsclean -D, the clutter is removed by a simple rm -rf /tmp/build/*. Packages are stored separately, I usually mount_nullfs the directory where I store them.
     
  4. rahulsinner

    rahulsinner New Member

    Messages:
    20
    Thanks Received:
    0
    It worked. Is there a way pkg_add can search for packages on the PACKAGESITE. Like I say "pkg_add -r vlc" and it searches for and installs it. I was thinking something on the lines of other binary package management tools viz. apt-get, yum etc.