summaryrefslogtreecommitdiff
path: root/mk/scripts
AgeCommit message (Collapse)AuthorFilesLines
2006-01-23If the package directory doesn't exist, then return a non-zero code. Thisjlam1-2/+6
allows us to distinguish the case where everything is what we expect, and any deviations from that main case.
2006-01-23Handle *.ZIP the same way as *.zip -- fixes fonts/cyberbit-ttf extraction.wiz1-2/+2
2006-01-21While walking the dependency graph, push the dependencies onto thejlam1-2/+6
stack in the reverse order that show-depends-pkgpaths outputs them. This makes the top element of the stack the first child dependency that was marked as "pushed". This change orders the default "postfix" output of this script in such a way that for any package listed in the output, there is no earlier package that depends on it. In other words, you can take the default output and install from first to last and never need to install any dependencies, because any dependencies are guaranteed to have already been installed earlier.
2006-01-21duh... stacks are LIFOs not FIFOs.jlam1-2/+2
2006-01-21Allow using standard input for the archive contents for tar and sharjlam1-3/+16
extraction.
2006-01-21Fix the case where -X excludefile is used so that we don't error out tryingjlam1-3/+7
to remove "".
2006-01-21Teach the extract script how to exclude files specified on the commandjlam1-2/+14
line from extraction when using tar (it already knew how to do it for pax).
2006-01-21Teach extract how to extract *.z files using gzip.jlam1-3/+4
2006-01-21Teach the extract script a "-d dir" option to extract into a specificjlam1-2/+13
directory.
2006-01-21Fix up the comments, and add a fall-through for unrecognized archivejlam1-5/+10
formats.
2006-01-21Fix other instance of _ZOO -> _ZIP and remove a debugging line.jlam1-3/+2
2006-01-21unzip should be using EXTRACT_OPTS_ZIP, not *_ZOO.jlam1-2/+3
2006-01-21Teach the extract script to simply copy the distfile over to thejlam1-16/+40
current working directory by default if it can't figure out what type of archive it is. This handles the most common case of overriding EXTRACT_CMD in package Makefiles, which is to copy a C file or a Perl script over to the work directory. Also, modify the script to allow the file format to be specified on the command line via a -f option, which will force the extract script to interpret the archive as the specified a format. This covers the case where there is a distfile with an unusual file extension that is actually in well-known format, and we would like to just tell the extract script which format this is.
2006-01-20Teach this script a default extraction method for *.bin files (which arejlam1-2/+7
what Sun packagse its JRE/JDKs as). While here, cleanup up the comments slightly.
2006-01-20Support listing files/patterns for exclusion in an "excludefile",jlam1-7/+28
which is correctly parsed and translated into the correct syntax for the underlying tool.
2006-01-20Add some whitespace for readability.jlam1-1/+8
2006-01-20Fix processing of -t tarprog.jlam1-3/+2
2006-01-20First pass at a script that replaces many of the variables, loops andjlam1-0/+190
logic in bsd.pkg.extract.mk. This script "knows" how to extract files depending on their file extension.
2006-01-18Add a "-s pkgsrcdir" option that allows specifying the path to the pkgsrcjlam1-6/+32
directory tree on the command line more easily.
2006-01-18Modify the show-depends-pkgpaths implementation so that we don't assumejlam1-0/+86
package directories specified in DEPENDS lines begin with "../..". The new standalone script pkgsrc/mk/scripts/pkg_path will canonicalize them into package paths relative to ${PKGSRCDIR}.
2006-01-18whitespace nit.jlam1-2/+1
2006-01-18Pass MAKEFLAGs to the depends-depth-first.awk script, which will bejlam1-1/+6
used by the "make show-depends-pkgpaths" process to short-circuit some of the rather lengthy computations that are spread throughout bsd.pkg.mk and files included by bsd.pkg.mk. This causes the script to speed up noticeably. Also, rename the _DEPENDS_DEPTH_FIRST_CMD variable to _DEPENDS_WALK_CMD for brevity and to allow for other implementations in the future.
2006-01-18Create a standalone awk script, depends-depth-first.awk, that encapsulatesjlam1-0/+273
the code that performs the dependency graph traversal (in depth-first fashion). This script has a hook that allows executing a shell command line upon visiting a dependency's package directory in either prefix or postfix order, and may be used to simplify the code in bsd.pkg.mk that iterates over dependencies. This awk script requires the target "show-depends-pkgpaths", which is defined in a new Makefile pkgsrc/mk/bsd.utils.mk. This file should accumulate "utility" targets that current exist in bsd.pkg.mk, i.e., "helper" targets for various actions.
2006-01-17Rework the way the vulnerabilities list is displayed a bit todmcmahill1-6/+22
remove the vulnerability ID from the pkg-vulnerabilities file which managed to creep into the README.html output.
2006-01-05Fix a bug which caused the README.html generation to fail when the packagesdmcmahill2-10/+26
directory did not exist. Now the generation completes with a warning that no binary packages were found. Reported in PR pkg/32351.
2005-11-18Added a few FIXMEs at places where this program might fail unexpectedly.rillig1-1/+5
2005-11-18Renamed append to append_flag. Removed superfluous quotes around thatrillig1-5/+4
variable. As it is controlled completely by this program, they are not needed.
2005-11-18Don't accept anything besides the known options on the command line. Asrillig1-7/+2
no additional parameters are used it's better to reject them.
2005-11-18- Added section headings.rillig1-29/+34
- Renamed DEBUG to debug_flag, as it is not modifiable via the environment. - Removed trailing white-space from the --help output. - Removed the clean_and_exit function, as it had been practically unused. - Replaced some "if"s with "case"s to avoid line noise.
2005-11-17Properly quoted variables.rillig1-21/+17
2005-08-24Added a code snippet that demonstrates how to set the $@ array to therillig1-1/+12
lines printed by a shell command. In contrast to the read(1) shell utility, there are no problems when the output contains backslashes.
2005-06-01Recognize inet6 in PKG_SUPPORTED_OPTIONS as an indicatorwiz1-2/+2
that a package support IPv6 (for the README-IPv6.html generation).
2005-05-24Add more error checking. PACKAGES must exist. No extra command line args ↵dmcmahill1-1/+12
taken.
2005-05-24improve the message when an invalid cache file version is founddmcmahill1-2/+4
2005-05-24Improve error checking. Specifically, after a new cache file isdmcmahill1-7/+27
created in a temp directory, issue a warning if we fail to install it in the package directory. If the error happens on the top level (master) cache file, then error out. For a subdirectory, issue a warning and drop that directory from the master cache.
2005-05-22pass down FIND to genreadme.awk and binpkg-cachedmcmahill2-6/+7
2005-05-22use find ${DIR}/ -name \*${SUFX} instead of ls ${DIR}/*${SUFX} whendmcmahill1-4/+7
generating a list of possibles packages. Avoids proglems with too long of a command line for ls. While here change find to ${FIND}.
2005-05-20get rid of a spurious %%SUBDIR%% which found its way into the generated ↵dmcmahill1-2/+2
category README.html
2005-05-20Rework how the lookup of binary packages in the cache is performed.dmcmahill1-46/+50
As data for a given binary package is loaded, increment a count stored with PKGPATH as the index. Then use a psuedo-multidimensional array with PKGPATH and the # as the index. This allows for much faster lookups and scales linearly with the number of packages. The old way scaled as the product of the number of pkgsrc entries and the total number of binary packages. Not a pretty value. This makes the actual README.html generation part run about 3x faster. Approach suggested by soda.
2005-05-19make local variables in a few functions be localdmcmahill1-4/+7
2005-05-19allow spaces after the "=" in the .pkgcache files. This was noted withdmcmahill1-7/+7
some of the older packages on ftp.netbsd.org. For example, pkg_info -B ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5.2/vax/All/cascade-1.4.tgz will give OPSYS= NetBSD instead of OPSYS=NetBSD
2005-05-19- if the mv of the temporary cache file to the real one fails, usuallydmcmahill1-4/+18
due to a directory permissions error, then error out. - when the master cache has just been newly created, don't also report that the master cache is up to date. Both were suggested by Christian Hattemer.
2005-05-19if the top level package cache file does not exist then exit withdmcmahill1-1/+2
a fatal error. Noted by Christian Hattemer.
2005-05-18make use of the new tools framework via the prereq-readme package todmcmahill1-7/+21
extract tools needed for the README.html generation. Suggested by Johnny Lam and Rolland Illig.
2005-05-17Rework the README.html generation code. Major changes are:dmcmahill3-173/+543
- completely redo the code which decides on the machine architecture, operating system, and operating system version for the binary packages. The old way just used to directory names to take a guess. The new way creates a cache file containing meta-data for all the binary packages in each "All" directory. This cache file is consulted when generating the lists of available binary packages. The meta-data is obtained with pkg_info so it should always be correct even if you do something silly like mix OS_VERSION or MACHINE_ARCH packages up in the same directory. Among the benefits are: works when PACKAGES is not $PKGSRC/packages, works with a more or less arbitrary subdirectory structure, works when there are subdirectories for multiple operating systems. This portion of the fix should address PR25390. The cache files are only updated when the contents of an "All" directory changes or if the cache file format changes. There is some room for improving the updating of the cache files, but its not too bad the way it is. - fix up some of the awk code so that generadme.awk works with Solaris nawk as well as NetBSD's nawk and gawk (for pre-2.0 systems). - remove some "if ! foo" shell constructs to increase portability. - be more consistent with what variables get passed to mkreadme from make and which ones are determined automatically. Mostly this meant moving stuff into mkreadme to make it easier to run it standalone.
2004-11-12Don't expand .la files in PLISTs that are symlinks. The expansion shouldjlam1-2/+2
only occur with the real .la file. This avoids the problem noted by Greg Troxel in: http://mail-index.netbsd.org/tech-pkg/2004/11/12/0018.html
2004-10-05Check for presence of the libname listed in the libtool archive beforejlam1-2/+6
outputting it to stdout.
2004-09-21Don't exit on error if the *.la file is not a libtool archive.jlam1-11/+11
2004-09-21Add a lock_file function that generates lockfiles that are usable onjlam1-1/+57
NFS-mounted directories.
2004-09-10* Do the *.la expansion within the current _PLIST_AWK_SCRIPT framework.jlam1-17/+31
We no longer require that LIBTOOL_LA_FILES be defined in the package Makefile, and the libtool archives should once again be listed in the PLIST. * Add a new yes/no variable "LIBTOOLIZE_PLIST" to control whether to have bsd.pkg.mk automatically expand *.la files in PLISTs into the true library names represented by the libtool archives. * Rename the "transform-la" script to "print-la-libnames" which more correctly reflects its function. Many thanks to Todd Vierling for the original implementation and for his contructive comments on how to improve the changes in this commit.