update Makefile and man-pages

update TODO and README

pkg-get: add missing test in search()
This commit is contained in:
John McQuah 2023-06-21 16:24:01 -04:00
parent 07429271a3
commit 252c46d87e
8 changed files with 186 additions and 125 deletions

View File

@ -1,5 +1,5 @@
NAME=pkg-get NAME=pkg-get
VERSION="0.4.6" VERSION="0.4.8"
PREFIX=/usr PREFIX=/usr
CFGDIR=/etc CFGDIR=/etc
@ -8,27 +8,20 @@ MANDIR=/usr/share/man
all: all:
@echo "Use 'make install' to install pkg-get" @echo "Use 'make install' to install pkg-get"
man: dist:
#makeman doc/pkg-get.8.txt
#makeman doc/pkg-repgen.8.txt
#man2ps doc/pkg-get.8 | ps2pdf14 - > doc/pkg-get.pdf
dist: man
rm -rf ${NAME}-${VERSION} rm -rf ${NAME}-${VERSION}
mkdir ${NAME}-${VERSION} mkdir -p ${NAME}-${VERSION}/doc
cp -r doc scripts Makefile ChangeLog COPYING README TODO ${NAME}-${VERSION} cp -r scripts Makefile ChangeLog COPYING README TODO ${NAME}-${VERSION}
rm -f ${NAME}-${VERSION}/doc/*.txt cp doc/*.8 ${NAME}-${VERSION}/doc
rm -f ${NAME}-${VERSION}/doc/*.pdf cp doc/*.conf ${NAME}-${VERSION}/doc
tar cvzf ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION} tar cvzf ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION}
rm -rf ${NAME}-${VERSION} rm -rf ${NAME}-${VERSION}
install: install:
install -D -m 755 scripts/pkg-get.pl ${PREFIX}/bin/pkg-get
install -D -m 755 scripts/pkg-repgen.pl ${PREFIX}/bin/pkg-repgen install -D -m 755 scripts/pkg-repgen.pl ${PREFIX}/bin/pkg-repgen
install -D -m 755 scripts/pkg-get.pl ${PREFIX}/bin/pkg-get install -D -m 755 scripts/pkg-get.pl ${PREFIX}/bin/pkg-get
install -D -m 644 doc/pkg-get.8 ${MANDIR}/man8/pkg-get.8
install -D -m 644 doc/pkg-get.conf ${CFGDIR}/pkg-get.conf
install -D -m 644 doc/pkg-repgen.8 ${MANDIR}/man8/pkg-repgen.8 install -D -m 644 doc/pkg-repgen.8 ${MANDIR}/man8/pkg-repgen.8
install -D -m 644 doc/pkg-get.8 ${MANDIR}/man8/pkg-get.8 install -D -m 644 doc/pkg-get.8 ${MANDIR}/man8/pkg-get.8
install -D -m 644 doc/pkg-get.conf ${CFGDIR}/pkg-get.conf

33
README
View File

@ -84,8 +84,8 @@ of previewing the outcome from a 'pkg-get depinst' operation.
useful prt-get commands (grpinst, fsearch, deptree, listorphans, ls, useful prt-get commands (grpinst, fsearch, deptree, listorphans, ls,
cat, edit, cache) have no counterpart in pkg-get. Of these omissions, cat, edit, cache) have no counterpart in pkg-get. Of these omissions,
only the 'grpinst' command is of possible interest for binary package only the 'grpinst' command is of possible interest for binary package
management; the unimplemented commands and options are better handled management; the unimplemented commands and options are just as easily
by prt-get itself. If you want a Perl implementation that does delegated to prt-get itself. If you want a Perl implementation that does
provide these missing commands, consider the script written by user provide these missing commands, consider the script written by user
farkuhar [1]. farkuhar [1].
@ -96,16 +96,31 @@ packages needed by 'foo'. User ppetrov^ has contributed some helper scripts
to facilitate the fixing of these broken binaries; visit the site [2] to to facilitate the fixing of these broken binaries; visit the site [2] to
download them. download them.
Further omissions related to dependencies are the absence of any mechanism
for declaring aliases (e.g., package openjdk16-bin can serve as a drop-in
replacement for the listed dependency openjdk16), and the lack of an --ignore
switch (to exclude certain packages from being installed in a 'depinst'
operation). You can work around these omissions by avoiding 'depinst'
entirely, and manually performing the desired 'install' transactions (once
you have a clear sense of what the actual runtime dependencies are).
These gaps in pkg-get's design highlight an awkward fact about trying to erect
an infrastructure for binary package management upon a foundation designed for
compiling source code (the ports tree). Inheriting the Pkgfile's lack of
separation between build-time and runtime dependencies, pkg-get will unwittingly
recurse through all the dependencies (in a 'depinst' transaction) and install
packages that you might not really need. Hence the suggestion to consider
avoiding 'depinst', running only 'install' and the helper script written
by ppetrov^ [2].
In handling any new hard dependencies added by the maintainer since In handling any new hard dependencies added by the maintainer since
the previous version of a package, pkg-get performs a sysup in the same the previous version of a package, pkg-get performs a sysup in the same
manner as the original prt-get (i.e., new dependencies are not injected manner as the original prt-get (i.e., new dependencies are not injected
by default). Perhaps in future versions it will be the default to perform by default). With binary packages there's no need to carry out the
automatic injection of new dependencies, which is easy with binary packages installation in any particular order, so the lack of dependency injection is
since there's no need to carry out the installation in any particular order. actually less of a problem for pkg-get than it was for prt-get. Running
In the meantime, you can check the output of ppetrov^'s script [2] should help identify the packages you will need to
'pkg-get depends $mypkg | grep "\[ \]"' install to fix any breakage.
for each package affected by a sysup, in order to see whether the
maintainer has added new dependencies.
[1] https://git.sdf.org/jmq/Documentation/src/branch/master/scripts/prt-auf [1] https://git.sdf.org/jmq/Documentation/src/branch/master/scripts/prt-auf
[2] https://github.com/slackalaxy/depsck [2] https://github.com/slackalaxy/depsck

4
TODO
View File

@ -15,4 +15,6 @@ TODO file for pkg-get
- let the user control whether pkg-repgen prints the metadata only for the - let the user control whether pkg-repgen prints the metadata only for the
latest built package, or for all the versions in the directory latest built package, or for all the versions in the directory
- improve pkg-get help information - add support for aliases (?)
- switch from MD5 to a different hash function (?)

View File

@ -1,20 +1,20 @@
.TH pkg-get 8 "July 13, 2006" "" "" .TH pkg-get 8 "July 13, 2006" "" ""
.SH NAME .SH NAME
\fBpkg-get \fP- a package management tool for CRUX Linux \fBpkg\-get \fP- a package management tool for CRUX Linux
\fB \fB
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.fam C .fam C
\fBpkg-get\fP \fIcommand\fP <arguments> [\fIoptions\fP] \fBpkg\-get\fP \fIcommand\fP <arguments> [\fIoptions\fP]
.fam T .fam T
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
\fBpkg-get\fP is a simple package management tool for CRUX Linux. \fBpkg\-get\fP is a simple package management tool for CRUX Linux.
It tries to replicate some of the most useful features of the It tries to replicate some of the most useful features of the
port management tool \fBprt-get\fP(8) to be used with binary packages. port management tool \fBprt\-get\fP(8) to be used with binary packages.
\fBpkg-get\fP requires a remote or local package repository that \fBpkg\-get\fP requires a remote or local package repository that
can be generated by repository maintainers with the can be generated by repository maintainers with the
\fBpkg-repgen\fP(8) script. \fBpkg\-repgen\fP(8) script.
.SH COMMANDS .SH COMMANDS
.TP .TP
.B .B
@ -26,9 +26,9 @@ update <package1> [<package2>..<packageN>]
Update given packages, download if necessary. Update given packages, download if necessary.
.TP .TP
.B .B
diff [\fB--all\fP] diff [\fB\-\-all\fP]
Show a list of outdated packages. Show a list of outdated packages.
The \fB--all\fP option also displays locked packages. The \fB\-\-all\fP option also displays locked packages.
.TP .TP
.B .B
quickdiff quickdiff
@ -46,25 +46,25 @@ Install given packages and relative dependencies.
.TP .TP
.B .B
depends <package> depends <package>
Show a recursive list of dependencies for package Show a recursive list of dependencies for <package>
and their installation status. and their installation status.
.TP .TP
.B .B
quickdep <package> quickdep <package>
Show a brief list of dependencies for package. Show a brief list of dependencies for <package>.
.TP .TP
.B .B
dependent <package> [\fB--all\fP] dependent <package> [\fB\-\-all\fP]
Show installed (or all with the \fB--all\fP option) packages Show installed (or all with the \fB\-\-all\fP option) packages
that depend from package. that depend on <package>.
.TP .TP
.B .B
path <package> path <package>
Show local path of package. Show local path of <package>.
.TP .TP
.B .B
info <package> info <package>
Show information about package. Show information about <package>.
.TP .TP
.B .B
current <package> current <package>
@ -80,7 +80,7 @@ Print README information (if available) for the package.
.TP .TP
.B .B
list list
List all packages in the repository. List all packages in the active repositories.
.TP .TP
.B .B
listinst listinst
@ -88,18 +88,18 @@ List all installed packages.
.TP .TP
.B .B
dsearch <string> dsearch <string>
Search for packages which name or description contain <string>. Search for packages whose name or description contains <string>.
.TP .TP
.B .B
search <string> search <string>
Search for packages which name contains <string>. Search for packages whose name contains <string>.
.TP .TP
.B .B
dup dup
List all duplicates ports (present in more than one repository). List all duplicate ports (present in more than one repository).
.TP .TP
.B .B
printf <format string1> [\fB--filter\fP=<filter>] printf <format string1> [\fB\-\-filter\fP=<filter>]
Description blatantly stolen from \fBprt\-get\fP(8). Description blatantly stolen from \fBprt\-get\fP(8).
Print formatted port list. Format string can contain variables, Print formatted port list. Format string can contain variables,
which are replaced like this: which are replaced like this:
@ -125,7 +125,7 @@ which are replaced like this:
.IP \(bu 3 .IP \(bu 3
%O -> post-install script ("yes"/"no") %O -> post-install script ("yes"/"no")
.IP \(bu 3 .IP \(bu 3
%M -> "Nobody". for compatibility with prt-get %M -> "None". for compatibility with prt-get
.IP \(bu 3 .IP \(bu 3
%P -> "None". for compatibility with prt-get %P -> "None". for compatibility with prt-get
.IP \(bu 3 .IP \(bu 3
@ -143,7 +143,7 @@ You can specify a wildcard filter to filter by package name.
.TP .TP
.B .B
lock <package1> [<package2>..<packageN>] lock <package1> [<package2>..<packageN>]
Lock a package (ignore updates). Lock a package (exclude it from being updated in a \fBsysup\fP).
.TP .TP
.B .B
unlock <package1> [<package2>..<packageN>] unlock <package1> [<package2>..<packageN>]
@ -164,47 +164,65 @@ Display brief help screen.
.TP .TP
.B .B
version version
Show \fBpkg-get\fP version. Show \fBpkg\-get\fP version.
.SH OPTIONS .SH OPTIONSB
.TP .TP
.B .B
\fB-r\fP <root> \fB\-do\fP
Use <root> directory for operations involving the package database
(install, depinst, update, isinst, current, listinst, diff, quickdiff, sysup).
This option does not affect the directories from which \fBpkg-get\fP loads the
metadata or tarballs; those settings are still governed by the entries in
the configuration file.
.TP
.B
\fB-do\fP
Download only. Applicable to: sysup, install, depinst, update. Download only. Applicable to: sysup, install, depinst, update.
.TP .TP
.B .B
\fB-f\fP \fB\-f\fP
Force installing / upgrading. This is passed to \fBpkgadd\fP(8). Force installing / upgrading. This is passed to \fBpkgadd\fP(8).
.TP .TP
.B .B
\fB-im\fP \fB\-im\fP
Ignore md5sum mismatches. Ignore md5sum mismatches.
.TP .TP
.B .B
\fB--aargs\fP="arguments" \fB\-\-aargs\fP="arguments"
pass the specified arguments to \fBpkgadd\fP(8). Pass the specified arguments to \fBpkgadd\fP(8).
.TP .TP
.B .B
\fB--config\fP=/path/to/file \fB\-\-config\fP=/path/to/file
Use the specified configuration file. Use the specified configuration file.
.TP .TP
.B .B
\fB--pre-install\fP \fB\-r\fP <root>
Use <root> directory for operations involving the package database
(install, depinst, update, isinst, current, listinst, diff, quickdiff, sysup).
This option does not affect the directories from which \fBpkg\-get\fP loads the
metadata or tarballs; those settings are still governed by the entries in
the configuration file.
When using \fB\-r\fP <root>, the relevant pkgadd.conf is the one on the
target filesystem, not the one where \fBpkg\-get\fP is running. Any custom
directives in your pkgadd.conf should be copied to the corresponding
location under the new root, or else you should pass the \fB\-\-aargs\fP
option to tell \fBpkgadd\fP to read its configuration from a non-standard
location.
When combined with \fB\-\-pre\-install\fP or \fB\-\-post\-install\fP or
\fB\-\-install\-scripts\fP, setting a root directory other than '/' has the
side effect of copying the PKGINST shell script into the corresponding
location under the new root. This action (and the subsequent chroot command)
is the most direct way to accommodate the user's intention. Unfortunately it
clutters the mounted volume with a small fragment of shell script. If such
clutter is not desired, the option \fB\-r\fP <root> should always be paired
with the configuration setting 'runscripts no', leaving it up to the
administrator of the mounted volume to perform any pre- or post-install
tasks separately.
.TP
.B
\fB\-\-pre\-install\fP
Execute pre-install script if available. Execute pre-install script if available.
.TP .TP
.B .B
\fB--post-install\fP \fB\-\-post\-install\fP
Execute post-install script if available. Execute post-install script if available.
.TP .TP
.B .B
\fB--install-scripts\fP \fB\-\-install\-scripts\fP
Execute pre-install and post-install Execute pre-install and post-install
scripts if available. scripts if available.
.RE .RE
@ -216,17 +234,17 @@ Configuration is handled by the /etc/pkg-get.conf file,
.SH EXAMPLES .SH EXAMPLES
.TP .TP
.B .B
\fBpkg-get\fP install sqlite pysqlite \fBpkg\-get\fP install sqlite pysqlite
Install sqlite and pysqlite. Install sqlite and pysqlite.
.TP .TP
.B .B
\fBpkg-get\fP depinst qt6-base \fB-f\fP \fBpkg\-get\fP depinst qt6-base \fB\-f\fP
Install qt6-base and all its dependencies, forcing upgrade. Install qt6-base and all its dependencies, forcing upgrade.
.TP .TP
.B .B
\fBpkg-get\fP sysup \fB-do\fP \fBpkg\-get\fP sysup \fB\-do\fP
Download new releases of all the outdated packages. Download new releases of all the outdated packages.
.SH AUTHORS .SH AUTHORS
Simone Rota <sip@varlock.com>, John McQuah <jmcquah@disroot.org> Simone Rota <sip@varlock.com>, John McQuah <jmcquah@disroot.org>
.SH SEE ALSO .SH SEE ALSO
\fBpkgadd\fP(8), \fBprt-get\fP(8), \fBpkg-repgen\fP(8) \fBpkgadd\fP(8), \fBprt\-get\fP(8), \fBpkg\-repgen\fP(8)

View File

@ -7,11 +7,11 @@ SYNOPSIS
pkg-get command <arguments> [options] pkg-get command <arguments> [options]
DESCRIPTION DESCRIPTION
pkg-get is a simple package management tool for CRUX Linux. pkg-get is a simple package management tool for CRUX Linux. It
It tries to replicate some of the most useful features of the tries to replicate some of the most useful features of the port
port management tool prt-get(8) to be used with binary packages. management tool prt-get(8) to be used with binary packages.
pkg-get requires a remote or local package repository that can be pkg-get requires a remote or local package repository that can be
generated by repository maintainers with the pkg-repgen(8) script. generated by repository maintainers with the pkg-repgen(8) script.
COMMANDS COMMANDS
install <package1> [<package2>..<packageN>] install <package1> [<package2>..<packageN>]
@ -21,14 +21,14 @@ COMMANDS
Update given packages, download if necessary. Update given packages, download if necessary.
diff [--all] diff [--all]
Show a list of outdated packages. The --all option also Show a list of outdated packages. The --all option
displays locked packages. also dis plays locked packages.
quickdiff quickdiff
Show a compact list of outdated packages. Show a compact list of outdated packages.
sysup [--all] sysup [--all]
Update all outdated packages, download if necessary. Update all outdated packages, download if necessary.
Locked packages are excluded from the operation unless Locked packages are excluded from the operation unless
--all is passed. --all is passed.
@ -36,21 +36,21 @@ COMMANDS
Install given packages and relative dependencies. Install given packages and relative dependencies.
depends <package> depends <package>
Show a recursive list of dependencies for package and Show a recursive list of dependencies for <package>
their installation status. and their installation status.
quickdep <package> quickdep <package>
Show a brief list of dependencies for package. Show a brief list of dependencies for <package>.
dependent <package> [--all] dependent <package> [--all]
Show installed (or all with the --all option) packages Show installed (or all with the --all option) packages
that depend from package. that de pend on <package>.
path <package> path <package>
Show local path of package. Show local path of <package>.
info <package> info <package>
Show information about package. Show information about <package>.
current <package> current <package>
Show currently installed version of package. Show currently installed version of package.
@ -61,7 +61,7 @@ COMMANDS
readme <package> readme <package>
Print README information (if available) for the package. Print README information (if available) for the package.
list List all packages in the repository. list List all packages in the active repositories.
listinst listinst
List all installed packages. List all installed packages.
@ -77,35 +77,47 @@ COMMANDS
repository). repository).
printf <format string1> [--filter=<filter>] printf <format string1> [--filter=<filter>]
Description blatantly stolen from prt-get(8). Print Description blatantly stolen from prt-get(8). Print
formatted port list. Format string can contain variables, formatted port list. Format string can contain variables,
which are replaced like this: which are re placed like this:
• %n -> name • %n -> name
• %p -> path • %p -> path
• %v -> version • %v -> version
• %r -> release • %r -> release
• %d -> description • %d -> description
• %e -> dependencies • %e -> dependencies
• %u -> url • %u -> url
• %R -> Readme ("yes"/"no") • %R -> Readme ("yes"/"no")
• %E -> pre-install script ("yes"/"no") • %E -> pre-install script ("yes"/"no")
• %O -> post-install script ("yes"/"no") • %O -> post-install script ("yes"/"no")
• %M -> "Nobody". for compatibility with prt-get
• %M -> "None". for compatibility with prt-get
• %P -> "None". for compatibility with prt-get • %P -> "None". for compatibility with prt-get
• %l -> is locked ("yes"/"no") • %l -> is locked ("yes"/"no")
• %i -> "no" if not installed, "yes" if it's installed
and up to date and "diff" if it's installed and • %i -> "no" if not installed, "yes" if it's installed
a new version is in the repository. and up to date and "diff" if it's installed and a new
version is in the repository.
Use "\n" and "\t" to format your output (no additional format Use "\n" and "\t" to format your output (no additional format
codes supported). The optional format string2 can contain codes supported). The optional format string2 can contain the
the same variables as format string1 and is used to sort same variables as format string1 and is used to sort the output.
the output. You can specify a wildcard filter to filter by You can specify a wildcard filter to filter by package name.
package name.
lock <package1> [<package2>..<packageN>] lock <package1> [<package2>..<packageN>]
Lock a package (ignore updates). Lock a package (exclude it from being updated in a sysup).
unlock <package1> [<package2>..<packageN>] unlock <package1> [<package2>..<packageN>]
Unlock a package. Unlock a package.
@ -122,15 +134,7 @@ COMMANDS
version version
Show pkg-get version. Show pkg-get version.
OPTIONS OPTIONSB
-r <root>
Use <root> directory for operations involving the package
database (install, depinst, update, isinst, current,
listinst, diff, quick diff, sysup). This option does
not affect the directories from which pkg-get loads the
metadata or tarballs; those settings are still governed
by the entries in the configuration file.
-do Download only. Applicable to: sysup, install, depinst, -do Download only. Applicable to: sysup, install, depinst,
update. update.
@ -144,6 +148,35 @@ OPTIONS
--config=/path/to/file --config=/path/to/file
Use the specified configuration file. Use the specified configuration file.
-r <root>
Use <root> directory for operations involving the package
database (install, depinst, update, isinst, current,
listinst, diff, quickdiff, sysup). This option does
not affect the directories from which pkg-get loads the
metadata or tarballs; those settings are still
governed by the entries in the configuration file.
When using -r <root>, the relevant pkgadd.conf is the one
on the target filesystem, not the one where pkg-get is
running. Any custom directives in your pkgadd.conf should
be copied to the corresponding location under the
new root, or else you should pass the --aargs option to
tell pkgadd to read its configuration from a non-standard
location.
When combined with --pre-install or --post-install
or --install-scripts, setting a root directory other
than '/' has the side effect of copying the PKGINST
shell script into the corresponding location under
the new root. This action (and the subsequent chroot
command) is the most direct way to accommodate the user's
intention. Unfortunately it clutters the mounted volume
with a small fragment of shell script. If such clutter
is not desired, the option -r <root> should always be
paired with the configuration setting 'runscripts no',
leaving it up to the administrator of the mounted volume
to perform any pre- or post- install tasks separately.
--pre-install --pre-install
Execute pre-install script if available. Execute pre-install script if available.
@ -173,4 +206,4 @@ AUTHORS
SEE ALSO SEE ALSO
pkgadd(8), prt-get(8), pkg-repgen(8) pkgadd(8), prt-get(8), pkg-repgen(8)
July 13, 2006 pkg-get(8) July 13, 2006 pkg-get(8)

View File

@ -1,18 +1,18 @@
.TH pkg-repgen 8 "July 13, 2006" "" "" .TH pkg-repgen 8 "July 13, 2006" "" ""
.SH NAME .SH NAME
\fBpkg-repgen \fP- generate a package repository for pkg-get \fBpkg\-repgen \fP- generate a package repository for pkg-get
\fB \fB
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.fam C .fam C
\fBpkg-repgen\fP [options][package1\.\.\.packageN] \fBpkg\-repgen\fP [options][package1\.\.\.packageN]
.fam T .fam T
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
\fBpkg-repgen\fP generates files needed by a \fBpkg-get\fP(8) package \fBpkg\-repgen\fP generates files needed by a \fBpkg\-get\fP(8) package
repository. It also generates a html index of the packages. repository. It also generates a html index of the packages.
.SH USAGE .SH USAGE
Run \fBpkg-repgen\fP from the directory containing packages to Run \fBpkg\-repgen\fP from the directory containing packages to
generate the whole repository. generate the whole repository.
Specify a list of package names to update only those packages Specify a list of package names to update only those packages
(this is especially useful with large repositories). (this is especially useful with large repositories).
@ -22,26 +22,26 @@ scripts.
.SH OPTIONS .SH OPTIONS
.TP .TP
.B .B
\fB--header\fP=FILE \fB\-\-header\fP=FILE
insert FILE at the beginning of the html index insert FILE at the beginning of the html index
.TP .TP
.B .B
\fB--header\fP=FILE \fB\-\-header\fP=FILE
insert FILE at the beginning of the html index insert FILE at the beginning of the html index
.TP .TP
.B .B
\fB--title\fP=title \fB\-\-title\fP=title
use the specified title for the index page use the specified title for the index page
.TP .TP
.B .B
\fB--prtdir\fP=DIR \fB\-\-prtdir\fP=DIR
use alternative prtdir for prt-get commands use alternative prtdir for prt-get commands
.SH EXAMPLES .SH EXAMPLES
\fBpkg-repgen\fP \fBpkg\-repgen\fP
.PP .PP
\fBpkg-repgen\fP qt6-base qt6-tools \fBpkg\-repgen\fP qt6-base qt6-tools
.SH AUTHORS .SH AUTHORS
Simone Rota <sip@varlock.com>, John McQuah <jmcquah@disroot.org> Simone Rota <sip@varlock.com>, John McQuah <jmcquah@disroot.org>
index generation code adapted from Jukka Heino's portspage index generation code adapted from Jukka Heino's portspage
.SH SEE ALSO .SH SEE ALSO
\fBpkg-get\fP(8), \fBprt-get\fP(8) \fBpkg\-get\fP(8), \fBprt\-get\fP(8)

View File

@ -1,4 +1,4 @@
pkg-repgen(8) pkg-repgen(8)
NAME NAME
pkg-repgen - generate a package repository for pkg-get pkg-repgen - generate a package repository for pkg-get
@ -11,12 +11,12 @@ DESCRIPTION
repository. It also generates a html index of the packages. repository. It also generates a html index of the packages.
USAGE USAGE
Run pkg-repgen from the directory containing packages to generate Run pkg-repgen from the directory containing packages to
the whole repository. Specify a list of package names to generate the whole repository. Specify a list of package names
update only those packages (this is especially useful with large to update only those packages (this is especially useful with
repositories). Even when individual packages are specified, large repositories). Even when individual packages are specified,
the entire directory is still processed to collect all the the entire directory is still processed to collect all the readmes
readmes and {pre,post}-install scripts. and {pre,post}-install scripts.
OPTIONS OPTIONS
--header=FILE --header=FILE
@ -43,4 +43,4 @@ AUTHORS
SEE ALSO SEE ALSO
pkg-get(8), prt-get(8) pkg-get(8), prt-get(8)
July 13, 2006 pkg-repgen(8) July 13, 2006 pkg-repgen(8)

View File

@ -560,8 +560,8 @@ sub search {
my %pkg = parsepackage($_, $dir, $url); my %pkg = parsepackage($_, $dir, $url);
next if ($found{$pkg{'name'}}); next if ($found{$pkg{'name'}});
(index($pkg{'name'}, $arg) < 0) or $found{$pkg{'name'}} = 1; (index($pkg{'name'}, $arg) < 0) or $found{$pkg{'name'}} = 1;
($found{$pkg{'name'}}==1) or ($type ne "desc") (! $found{$pkg{'name'}}) or ($found{$pkg{'name'}}==1)
or (index($pkg{'description'}, $arg) < 0) or ($type ne "desc") or (index($pkg{'description'}, $arg) < 0)
or $found{$pkg{'name'}} = 1; or $found{$pkg{'name'}} = 1;
} }
close(REPO); close(REPO);