I performed an rm -r on /var/lib/pkg

Erik Trulsson ertr1013 at student.uu.se
Fri Oct 12 10:55:33 PDT 2007


On Fri, Oct 12, 2007 at 10:57:59AM -0600, James wrote:
> 
> This isn't quite as simple as I'd hoped it'd be to fix. Here's my
> findings thus far (I haven't started writing my script yet, but I will
> later today):
> 
> 1. /usr/ports/distfiles contains everything I need
> 2. distfiles contains several versions of some packages, but that's
> pretty trivial to resolve.
> 3. distfiles contains some packages whose source tarballs are named
> *differently* to the packages themselves, such as unrar.

A few more problems:

a) Not every port will have a corresponding tarball in /usr/ports/distfiles.
   A few ports have all the source directly in the ports tree.  This
   means that your point 1) above is not necessarily true.
b) Several ports have many tarballs in /usr/ports/distfiles
c) A few of the tarballs can be used by more than one port.



> 
> It's number 3 that's getting me.  It looks like the simplest thing might
> be an if statement:
> 
> if (make search name=$PACKAGE)
>     score!
> else
>     grep -r $PACKAGE /usr/ports
> 
> But before I go that far, I wanted to see if anyone had an alternate
> idea for what might work.

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list