Commit Graph

221 Commits

Author SHA1 Message Date
Akinori MUSHA
1b3e75281d Update to 20011012. Fix several minor bugs and make it a stable
release again. (Hopefully)

portupgrade:

  Delete an unneeded exception snatcher.  This fixes a bug where ports
  marked as IGNORE are not properly skipped.

pkgdb:

  Rebuild pkgdb if it looks like broken, instead of resulting in
  failure.

  Unbreak regexp match. ;)

  Fix a typo of a variable name in an error message.
  [Reported by: Stijn Hoop <stijn@win.tue.nl>]

portsdb:

  Allow a port dir to be a symlink to a directory.

  Add support for the case where some catetories are missing in a
  ports tree.
  [Submitted by: Jos Backus <josb@cncdsl.com>]
2001-10-11 19:53:14 +00:00
Ying-Chieh Liao
813b775b23 add pkg_tree
Get a 'graphical' tree-overview of installed packages

PR:		30776
Submitted by:	Edwin Groothuis <edwin@mavetju.org>
2001-10-11 14:14:03 +00:00
Akinori MUSHA
fa0cf70254 Update to 20011010.1, with a couple of fixes.
pkgdb:
  Fix a type error and unbreak date-based pkg glob.
  [Reported by: Ollivier Robert <roberto@keltia.freenix.fr>]

portupgrade:
  Silence pkg_info when it does not find a package.
  [Submitted by: Jimmy Olgeni <olgeni@uli.it>]
2001-10-09 20:23:46 +00:00
Akinori MUSHA
cb169bd332 Update to 20011010.
pkgdb:

  Make pkgdb fixer's dependency guesser aware of language specific
  categories.  Now it suggests ja-qt-2.3.1 instead of qt-1.45_1 for
  a missing qt-2.3.1.

  Do not fail over a package entry that has no +COMMENT file, like an
  XFree86 package entry faked by the FreeBSD installer.
  [Reported by: Ollivier Robert <roberto@eurocontrol.fr>]

portsdb:

  Do not allow specifying a ports glob using a relative path to the
  current directory. This prevents the tools from confusing when the
  current directory is under PORTS_DIR.

  Give a better progress display.
2001-10-09 17:05:35 +00:00
Akinori MUSHA
022de76493 Update to 20011006.1, a hotfix release. This fixes a bug where pkgdb fails to
create a new database for the very first time. (Run "pkgdb -fu" if you have
20011006 installed)

Fix MAN1 entries.

Remove old database pkgdb.byfile.db on installation.
(new database is named pkgdb.db)
2001-10-06 21:01:34 +00:00
Akinori MUSHA
0d292eefc6 Update to 20011006 with many improvements.
Beware, there can probably be some bugs left in the new pkgdb code.
In such a case please run "pkgdb -fu" to fix the situation.

overall:

  Utilize pkgdb better and optimize.

portupgrade:

  Do not scan packages all at once when -P is given, but find one per
  request.  [Requested by: Hideaki OKADA <hokada@isl.melco.co.jp>]

  Create a backup package record in tmpdir instead of pkgdbdir, in
  order not to update pkgdbdir's mtime.

  Rephrase/add messages.

portinstall:

  Commit major changes and improvements over portinstall.

  Now it warns and asks the user for confirmation if a port is being
  installed when a package of the same origin is already installed.

  Upgrade all the required packages before installing a new port.
  [Requested by: Hajimu UMEMOTO <ume@mahoroba.org>]

  Do not install ports immediately but queue them up, then install
  them after upgrading all the specified and required packages.

pkgdb:

  Record pkgname <=> origin mapping in the pkgdb and make full use of
  it instead of repeatedly calling pkg_info -o which has undesirable
  overheads.

  Make portupgrade, pkg_deinstall update the pkgdb after they
  install/deinstall packages or modify package records.

  Integrate pkgdepfix(1) within. (pkgdb -F/--fix)

  Add -o/--origin, which looks up an origin of a package in pkgdb.

  Detect added/deleted/reinstalled packages more strictly so pkgdb can
  keep being sane and consistent.

  Do not fail over a small conflict found during updating pkgdb;
  portupgrade should not be aborted by such a minor problem.

pkgdepfix:

  Obsolete -o and turn -o on by default.  Now we can look up an origin
  of a package so quickly thanks to the pkgdb.

  Integrate into pkgdb(1). (pkgdb -F/--fix)

portsdb:

  A date spec is not a valid ports glob; emit a warning if specified.
  [Found by: Hajimu UMEMOTO <ume@mahoroba.org>]
2001-10-06 15:52:58 +00:00
Akinori MUSHA
39b71db358 De-typo: s/compt/compat/.
Submitted by:	olgeni
2001-10-02 12:09:59 +00:00
Akinori MUSHA
66abe10ffe Add another patch against 20010922, which fixes the default value of
`$backup_packages' from true to false, which should only be turned on
when -b is specified.

I wonder why I couldn't notice this for long. ;)
2001-09-26 16:04:05 +00:00
Akinori MUSHA
63388d3a06 Owing to some mistake, pkgtools-20010922.1.patch.gz on ftp.FreeBSD.org
and that on www.idaemons.org didn't match.  They are identical in the
uncompressed form but I think I compressed one with -9 and another
with -6 somehow.  Thereby list the MD5 checksums of both in pkg-plist
as a workaround.

The one on ftp.FreeBSD.org will be overwritten by the one on
www.idaemons.org soon.

Submitted by:	John Merryweather Cooper <john_m_cooper@yahoo.com>
2001-09-24 14:52:21 +00:00
Akinori MUSHA
ac76034d71 Update to 20010922.1. Add a patch to fix a coredump problem in pkgdb. 2001-09-24 09:38:20 +00:00
Akinori MUSHA
71a4f12840 Update to 20010922, with some brand new functionalities.
overall:

  - Implement new package glob patterns: {<|<=|>=|>}{date|pkgname_glob}.

    For example, you can rebuild and reinstall all the dependent
    packages of png that had been installed prior to png this way:

      portupgrade -fr png -x '>=png'

  - Introduce the packages database, which is currently a simple hash
    that maps file paths to package names.

    Inspired by:	NetBSD

pkgdb(1): (new)

  - A command to create/update the packages database.

pkg_which(1): (new)

  - A command to check which package a file came from quickly.

portsclean(1):

  - Suppress "can't cd" error messages.

    Submitted by:	Jos Backus <josb@cncdsl.com>

ports_glob(1): (new)

  - Give portsdb(1)'s ports glob expanding feature a suitable name.
2001-09-21 22:46:14 +00:00
Akinori MUSHA
d707b7ee11 Update to 20010921, the latest maintenance release.
overall:
  - Work around pkg_info(1)'s "feature" where it gets info from
    package files under the packages directory prior to installed
    packages.
    [Reported by: kuwa@flab.fujitsu.co.jp]

portupgrade:
  - Skip ports that are marked as IGNORE.
    [Requested by: Jimmy Olgeni <olgeni@uli.it>]

portsdb:
  - Stop specifying -j# when making a ports index to avoid outputting
    a buggy INDEX.

portsclean:
  - Do not assume a distinfo file is in each port's own directory, and
    use `make -V MD5_FILE', in order to support master-slave ports
    properly.
2001-09-21 10:30:11 +00:00
Akinori MUSHA
d29aec3965 Remove ruby_static from RUN_DEPENDS.
Now that RUBY_ARCH has been changed not to include a minor version of
the system, you no longer need to have ruby_s in order to cope with
the migration problem with a minor system upgrade like 4.3 -> 4.4.

You will need ruby_static only if you are going to do a major upgrade
of your system like 4.3 -> 5.0.
2001-09-17 18:09:58 +00:00
Tom Hukins
75db9e78c2 Add Perl modules for parsing and querying FreeBSD's Ports INDEX file 2001-09-12 22:58:50 +00:00
Akinori MUSHA
541fb158bf Update to 20010912.2. Man page update only.
portupgrade.1:

  - Add two new sections: EXAMPLES and TIPS.

    Suggested by:	obrien
2001-09-12 09:59:01 +00:00
Akinori MUSHA
20c0bfa705 Update to 20010912.1. Enhance packages support further more.
portupgrade:

  - Support the environment variable PKG_PATH which is supported by
    pkg_add(1).

  - Try to fetch the latest version of a package if the exactly
    same version as the port is not found in the package site.
2001-09-12 07:20:16 +00:00
Akinori MUSHA
5f4aaf504d Update to 20010912.
portupgrade:

  - Add a new option -b/--backup-packages, which keeps backup packages
    of the old versions'.

    Requested by:   mistral@imasy.or.jp (Yoshihiko SARUMARU)

pkg_fetch:

  - Accept a full URI as well.

  - Do not try both All and Latest; now one must put an @ at the end
    of a package name if one wants to omit the version part.
    ("cyrus-sasl@", etc.)

  - Obsolete the PACKAGEBASE environment variable.

  - If -f is specified, remove existing packages if they are corrupt.

  - Do not depend on the ports database.

portsclean:

  - Fix the command line help regarding -D and -DD.

    Submitted by:   Jimmy Olgeni <olgeni@uli.it>

compdefs:

  - Fix stupid bugs in the zsh compdefs.
2001-09-12 04:33:58 +00:00
Akinori MUSHA
04669ee549 Update to 20010906a.
portupgrade:
- Fix a misbehavior when -s is specified, where it built each port
  twice somehow. ;)
2001-09-07 07:25:47 +00:00
Akinori MUSHA
8dd7562381 Update to 20010906.
overall:
- Allow using regexp in a glob pattern on the spot, by just putting a
  regexp preceded by a colon (:).
- Thereby deprecate -E/--regex, which is evil because it changes the
  global status. (but the option is still kept for compatibility)

portupgrade:
- Return correct exit status.
  [Reported by: Trevin Chow <trevin@mail.com>]

portinstall:
- Read the env variable PORTUPGRADE. (it read PORTINSTALL previously)

pkg_fetch:
- Be even more smart in deciding which to try first, All or Latest.
2001-09-06 10:56:10 +00:00
Akinori MUSHA
305e23d790 D'oh. Fix a silly typo in portupgrade. 2001-08-31 18:44:46 +00:00
Akinori MUSHA
d81ee0edf8 Update to 20010831. Fix some more minor problems.
overall:

- Fix a bug where a glob expansion did not work as expected when in a
  port direcotry.

portupgrade:

- Fix a bug where a port not listed in the INDEX failed to install
  because of a dependency error.

portversion:

- Work around a feature of the option parser library where -l= is
  treated as -l "".  Now portversion -l= and portversion -L= will work
  just as pkg_version(8) does.
2001-08-31 08:29:48 +00:00
Akinori MUSHA
67a948970a Update to 20010829.1. Not a really mandatory update.
portupgrade:
- Make portupgrade download packages using pkg_fetch(1) when -FP is
  given. (also aware of -R, -f and -v)

pkg_fetch:
- Be more intelligent and try All and Latest in the proper order.
- Return a non-zero status value when some are failed.
- Change -r to -R, since it recurses upwards through dependencies.
2001-08-29 10:06:58 +00:00
Akinori MUSHA
1d579bb8ce Update to 20010829. Probably this is the most stable version ever.
Overall:

- Fix glob expansion routines not to see a "No such package is
  installed" error when it is actually installed.  It was broken when
  I hacked them to allow rather stupid patterns.

portupgrade:

- Add a new option -M/--make-env, with which a user can specify
  arguments to prepend to each make(1) command line.  Any wrapper or
  environment variable assignment can be prepended.

- Make -RF invoke the `fetch-recursive' target.

Suggested by: Jimmy Olgeni <olgeni@uli.it>

- Optimize the combination of make(1) targets.
2001-08-28 18:57:15 +00:00
Akinori MUSHA
98ecd549fc Update to 20010827c, with readline nits fixed. 2001-08-27 13:44:32 +00:00
Akinori MUSHA
6cec7f4955 Update to 20010827b, with another minor bug fixed.
- Fix a bug where it causes an error when portsdb detects a DB_VERSION
  bump.

  Reported by: Ollivier Robert <roberto@eurocontrol.fr>

- Add a new option for portsdb(1): -f/--force, so you can force it to
  update database regardless of timestamps.
2001-08-27 12:30:56 +00:00
Akinori MUSHA
f6a53f0aca Update to 20010827a, with a couple of silly bugs fixed.
- Bump DB_VERSION, since PkgVersion was changed a bit.

Reported by:	fritz.heinrichmeyer@fernuni-hagen.de

- Add a missing argument for Dir::chdir_do().

Reported by:	"Li-lun Wang (Leland Wang)" <llwang@infor.org>
2001-08-27 07:39:19 +00:00
Akinori MUSHA
c71e1f41de Fix a typo in pkgtools.rb to unbreak pkgdepfix.
Reported by:	"Li-lun Wang (Leland Wang)" <llwang@infor.org>
2001-08-27 06:14:42 +00:00
Akinori MUSHA
44b1c1aa8d Update to 20010827.
pkg_fetch:

- Yet another new utility, which downloads binary packages from a
  remote site.  Optionally it can also download the required packages
  recursively.

portupgrade:

- Do not regard "no package found" as an error when upgrading packages
  with -PP.

pkgdepfix, portsclean -L:

- Fix a problem where the ruby 1.6.4 release fails in error.

  Reported by:	David Wolfskill <david@catwhisker.org>

portcvsweb:

- Explicitly execute a browser via /bin/sh, as the specification says.

other stuff:

- Improve the manpage and the completion definitions.
2001-08-26 19:58:38 +00:00
Akinori MUSHA
ad57c46e5c Update to 20010826a.
- Fix a stupid bug in the last version when generating a pkgname as a
  string.
- Fix a stupid sorting bug in portsclean -L.

and some minor corrections that don't really matter.

Reported by:	Jimmy Olgeni <olgeni@uli.it>
2001-08-26 09:12:30 +00:00
Akinori MUSHA
3ebd3062f3 Update to 20010826.
Overall:

- Support the cases where PORTREVISION == 0 and PORTEPOCH == 0.

portupgrade:

- Add a new option: -l/--log-results, which is used to save the
  results as a file. [new]

- Properly exit with a non-zero status when main() does not return a
  valid value. [fix]

portsclean:

- Finally implement portsclean -L/--libclean, which cleans the old
  shared libraries that are not recorded in the package database.  It
  moves old and orphan shared libraries to ${PREFIX}/lib/compat/pkg.
  [new]

- In concert with this feature, the portupgrade port now digs the
  directory and installs a startup script which runs `ldconfig -m
  ${PREFIX}/lib/compat/pkg'. [new]

- Implement portsclean -DD, which cleans all the distfiles which are
  not referenced from any port that is currently installed, which
  portsclean -D only cleans the distfiles which are not referenced
  from any port in the ports tree. [new]

  Note that -DD runs very fast but removes more, whereas -D runs so
  slow but removes less.

  Idea provided by:	Kris Kennaway <kris@obsecurity.org>

portsdb:

- Do not fail in the case when INDEX.db and INDEX.rbo are not in sync
  somehow. [fix]

- Implement -r/--recursive. (a bit slow, though) [new]

Completions:

- Improve and update zsh compdefs.

- Add completion definitions for bash. [new]

..and several minor improvements.  Enjoy!
2001-08-25 15:14:42 +00:00
Akinori MUSHA
c887316e83 Seems there was a mirroring trouble. (probably my fault)
Just include a typo fix and call it 20010823b.
2001-08-23 12:36:52 +00:00
Akinori MUSHA
7265c072b3 - Fix a typo.
Reported by:	David M. Heller <dheller1@rochester.rr.com>

- Replace another occurrence of /usr/local with ${LOCALBASE}.

- Bump PORTREVISION.
2001-08-23 07:47:23 +00:00
Akinori MUSHA
d9659b79f5 Add a missing entry ("ChangeLog") to pkg-plist.
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2001-08-23 05:28:23 +00:00
Akinori MUSHA
937fd69693 Update to 20010823. I feel it's getting as stable as before... :)
Overall:
- Fix commands and libraries to run on a statically linked ruby.

- If a command fails to load dynamic modules with dynamically linked ruby,
  restart itself with statically linked ruby.

This is to cope with the 4.3 -> 4.4 upgrade, since ruby's dynamic modules
are under a directory with a name including a FreeBSD version.  Now
portupgrade can upgrade itself and ruby even after a major FreeBSD upgrade.

portupgrade:
- Fix a bug where portupgrade -sS 'su root -c %s' did not properly work.
  [Submitted by: KOMATSU Shinichiro <koma2@jiro.c.u-tokyo.ac.jp>]

portcvsweb:
- Accept a port path as well.

portsdb:

- Adopt better error handling and a better PORTS_DBDIR selection algorithm.

- Check database errors a bit harder.
2001-08-22 21:52:12 +00:00
Akinori MUSHA
bf6d6214f0 Update to 20010822, which fixes some annoying bugs.
Overall:

* Fix a bug where when -R is set the specified package in the first
  place is not included somehow.
  [Reported by: Jose M. Alcaide <jose@we.lc.ehu.es>]

* Improve the path regularization routines.

portsdb:

* Update the INDEX first, and then the database even if the options
  are specified in reversed order. (-uU)

portupgrade:

* Fix a misfeature where "skip" was regarded as failure, when checking
  for dependent ports' build/install failure.
  [Pointed out by: Jimmy Olgeni <olgeni@uli.it>, Jose M. Alcaide
  <jose@we.lc.ehu.es>]

* Do not move a backup package under PKG_DBDIR, but just keep it under
  TMPDIR.  It should not require a large amount of free space in
  PKG_DBDIR.
  [Pointed out by: John Merryweather Cooper <jmcoopr@webmail.bmi.net>]
2001-08-22 07:08:58 +00:00
Akinori MUSHA
3c299339fe Update to 20010821, with many improvements.
Overall:
	- Disregard -r and -R when -a is also specified; there is no
	  need to recurse when you do with everything.
	- Fix a bug in -r and -R routines where it might fail in error
	  if dependencies of a package were all wrong.
	  [Caught by: Mamoru Iwaki <iwaki@bsp.bc.niigata-u.ac.jp>]
	- Fix the support for the case where PORTSDIR is a symlink.
	- Squeeze //'s.
	- Run `stty sane' before building each port, on interrupt, and
	  before exit.
	- Accept portorigin_glob and pkgname_glob with paths, except
	  for -x/--exclude.

portupgrade:
	- Fix `portupgrade -Ni' (portinstall -i).
	- Skip ports and packages that once failed, and do not try to
	  upgrade multiple packages of an origin.
	- If a port or a package failed to build or install, skip its
	  dependents.  This behavior can be overridden by the new
	  option, -g/--go-on.

pkgdepfix:
	- Backup +CONTENTS files before removing duplicates.

portsclean:
	- Start implementing -L/--libclean.

misc/tcsh/complete.sample:
	- Add a simple example of tcsh completion definitions.
	  [Contributed by: kuwa@flab.fujitsu.co.jp]
2001-08-21 12:29:39 +00:00
Akinori MUSHA
1d9fa666db Update to 20010820.
portupgrade:
	Fix -A and -B which were broken when I introduced -L.
	[Submitted by: Ollivier Robert <roberto@keltia.freenix.fr>]

portsdb:
	Implement -M/--master-recursive, -R/--upward-recursive and
	-x/--exclude, and sort the result in dependency order.
2001-08-19 15:36:12 +00:00
Akinori MUSHA
0e40d5d606 Update to 20010819, with small improvements.
portsdb:
	Do not clobber the INDEX file until the new one is ready,
	so you don't have a zero-sized INDEX while updating it.

pkgdepfix:
	Implement an origin duplicates fixer (only invoked when -o is
	specified), and when it fixes one, redo the whole session.

        Make the cyclic dependencies fixer a bit more intelligent.

portcvsweb:
	Conform to the Secure BROWSER (SB) Specification proposed by
	David A. Wheeler.

	cf. http://www.dwheeler.com/browse/secure_browser.html
	    http://www.tuxedo.org/~esr/BROWSER/
2001-08-19 07:29:30 +00:00
Akinori MUSHA
6ace020ffa Update to 20010818b.
- Introduce a new environment variable "PORTS_INDEX", to specify an
  alternate ports INDEX file location.  You can set this to something
  like `/usr/ports/INDEX.txt" not to overwrite the one under the
  control of CVSup/CVS/CTM.

- Fix portinstall (portupgrade -N) which I broke recently by mistake.

- Change the report format.  It shouldn't be too verbose unless you
  specify -v.
2001-08-18 10:02:12 +00:00
Akinori MUSHA
35eb2ad7c0 Oops, the distfile was named wrong. Bump to 20010818.
Submitted by:	many people
2001-08-18 05:22:30 +00:00
Akinori MUSHA
cd8fb9d41a Update to 20010817b.
- Include the hotfix.
- Unbreak `portversion -t'.
2001-08-17 18:53:04 +00:00
Akinori MUSHA
4a164369fa Fix the shebang lines of commands to specify the absolute path of
ruby, instead of "/usr/bin/env ruby".

Requested by:	OOTOMO Hiroyuki <wbhacker@tky3.3web.ne.jp>
2001-08-17 14:20:35 +00:00
Akinori MUSHA
3f01e5bc4c Apply a hotfix against a bug introduced in the latest version where it
fails in error when one specifies -r and has an empty +REQUIRED_BY.
2001-08-17 11:29:05 +00:00
Akinori MUSHA
aeb1f34225 Update to 20010817, with many improvements and some new features.
pkg_deinstall/pkg_glob, portupgrade:
  - Fix the glob expander to exclude not installed packages recorded
    in +CONTENTS and +REQUIRED_BY files.

pkg_deinstall/pkg_glob, portupgrade, portversion:
  - Properly handle regular expression errors.

pkg_glob:
  - Properly define a signal handler.
  - Show a better report.

portsdb: (overall)
   - Try doing make INDEX when no INDEX file is present, and if it
     fails raise an exception.

portupgrade:
  - Add a new option: -L/--log-prefix, with which a user can save a
    build & installation log file for each port/package.
  - Show a concise and helpful message for each upgrading error.  It
    now autoatically guesses the reason of each failure using the same
    algorithm that Ports Wraith's processlogs script uses.
  - Fix a bug where 'portupgrade -aE' raised an error.

portversion:
  - Support -r/-R/-x as other tools do.
  - Fix a bug where `portversion -E' raises an error.
2001-08-17 07:51:41 +00:00
Akinori MUSHA
8342bdd6ad Update to 20010816b.
Fix a trivial but annoying behavior.  Print progress messages during
(automatically) updating the ports database to stderr instead of
stdout, so the output of `portversion -c > script' won't contain any
unexpected progress messages.
2001-08-15 19:41:32 +00:00
Akinori MUSHA
9309946588 Sorry. Just repacked. I had something I forgot to change. ;) 2001-08-15 17:32:12 +00:00
Akinori MUSHA
abe0b6818c Update to 20010816 with some enhancements and an important change.
(No bugs have been found in the previous version)

portupgrade, portversion, pkg_deinstall, pkg_glob, portsdb:

  - Add a new option -E/--regex, which allows you to use the extended
    regular expression instead of the shell glob pattern to specify
    packages or ports.

portupgrade:

  - [IMPORTANT] Turn -c/--clean and -C/--cleanup on by default.
    [Suggested by: Ian Dowse <iedowse@maths.tcd.ie>}

  - Now that -c/--clean is on by default, -Fc no longer means
    "fetch-only + do distclean before each fetch".  Instead, a new
    option -D/--distclean is added which can be used with or without
    -F/--fetch.

  - Add new options -w/--noclean and -W/--nocleanup.

  - Always do `make clean-depends' before building dependent ports.

  - Add a new option -E/--regex, which allows you to use the extended
    regular expression to specify packages.

  - Add a long option --use-packages-only for -PP.

  - Rewrite the WARNING section of the manpage and mention
  pkgdepfix(1) in it.
    [Suggested by: Ian Dowse <iedowse@maths.tcd.ie>]

pkg_glob, pkg_deinstall:

  - Add back long options.
2001-08-15 17:24:02 +00:00
Dag-Erling Smørgrav
5a0e464dc2 Fix handling of unconditional dependencies 2001-08-14 13:58:56 +00:00
Akinori MUSHA
767ba54af5 Update to 20010814, with some enhanced support for coping with cyclic
dependencies.

- Fix a bug in the cyclic dependencies handler where it couldn't
  always cope with a cycle properly.
  [Problem found by: Fritz Heinrichmeyer <jfh@jfh00.fernuni-hagen.de>]
- Don't emit a confusing error message "Cannot update the ports DB!"
  on a recoverable error.
- Implement a cyclic dependencies fixer in pkgdepfix(1).

(Cyclic dependencies could never be generated if ports are made
properly..)
2001-08-13 20:45:15 +00:00
Akinori MUSHA
70c675f6dc Reword more. 2001-08-11 21:19:33 +00:00