pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to get started with pkgsrc, or is it sh bug?



from Patrick Welche:

  On Fri, Jul 21, 2017 at 07:14:44AM +0000, Thomas Mueller wrote:
  > System is NetBSD-current amd64 (8.99.1), June 20, 2017,
          
  > sh: /usr/pkg/sbin/pkg_info: not found
  > sh: /usr/pkg/sbin/pkg_admin: not found
  
  For me:
  
  $ which pkg_info
  /usr/sbin/pkg_info
  $ cat /etc/pkgpath.conf
  #       $NetBSD: pkgpath.conf,v 1.1 2013/05/01 05:36:25 agc Exp $
  #
  # packaging tools configuration
  
  if [ -r /etc/defaults/pkgpath.conf ]; then
          . /etc/defaults/pkgpath.conf
  fi
  
  # Add local overrides below
  #
  $ cat /etc/defaults/pkgpath.conf
  #       $NetBSD: pkgpath.conf,v 1.1 2013/05/01 05:36:25 agc Exp $
  #
  # /etc/defaults/pkgpath.conf --
  #       default configuration of /etc/pkgpath.conf
  #
  # packaging tools configuration
  #
  # DO NOT EDIT THIS FILE DIRECTLY; IT MAY BE REPLACED DURING A SYSTEM UPGRADE.
  # EDIT /etc/pkgpath.conf INSTEAD.
  #
          
  pkg_admin=/usr/sbin/pkg_admin
  pkg_info=/usr/sbin/pkg_info

I seem to have the same thing as you have regarding /etc/pkgpath.conf and /etc/defaults/pkgpath.conf .

But after building some pkgtools including possibly meta-pkgs/pkg_developer, bigger versions of pkg_admin and pkg_info, and more, are installed in /usr/pkg/sbin.

Then I would want to use these tools in /usr/pkg/sbin, but to get started, one would need the tools in /usr/sbin .

One thought I have is to try on an old NetBSD 6.99.44 installation on a USB stick, with no packages, and just try to build pkgtools/cwrappers as a test.

I did this, same error.  Now I have the thought that everything depending on cwrappers, including cwrappers itself, causes a circular dependency when trying to get started by building pkgtools/cwrappers or anything else.

I looked in the Makefile, whose last line is
.include "../../mk/bsd.pkg.mk"

so I looked there, and found

# Fail-safe in the case of circular dependencies
.if defined(_PKGSRC_DEPS) && defined(PKGNAME) && !empty(_PKGSRC_DEPS:M${PKGNAME})
PKG_FAIL_REASON+=       "Circular dependency detected"
.endif

just the error I had.

Maybe the bug is that cwrappers depends on itself.  Could that be fixed in the Makefile?

Or maybe add 
USE_CWRAPPERS=no
to /etc/mk.conf
and comment that out after cwrappers is installed?  But if that is the solution, it should be documented.

I also found that /usr/pkg/sbin/pkg_admin and friends/allies come from pkgtools/pkg_install (checked the PLIST).

I am in FreeBSD as I type this.

Tom


Home | Main Index | Thread Index | Old Index