pkgsrc-Users archive

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

RFC: nih - package manager for pkgsrc



Hello. For a few weeks I've been developing new package manager for
pkgsrc ( wip/pkgnih-current ).

The long term goal of this project is to provide both binary and
source-based update capabilities (in particular to be an alternative for
pkg_comp, pkg_chk and pkg_rr).  At this moment however only binary
update is implemented. wip/distbb will be used for safe source-based
update (build everything in chroots first, and then install).

pkgnih is very similar to Linux's zypper, apt and yum.

Features:
   - perl-5.10->5.12 or similar huge updates may be done
     fully automatically without interaction with user
   - first - questions (prompts), second - actions
   - nih starts to delete/add packages only if it is absolutely sure
     that the whole system at the end of update will be in a consistent
     state (DEPENDS, CONFLICTS, PROVIDES/REQUIRES are analysed).
     It should not stop anywhere in the middle and leave system in
     inconsistent state unless I missed something.
   - during update conflicts and missed dependencies (if any) may be resolved
     manually step by step if they cannot be resolve automatically for
     any reason
   - remarkable search capabilities
   - flexibility, nih is written in shell (based on wip/pkg_summary-utils)
   - nih downloads all binaries before starting the update
   - see the manual page for the rest

As the version of the package says (0.0) "nih" is not stable yet, it is
in active development now, but it is good enough for playing with it and
it is safe (you'll be promped before package removal or
installing). Also some features, e.g. "nih clean" and "nih audit" have
not been implemented yet.

So, this is a request for comments, feedback, suggestions and so on.

################################################################################
NAME
       nih - package manager for pkgsrc

SYNOPSIS
       nih [options] <command> [command options] [--] [args...]
       nih <command> -h

DESCRIPTION
       The  nih is a command-line tool for managing pkgsrc packages. It relies
       on pkg_summary(5) for installation, removal and update of packages  and
       associated dependencies, using remote or local repository.

OPTIONS
       -h     Display help message.

       -V     Display nih version.

       -y     Answer 'Yes' to all questions.

COMMANDS
       The following commands are provided.

       help   Display help message

       refresh
              Download  pkg_summary(5) and SHA512 files from remote repository
              and unpack them to ~/.nih/. URL for these files is specified  in
              PKG_SUMMARY_URL configuration variable.
              nih refresh accepts the following options:

              -h     Display help message.

       search Search  for  packages  in  pkg_summary(5), online database or in
              installed packages.  For details see pkg_digger(1).
              nih search accepts the following options:

              -h     Display help message.

              -b     Search in pkg_summary.txt (the default).

              -o     Search using pkg_online provided by wip/pkg_online-client
                     package.

              -I     Search in installed packages.

              -s     Output search strategies.

              -f     Output search fields.

              -1     Display 1-line information about packages (default).

              -3     Display short information about packages.

              -9     Display full information about packages.

              -r     Raw output in pkg_summary(5) format.

              -q     Quiet mode, do not print "No matches found" to stderr.
              Examples:
                 nih search -h
                 nih search -s
                 nih search -f
                 nih search DEPENDS:substring:libmaa
                 nih search PKGNAME:prefix:dict
                 nih search COMMENT:word:dns PKGPATH:prefix:net
                 nih search c:kw:'dns server'
                 nih search n:p:lua
                 nih search FILE_SIZE:awk:'fvalue+0 > 100000000'
                 nih search -9 lang/mawk
                 nih search -os
                 nih search -of
                 nih search -o oberon
                 nih search -o dns server
                 nih search -o3 dictionary -spell -japanese -chinese -korean
                 nih search -o -q9r spreadsheet

       install and update
              Install  or  update specified packages. They may be specified as
              PKGBASEs, PKGNAMEs or  PKGPATHs,  optionally  prepanded  by  `-'
              (marker for removal), `+' or `*' (marker for auto-removable), or
              `?'  (auto-removable flag will not be changed).  Packages  with-
              out  prefix  will  be marked as installed by user.  nih tries to
              resolve conflicts and to satisfy dependencies automatically,  If
              it  fails,  one  can  do  this  manually.  By default PKGPATH of
              installed packages remain unchanged, that is  if,  for  example,
              emacs-21  was  installed  from  editors/emacs21,  it will not be
              updated to emacs-23 from editors/emacs23.  If  you  want  to  do
              this, run the following:

                 nih install editors/emacs23 -emacs

              nih install accepts the following options:

              -h     Display help message.

              -n     Don't  actually install/remove a package, just report the
                     steps that would be taken if it were.
              Examples:
                 nih install -h
                 nih update # will update the whole system
                 nih install mawk lang/gawk
                 nih install perl -p5-Digest
                 nih install editors/emacs20 -emacs
                 nih install +GConf +xproto
                 nih install -- -gmake -autoconf -automake -libtool-base
                 nih install textproc/dict-client -wip/dict-client

       uninstall, delete and remove
              Uninstall packages and dependent packages.
              nih uninstall accepts the following options:

              -h     Display help message.

              -n     Don't actually remove a package, just  report  the  steps
                     that would be taken if it were.
              Examples:
                 nih uninstall -h
                 nih remove mawk lang/gawk
                 nih delete perl

       verify Verify packages integrity.
              nih verify accepts the following options:

              -h     Display help message.

              -m     Check checksums of installed files.

              -U     Check for REQUIRES/PROVIDES coherence.

              -L     Check  for existence of library files listed in REQUIRES.

              -d     Check for presence of dependencies and their versions.
              Examples:
                 nih verify -dLU
                 nih verify -m
                 nih verify -m 'lib*' gawk

       status Compare installed packages  and  their  versions  with  pkg_sum-
              mary(5) (default) or pkgsrc tree. For details see pkg_status(1).
              nih status accepts the following options:

              -h     Display help message.

              -b     Compare installed packages  against  pkg_summary(5)  (the
                     default).

              -s     Compare installed packages against pkgsrc tree.

              -r     Raw output (pkg_summary format).

              -u     Analyse   packages  marked  as  installed  by  user  (the
                     default, see -a).

              -a     Analyse all packages (see -u).

              -A     By default up-to-date packages are not  output,  with  -A
                     they are output too

              -q     No noisy reminder about output format.
              Examples:
                 nih status -a
                 nih status -uq
                 nih status -sqr pkglint

       audit  Security audit (not implemented yet).

       leaf   Output or remove auto-removed leaf packages.
              nih leaf accepts the following options:

              -h     Display help message.

              -t     Output only PKGNAME.

              -R     Remove auto-removed leaf packages.

              -E     Remove auto-removed leaf packages recursively.

              -n     Pass -n to pkg_delete(1).
              Examples:
                 nih leaf -t
                 nih leaf -R
                 nih leaf -En

       license
              (not implemented yet)

       list   (not implemented yet)

       mark   Mark packages as auto-removed or as installed by user.
              nih mark accepts the following options:

              -h     Display help message.

              -u     Mark packages as installed by user.

              -a     Mark packages as auto-removable.
              Examples:
                 nih mark -a libmaa
                 nih mark -u pkg_status

       deps         Output a dependency graph of installed packages.
              nih deps accepts the following options:

              -h     Display help message.

              -r     Output  dependencies,  by  default dependent packages are
                     output.

              -l     Output list of packages instead of graph

              -B     Output PKGBASE (the default)

              -P     Output PKGPATH

              -N     Output PKGNAME

              -t     Output dependencies in tsort(1) compatible format
              Examples:
                 nih deps
                 nih deps -P
                 nih deps -PB
                 nih deps glib2
                 nih deps -r glib2
                 nih deps -lBP 'devel/glib2;glib2' 'devel/libmaa;libmaa'
                 nih deps -P devel/glib2 devel/libmaa

       clean  Clean-up DESTDIR or packages cache directories (not  implemented
              yet)

SEE ALSO
       pkg_status(1), pkg_digger(1), pkg_summary(5), pkg_summary-utils(7)

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index