Commit graph

34 commits

Author SHA1 Message Date
Florent Thoumie
128460e57c - Convert to USE_LDCONFIG.
PR:		ports/93186
Submitted by:	$self
Approved by:	maintainer
2006-05-29 17:45:34 +00:00
Kris Kennaway
0e29aa754a Try to clean up lib/compat and lib/compat/pkg at deinstall.
Approved by:	portmgr (implicit)
2006-02-26 00:05:41 +00:00
Edwin Groothuis
508b8d82f4 Replace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtry
Approved by:    krion@
PR:             ports/88711 (related)
2006-01-22 03:01:03 +00:00
Norikatsu Shigemura
879e335dc3 Update to 2.0.1.
* portversion(1) also reads MOVED and trace origin change,
  and, when invoked with "-v", displays the new origin.

  Example:

      % portversion -v screen
      screen-4.0.2_2   <  needs updating (port has 4.0.2_3) (=> 'sysutils/screen')

* Add "--ignore-moved" to portupgrade(1) and portversion(1).
  When invoked with this option, both programs totally ignore MOVED.
  If you encounter strange behaviour of these programs, try this out.

* Add IGNORE_MOVED option to pkgtools.conf.
  This can be used to selectively ignore MOVED by pkgs.
  See pkgtools.conf.sample for details.

* Keep the order of MOVED entries, and do not trace back to old entries.
  Previously, when encounters the following entries,

	editors/emacs|editors/emacs19|2004-03-20|emacs 19.x moved to a non-default port location
	editors/emacs21|editors/emacs|2004-03-20|emacs 21.x moved to default port location

  portupgrade traces as "editors/emacs21" -> "editors/emacs" -> "editors/emacs19".
  I thought this behavior should not be what we want to, so added this change.

PR:		ports/91272
Submitted by:	KOMATSU Shinichiro <koma2@lovepeers.org> (maintainer)
2006-01-03 16:57:46 +00:00
Akinori MUSHA
4bb4e26f2b Make portsdb -U use the canonical way to make a ports index file now
that make index has got fast enough.

Suggested by:	kris
2004-02-07 08:56:58 +00:00
Akinori MUSHA
d611ff979a Update to 20020921.
- Respect PKG_SUFX, which could be defined in /etc/make.conf or as an
  environment variable.

- Drop the pkg_tarup(1) dependency in favor of pkg_create(1) -b, and
  mark IGNORE for systems which pkg_create(1) does not support -b.
  On those systems such as 4.4-STABLE and prior, users can either
  a) update pkg_* tools or b) stick with portupgrade-20020920 +
  pkg_tarup-1.2_3.

- Remove the workaround against somewhat old 5-CURRENT's buggy
  bsd.*.mk.

- Improve zsh/bash/tcsh completion definitions. (not much for tcsh,
  though..)
2002-09-20 18:01:57 +00:00
Akinori MUSHA
7f362d94d7 Update to 20020321, the latest maintenance release.
pkg_deinstall(1):

  - Show the results more precisely.

  - -P: Only preserve real FreeBSD shared libraries, determined by
    file(1).

  - -P: Move preserved shared libraries to $LOCALBASE/lib/compat/pkg.

portupgrade(1):

  - If an error is returned from getcwd(), show a better message and
    abort.

    FreeBSD PR:		ports/35893
    Submitted by:	Ernst de Haan <znerd@FreeBSD.org>

  - -N: If multiple ports match a given pattern, list them.

    Suggested by:	Will Andrews <will@FreeBSD.org>

portsdb(1):

  - On exception, handle it and exit normally.

  - Check the file/directory permissions on the INDEX file before
    generating a new INDEX.

    Suggested by:	parv <parv_@yahoo.com>

  - Make automatic portsdb directory selection in the case of "portsdb
    -fu" too.

ports_glob(1):

  - -M: Unbreak.
2002-03-26 06:35:39 +00:00
Akinori MUSHA
b470af5478 Update to 20020213.1 which fixes the PKG_DBDRIVER problem introduced
in the last version.  For the victims please manually reinstall the
portupgrade port, as always. ;)

Reported by:	many users (Sorry!)

Use some logic and keep pkg_add/pkg_delete from complaining about the
@exec/@unexec return codes.

Submitted by:	olgeni
2002-02-13 11:19:34 +00:00
Akinori MUSHA
123c2a69f5 o Update to 20020205. The best release ever, I hope. :)
pkg_deinstall(1), portupgrade(1):

  - Properly print the legend.

  pkg_glob(1), portsdb(1):

  - Do not print an empty line when the result list is empty.

  pkgdb(1):

  - Greatly improve the origin fixing procedure.  Do the origin
    duplicateness check before checking dependencies and avoid redoing
    the origin check.

  - Show the user CVS history on the spot via the CVSweb.

  portcvsweb(1):

  - Allow specifying a no longer existent port file/directory.
    "portcvsweb net/ruby-uri" now works.

  - Change the default BROWSER value from 'lynx' to
    'w3m:lynx:links:mozilla:netscape'.

  portupgrade(1):

  - Fix a bug where portupgrade tried to use a package with a different
    origin when the package name is identical to that of what it wants
    except for the version part.

  pkgdb(3):

  - Abolish the [You have no permission to update the pkgdb -- using a
    slow method] message.  Instead, run 'pkgdb -u' via sudo(8) when
    under portupgrade -s, or stop the process immediately with a
    message that the user must run the command as root.

  pkgtools.conf(5):

  - Allow specifying unofficial ports' origin globs in HOLD_PKGS as
    well as package globs.

  overall/miscellaneous:

  - Change --no-config to --noconfig in order to get the -q option
    really working.  Since --no-config was regarded a negative form of
    --config, it didn't work as expected.

  - Fix some bugs in the zsh compdefs and add missing descriptions for
    some options.

o Use bzip2 instead of gzip for the distribution tarball to save 20KB.
  As the portupgrade user base is growing significantly, I'll get more
  serious about the download size issue from now on.  The next few
  releases will be distributed in patches against this version.
2002-02-04 17:47:31 +00:00
Akinori MUSHA
ead84ab467 Update to 20011210 which brings several usability improvements.
pkgtools.conf(5):

- Turn HOLD_PORTS into HOLD_PKGS.

- List `bsdpan-*' in HOLD_PKGS by default.

  Requested by:	Anton Berezin <tobez@tobez.org>

pkgdb(1):

- Support HOLD_PKGS and make -f/--force overrite the setting.

pkg_fetch(1):

- Dig the temporary directory and the packages directory before
  fetching.

  Requested by:	Chris Dillon <cdillon@wolves.k12.mo.us>

- Properly quote the fetch command line arguments.

portupgrade(1):

- Fix a bug that -Pf did not properly work.

  Reported by:	The Anarcat <anarcat@anarcat.dyndns.org>

- Make -p/--package build packages for the ports that are installed as
  dependency as well.

  Suggested by:	Vivek Khera <khera@kcilink.com>

- Make -p/--package build packages for those which requisite packages
  are upgraded as well, when they are given from the command line or
  -r is specified.

  Suggested by:	Vivek Khera <khera@kcilink.com>,
		Lev Serebryakov <lev@serebryakov.spb.ru>

- Do not regard a packaging error as an installation error.

- Make -Nf override HOLD_PKGS.

- Suggest specifying -f when skipping a package.

- Detect a checksum mismatch error properly from a build log.

portinstall(1): (portupgrade -N)

- Only upgrade required packages of a newly installed port when -R is
  specified.

portversion(1):

- Support HOLD_PKGS.

overall/miscellaneous:

- Introduce lazy initialization for config variables and make
  the initialization process a little bit quicker.

- Fix some typos in the manpages.

  Submitted by:	Dan Langille <dan@langille.org>,
		kuriyama@FreeBSD.org

- Add shell completion definitions for pkg_tarup(1).

- Provide a replacement of the weekly status-pkg report script
  (/etc/periodic/weekly/400.status-pkg), which is installed as
  $PREFIX/etc/pkgtools.status-pkg.sh.

port:

- Add a missing entry of pkg_which to pkg_plist.

- Do not remove the zsh site-functions directory on deinstallation
  when zsh is installed.
2001-12-10 02:43:52 +00:00
Akinori MUSHA
31a699e0ff Update to 20011106.
pkgdb:

  - Make the dependency guesser rather more intelligent and show a score
    when suggesting a candidate to the user.

  - Check for the pkgdb directory ownership before starting to fix it.

pkg_deinstall:

  - Emit a warning if none matches given patterns.

pkg_glob:

  - Do not sort package names in dependency order but in alphabetical
    order. (see pkg_sort(1) below)

pkg_sort:

  - This is a new command to sort given lines of package names in
    dependency order.

portversion:

  - Fix the portversion -c output again.

misc.:

  - Fix typos in the zsh compdef's: PKGDBDIR -> PKG_DBDIR.
2001-11-06 13:57:08 +00:00
Akinori MUSHA
b890a420cd Update to 20011030. Some minor bugs/typos were fixed.
portupgrade:
- Fix quotes.
  [Submitted by: Jimmy Olgeni <olgeni@uli.it>]

- Do not ask whether to install a port twice. (portinstall/-N)

- Complete missing words in the manpage.

pkgdb:
- Comment out deleted pkgdeps properly.

misc.:
- Convert the install script to Makefiles.

- Change the examples/docs subdirectory name from `portupgrade' to
  `pkgtools'.
2001-10-29 22:18:30 +00:00
Akinori MUSHA
145882753d Update to 20011024.
portupgrade, portversion, pkg_deinstall, pkg_glob:

  Introduce the configuration file `pkgtools.conf' for the pkgtools
  suite.  Currently portupgrade(1), portversion(1), pkg_deinstall(1)
  and pkg_glob(1) use it.

  Add a new option -q/--no-config to avoid reading the configuration
  file.

  Introduce dependency sanity checks.  If an inconsistency is
  detected, immediately abort a process suggesting the user should run
  `pkgdb -F'.

  Add a new option -O/--omit-check to omit the sanity checks.

pkgdb:

  Fix the origin guesser's minor bug when the origin port directory
  does not exist.

portupgrade:

  Add a new option -y/--yes, which lets portupgrade assume user
  answers yes to all the questions.

  Make sure to ask user where it should. (Get -N and -i right)

  Fix a bug where portinstall -i didn't work interactively.
  [Submitted by: Gregory Neil Shapiro <gshapiro@gshapiro.net>]

portsdb:

  Attempt to offer fast INDEX generation.  Now it generates an INDEX
  file more than a few minutes faster.

overall:

  Emit a warning when pkgdb cannot be updated though it is not
  up-to-date.

  Finally remove -E/--regex.  Use the ':RE' glob pattern instead.
2001-10-24 13:08:20 +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
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
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
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
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
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
6bb28a13bd Update to 20010811.
portsclean:
  - Rewrite in Ruby and implement the distfiles cleaner. [new]

portsdb:
  - Show a progress message while updating INDEX.*.
  - Record version information into INDEX.rdo.
  - Record category information into INDEX.rdo and enhance the API
    accordingly.
  - Introduce the automatic PORTS_DBDIR selector.  Now it will use
    whichever writable directory in the following ones: $PORTS_DBDIR,
    $PORTS_DIR, /usr/ports, $PKG_DBDIR, /var/db/pkg, $TMPDIR, /var/tmp,
    /tmp (checked in the order named)

portcvsweb:
  - New tool: a tool to open CVSweb to view a CVS log. [new]
2001-08-11 09:22:05 +00:00
Akinori MUSHA
032137d53e Update to 20010802, only a minor update.
overall:
- Fix commands not to quit when user answers ^D to a yes/no question.
- Call pkg_* commands in fullpaths.

portupgrade:
- When -s is specified, run sudo to build & install dependent ports
  when some are missing, too.

portsclean:
- This is a new command which cleans ports' working directories.
2001-08-02 08:19:23 +00:00
Akinori MUSHA
2ee75b5cf1 Update to 20010727 with a couple of new commands added. (No changes
have been made to the existing utilities)

pkg_deinstall:	This is a package deinstaller with wildcards and
		dependency recursion support.

pkg_glob:	This is a package glob expander with wildcards and
		dependency recursion support.
2001-07-26 19:28:42 +00:00
Akinori MUSHA
396b2f3afd Update to 20010617.
portupgrade:
  Add a new option: -N/--new.  If it is specified, portupgrade
  installs a new one when a specified package is not installed.

portinstall:
  New command equivalent to `portupgrade -N'.  You can specify a port
  origin to name the one you want to install, too:
    e.g. `portinstall shells/zsh'
2001-06-17 07:38:49 +00:00
Akinori MUSHA
da51098583 Update to 20010611, with many changes and enhancements.
Beware of bugs, just in case. ;)

portupgrade:
  - Sort packages by default and remove -s/--sort.
  - Rename -y/--yield/-Y/--yield-command to -s/--sudo/-S/--sudo-command.
  - Implement -a/--all.
  - Implement -x/--exclude=GLOB.
  - Exit on OptionParser::ParseError immediately.
  - Do not call "make fetch-recursive" but just "make fetch", now that
    portupgrade does recursion itself.
  - In fetch mode, specify -DPACKAGE_BUILDING for ports that define
    IS_INTERACTIVE. [Submitted by: Jimmy Olgeni <olgeni@uli.it>]]

portversion:
  - Exit on OptionParser::ParseError immediately.

portsdb:
  - New tool: which updates INDEX and INDEX.db in the ports directory.

pkgdepfix:
  - Implement origin fixer with intelligent guessing, finally!
    (-o/--fix-origin)
  - Make pkgdep guessing more intelligent.
2001-06-10 20:57:39 +00:00
Akinori MUSHA
ea9d950857 Update to 20010607.
portupgrade:
  - Implement -P/--use-packages, which everyone bugged me with. :>

pkgdepfix:
  - Add "delete" to the choices as to how to deal with a stale
    dependency.
  - Alter the prompt message.
  - Add zsh compdef.
2001-06-06 20:05:57 +00:00
Akinori MUSHA
3f909a39ff From now on I use release dates for this port's version numbers, and
this is version 20010606.

A new tool pkgdepfix is added.  It allows you to interactively fix
/var/db/pkg's @pkgdep / +REQUIRED_BY discrepancies.  Run this
periodically to let portupgrade properly trace dependencies.
2001-06-05 17:33:21 +00:00
Akinori MUSHA
5b36cf09a5 Update portupgrade to 1.26 and portversion to 1.4.
This is a milestone release for me.  Enjoy. :>

portupgrade changes:
  - Implement -s/--sort which sorts packages in the dependency order.
  - Implement -R/--upward-recursive, and get -r/--recursive working for
    upgrading as well. (Finally!)
  - Add -DBATCH to the make fetch' commandline to prevent ports from
    dumbly waiting for user input.

  Greatly inspired by: Jimmy Olgeni <olgeni@uli.it> (Thanks!!)

portversion changes:
  - Make command output optimal by using portupgrade's -s option.
  - Report possible ports' Makefile breakage.
2001-05-29 21:11:47 +00:00
Akinori MUSHA
1e3888f0dc Fix a rmdir line so it never fails.
Submitted by:	Jimmy Olgeni <olgeni@FreeBSD.org>
2001-05-18 14:20:15 +00:00
Akinori MUSHA
3be9dc4719 Update to 1.20.
2001-04-18 03:36  knu

	* misc/zsh/_portupgrade: Add -F.

2001-04-18 03:35  knu

	* portupgrade: Add -F/--fetch option to make dial-up users happy.

	Submitted by:	Jimmy Olgeni <olgeni@uli.it>
			(He suggested -e, but I prefered -F)

	Show what version a package is upgraded to to help a user decide
	whether to upgrade or not.

	Submitted by:	Timothy Smith <tim@mysql.com>

Resurrect portversion for what it's worth as a reference code.  The
problems that kept it from working has been addressed and will
hopefully be fixed soon. :)
2001-04-17 18:51:48 +00:00
Akinori MUSHA
a736e4aa4e Say good-bye to portversion. Now we have new pkg_version(1) which
does handle versions correctly.

By the way, I'll have to find a workaround for the ruby's thread
vs. libc_r (stdio/malloc) problem exposed by portversion...  Hmm.
2001-04-10 16:56:42 +00:00
Akinori MUSHA
8e4cb7c968 Update portupgrade to 1.18. Now it comes with portversion, which is
the Porter's Handbook compliant version of pkg_version with a little
bit better performance and better usability.

2001-03-22 06:13  knu

        * README, portupgrade, misc/zsh/_portupgrade: Add a couple of new
        options:   -A [command to run after each installation]   -B
        [command to run before each build]

2001-03-22 05:49  knu

        * README, install.rb, portversion, misc/zsh/_portversion: Add
        portversion.

2001-03-22 05:43  knu

        * portupgrade: Use make(1) arguments specified with -m for "make -V
        PKGNAME" too.

        Ignore the difference of the name parts when it compares the
        package versions.

2001-03-22 05:36  knu

        * misc/zsh/_portupgrade: Add a missing closing bracket.
2001-03-21 21:33:52 +00:00
Akinori MUSHA
230a5071f6 Add portupgrade, a tool to upgrade installed packages with ports.
It upgrades ports without reinstalling dependent packages by directly
modifying the package info recorded in the files under /var/db/pkg.

e.g.
	portupgrade gtk
	portupgrade -cC gnome\*

It currently has many design flaws (to me at least) but I am releasing
this because it's functionally stable enough to use. (I believe.. ;)

Use with care, at your own risk.
2001-03-17 23:06:40 +00:00