# 9.0-CURRENT packagesite error



## Beeblebrox (Dec 10, 2010)

I want to be able to pkg_add or portupgrade -NPP some apps which give me an error during make install  Obviously a local mirror is preferable for the task and I have placed in /root/.cshrc:

```
setenv PACKAGEROOT=ftp://ftp2.tr.freebsd.org
setenv PACKAGESITE=ftp://ftp2.tr.freebsd.org/pub/FreeBSD/ports/amd64/packages-current
setenv PKG_PATH=ftp://ftp2.tr.freebsd.org/pub/FreeBSD/ports/amd64/packages-current
```
but I still get an unrelated site message ??:

```
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/
Latest/print/gimp-gutenprint.tbz' by URL
```
I have xfce4 and gnome installed and maybe gnome is providing an override with its apps?


----------



## SirDice (Dec 10, 2010)

Set PACKAGESITE only. See pkg_add(1).


----------



## Beeblebrox (Dec 10, 2010)

My mistake w/ inaccurate wording again.  I tried all 3 variations separately, not all at once.  I re-tried PACKAGESITE just now with same result.  As you can see in 1st post, the ftp site looks like a "default" ftp...


----------



## SirDice (Dec 10, 2010)

Something I missed. You're not using setenv correctly. 

[cmd=]setenv PACKAGESITE ftp://ftp2.tr.freebsd.org/pub/FreeBSD/ports/amd64/packages-current[/cmd]
(Note the lack of an equal sign)


----------



## Beeblebrox (Dec 10, 2010)

Still no - same result, even after reboot, with:

```
setenv PACKAGESITE ftp://ftp2.tr.freebsd.org/pub/FreeBSD/ports/amd64/packages-current
```


```
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-
current/Latest/print/gimp-gutenprint.tbz' by URL
```


----------



## SirDice (Dec 10, 2010)

Add /Latest/ to your URL.


----------



## Beeblebrox (Dec 10, 2010)

Local mirror ftp2.tr is still being bypassed for the "generic" one.  There is a setting somewhere else interfering w/ /root/.cshrc

```
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9
-current/Latest/print/gimp-gutenprint.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9
-current/Latest/print/gimp-gutenprint.tbz' by URL
```


----------



## Oxyd (Dec 10, 2010)

Are you doing this from an actual root's shell or via sudo? If from root's shell, do you use su - to switch to that account? (Especially the - at the end.)

Do you invoke pkg_add yourself or is that invoked through the mentioned portmaster -NPP?


----------



## wblock@ (Dec 10, 2010)

Beeblebrox said:
			
		

> Still no - same result, even after reboot, with:
> 
> ```
> setenv PACKAGESITE ftp://ftp2.tr.freebsd.org/pub/FreeBSD/ports/amd64/packages-current
> ...



It really isn't there.  Also, Latest doesn't have subdirs.

ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/print/ doesn't have gimp-gutenprint, either.  Although it does have gutenprint.


----------



## Oxyd (Dec 10, 2010)

Which, I think, is exactly why he wants pkg_add to use an alternative mirror which does contain the package. Although the mirror doesn't have subdirs in Latest/ either -- it does have gimp-gutenprint-5.2.4_2.tbz, though.


```
ftp> ls pub/FreeBSD/ports/amd64/packages-current/print/gimp-gutenprint*
229 Entering Extended Passive Mode (|||58921|)
150 Here comes the directory listing.
lrwxrwxrwx    1 1004     14             34 Apr 02  2010 gimp-gutenprint-5.2.4_2.tbz -> ../All/gimp-gutenprint-5.2.4_2.tbz
226 Directory send OK.
```


----------



## Beeblebrox (Dec 10, 2010)

@oxyd + wblock: Precisely!! The /Latest/ directory does not have the structure or sub-dirsctory (/print/xyz), never mind the file its self.  In my opinion the command would work w/o /Latest/ because pkg_add directs to the sub-dirs already in the structure ofthe ftp site anyway.  However, the error code shows that the problem is not with the end part of the URL, it's with the TOP part.  Fetch is disregarding the local mirror address and going for the default / generic setting.  Also note: the url still goes to 'ftp://ftp.freebsd.org/pub/etc' even if I were to set PACKAGESITE to ftp.flying.monkeys.

@oxyd post1: Tried all 3 (sudo, su, su-)


> Are you doing this from an actual root's shell or via sudo? If from root's shell, do you use su - to switch to that account? (Especially the - at the end.)



Tried both 





> Do you invoke pkg_add yourself or is that invoked through the mentioned portmaster -NPP?



Worst case I could download the file from the ftp site manually, but I would also like to solve this strangeness.
Does this help?  In gnome: (system > administration > software sources) only shows my local csup ports and does not show as a software source the specified ftp.


----------

