Re: system not using second entry in $PKG_PATH
On Mon, Nov 19, 2007 at 08:21:17AM -0500, Juan Miscaro wrote: On two OpenBSD 4.2 systems I have a (master) system that contains two repositories - one of regular packages and one of packages derived from ports. On the client (slave) system I have a script with a PKG_PATH containing both repositories: PKG_PATH_LAN1=ftp://$MASTER/$VERSION/packages/ PKG_PATH_LAN2=ftp://$MASTER/$VERSION/packages/by_port/i386/all/ PKG_PATH=$PKG_PATH_LAN1:$PKG_PATH_LAN2 However the second one (PKG_PATH_LAN2) is never consulted. If I remove the first one then packages are found and installed with no problem. Why is this happening? Because it's designed that way. The second entry is only consulted if a matching package is not found in the first repository. It works like a linker path: pkg_add only looks at entries while it did not find a suitable candidate. The intention is that you should put your preferred repository at the front, and less wanted stuff later: if pkg_add finds something in the preferred repository, it won't even look at the rest.
Re: system not using second entry in $PKG_PATH
--- Marc Espie [EMAIL PROTECTED] wrote: On Mon, Nov 19, 2007 at 08:21:17AM -0500, Juan Miscaro wrote: On two OpenBSD 4.2 systems I have a (master) system that contains two repositories - one of regular packages and one of packages derived from ports. On the client (slave) system I have a script with a PKG_PATH containing both repositories: PKG_PATH_LAN1=ftp://$MASTER/$VERSION/packages/ PKG_PATH_LAN2=ftp://$MASTER/$VERSION/packages/by_port/i386/all/ PKG_PATH=$PKG_PATH_LAN1:$PKG_PATH_LAN2 However the second one (PKG_PATH_LAN2) is never consulted. If I remove the first one then packages are found and installed with no problem. Why is this happening? Because it's designed that way. The second entry is only consulted if a matching package is not found in the first repository. It works like a linker path: pkg_add only looks at entries while it did not find a suitable candidate. But the first repository does not contain a candidate. That's what I'm saying. The intention is that you should put your preferred repository at the front, and less wanted stuff later: if pkg_add finds something in the preferred repository, it won't even look at the rest. So something is apparently wrong then. // juan Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
Re: system not using second entry in $PKG_PATH
On 11/19/07, Juan Miscaro [EMAIL PROTECTED] wrote: --- Marc Espie [EMAIL PROTECTED] wrote: On Mon, Nov 19, 2007 at 08:21:17AM -0500, Juan Miscaro wrote: However the second one (PKG_PATH_LAN2) is never consulted. If I remove the first one then packages are found and installed with no problem. Why is this happening? Because it's designed that way. The second entry is only consulted if a matching package is not found in the first repository. It works like a linker path: pkg_add only looks at entries while it did not find a suitable candidate. But the first repository does not contain a candidate. That's what I'm saying. The intention is that you should put your preferred repository at the front, and less wanted stuff later: if pkg_add finds something in the preferred repository, it won't even look at the rest. So something is apparently wrong then. I saw this bug two years ago when I first started with OpenBSD. I assumed I was doing something wrong and forgot about it. things to try: are you sure the second repository has the package you need? -Nick
Re: system not using second entry in $PKG_PATH
--- Nick Guenther [EMAIL PROTECTED] wrote: On 11/19/07, Juan Miscaro [EMAIL PROTECTED] wrote: --- Marc Espie [EMAIL PROTECTED] wrote: On Mon, Nov 19, 2007 at 08:21:17AM -0500, Juan Miscaro wrote: However the second one (PKG_PATH_LAN2) is never consulted. If I remove the first one then packages are found and installed with no problem. Why is this happening? Because it's designed that way. The second entry is only consulted if a matching package is not found in the first repository. It works like a linker path: pkg_add only looks at entries while it did not find a suitable candidate. But the first repository does not contain a candidate. That's what I'm saying. The intention is that you should put your preferred repository at the front, and less wanted stuff later: if pkg_add finds something in the preferred repository, it won't even look at the rest. So something is apparently wrong then. I saw this bug two years ago when I first started with OpenBSD. I assumed I was doing something wrong and forgot about it. things to try: are you sure the second repository has the package you need? Well like I posted, if I remove the first repository the package installs fine. // juan Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://mail.yahoo.ca
Re: system not using second entry in $PKG_PATH
ask yourself why do you use ':' as a separator? you have ':' in you PKG_PATH_LAN1 and PKG_PATH_LAN2. this is by the way the reason why you can't do what you're trying to. On Monday 19 November 2007 14.21:17 Juan Miscaro wrote: On two OpenBSD 4.2 systems I have a (master) system that contains two repositories - one of regular packages and one of packages derived from ports. On the client (slave) system I have a script with a PKG_PATH containing both repositories: PKG_PATH_LAN1=ftp://$MASTER/$VERSION/packages/ PKG_PATH_LAN2=ftp://$MASTER/$VERSION/packages/by_port/i386/all/ PKG_PATH=$PKG_PATH_LAN1:$PKG_PATH_LAN2 However the second one (PKG_PATH_LAN2) is never consulted. If I remove the first one then packages are found and installed with no problem. Why is this happening? // juan Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
Re: system not using second entry in $PKG_PATH
On Monday 19 November 2007 14.21:17 Juan Miscaro wrote: On two OpenBSD 4.2 systems I have a (master) system that contains two repositories - one of regular packages and one of packages derived from ports. On the client (slave) system I have a script with a PKG_PATH containing both repositories: PKG_PATH_LAN1=ftp://$MASTER/$VERSION/packages/ PKG_PATH_LAN2=ftp://$MASTER/$VERSION/packages/by_port/i386/all/ PKG_PATH=$PKG_PATH_LAN1:$PKG_PATH_LAN2 However the second one (PKG_PATH_LAN2) is never consulted. If I remove the first one then packages are found and installed with no problem. --- christian widmer [EMAIL PROTECTED] wrote: ask yourself why do you use ':' as a separator? you have ':' in you PKG_PATH_LAN1 and PKG_PATH_LAN2. this is by the way the reason why you can't do what you're trying to. { fixed top posting } Well the pkg_add man page seems to disagree: If the given package names are not found in the current working directo- ry, pkg_add will search for them in each directory named by the PKG_PATH environment variable. Since a few URL schemes contain colons, pkg_add relies on each directory ending in a / to split the path correctly. // juan Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
Re: system not using second entry in $PKG_PATH
On 2007/11/19 22:35, christian widmer wrote: ask yourself why do you use ':' as a separator? see pkg_add(8) about PKG_PATH