Age | Commit message (Collapse) | Author |
|
files.
|
|
|
|
|
|
Move canonicalize() into a separate file, and add some
testing code that can be enabled by compiling with
-DTEST_PROGRAM. There are some built-in test paths,
as well as the ability to read tests from a file.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Rework the Makefile a bit, so .o files get
built individually and have proper dependencies,
and other reorganization.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
There are two places in swabber where it is building
up a list of filenames, by constructing a linked list.
These lists gets searched for a match before adding
a new filename, so that filenames are only added once.
Scanning down this unordered linked list can be very
expensive as the list grows. Many of the files can
be referenced many times, and we can speed up the
detecting of matches by moving a matched entry to
the front of the list. This way frequently found
filenames tend to stay towards the beginning of the
list, making checks for them much quicker.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Most of the files in the package_files list are
not referenced, and hence they don't get any tags.
Yet the print_tags routine was walking down the
entire package_files list for every package.
This simple optimization is to create a linked
list of just those package_files records that
contain tags, and then iterate over that shorter
list for each package.
In my test case it went from walking an array
of over 170,000 items, to walking a linked list
of only 100 item.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
When there is only a single character to be written,
use putc() instead of fwrite().
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Convert the argument processing to make use of getopt().
Switch from using open()/write() to fopen()/fwrite().
Print errors and usage statements to stderr.
Add a verbose flag.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Add a debug program to dump out the binary database
in ascii format. We build it, but we don't install it.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
This change improves the RPM processing of update_distro.
It takes advantage of a new helper program, swab_testf,
to do all the file verification and creation of the *.list
files. Generating the list of input for swab_testf can
be done with a single rpm query, the output of which can
then be sorted and piped through a sed command to create
the input for swab_testf.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
This is a major performance improvement for the update_distro
program. The old code maintained an alpabetically
sorted list of file names, and eliminating duplicates as
it went. But every insertion required walking back and
forth down the linked list, making it very inefficient as
the list grew in length.
The new code just creates a simple linked list of all the
file names. It then puts that list into an array, and uses
qsort() to alpabatize them, and mark the duplicate names
during the sorting process. It can then recreate the simple
linked list in alphabetic order, dropping the duplicates
as it goes.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Add the swab_testf program. This is a helper program for
use by "update_distro". It takes a list of files, separated
by "# pkg.list", and dumps into each pkg.list file the
files listed after it that exist and are either a regular
file or a symbolic link, omitting everything else. This is
more efficient that doing the same testing in a shell script.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Convert the argument processing to use getopt(3).
Also convert the parsing of the -c option to be
in a separate subroutine, and to make use of the
strtok(3) routine, and add the ability to prepend
the task names with '-' to disable that task.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Add a .gitignore file so that "git status" won't warn about
files created during a build.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
Clean up whitespace issues and make the format closer to K&R.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
This reverts commit b83056f18556b3a02ad5c0c8da18e0d3f27ac534.
|
|
|
|
Clean up the compilaton warnings so that everything
builds without any warnings.
Signed-off-by: David Borman <david.borman@windriver.com>
|
|
substitution used for installation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Handle concept of generic distributions, or distribution families.
|
|
|
|
|
|
|
|
|
|
detect_distro.
|
|
|
|
screws up the finding of detect_distro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix null pointer problem in it.
|
|
- added support for specification of the location of white/black/filter list files
- fixed lists' insert to handle ordering properly
- filters are now linked lists.
|
|
|
|
Deal with whitelists properly.
|
|
|
|
Prefix dangerous errors with * for easy searching.
Updated bug list.
|
|
|
|
Add canolicalize() to handle "foo/../bar", which turns into bar/
Add shrink_path_dirname(), which pretty prints long patsh
Various pretty-printing code.
New error handling code.
New handling of black and white lists.
Various new options.
|