Commit graph

110 commits

Author SHA1 Message Date
Doug Barton
f1463ed180 Help out users of cons* terminals other than cons25 by making the
test for not doing the terminal title bar escapes more general.

Submitted by:	Zahemszky Gábor <Gabor@Zahemszky.HU>
2010-02-08 20:22:30 +00:00
Doug Barton
7e3c446af3 Update for version 2.18 2010-02-08 06:46:18 +00:00
Doug Barton
9939f5fe30 Update for version 2.18 by documenting the --no-term-title option 2010-02-08 06:45:42 +00:00
Doug Barton
73f4c7f4da Update through version 2.17 [1]
Update for version 2.18 by adding the --no-term-title option

PR:		ports/143395 [1]
Submitted by:	IWAZAKI Shota <iwazaki8@yahoo.co.jp> [1]
2010-02-08 06:44:44 +00:00
Doug Barton
3d3a5f8110 New Features
============
1. Add a --no-term-title option to avoid updating the xterm title bar

Bug Fixes
=========
1. Add code to prevent duplicate entries in the list of things to be
done for the user to confirm after config is done.
2. Add code so that if a user has an +IGNOREME file for a port that
is a dependency and chooses not to update it we will not falsely claim
that it will be udpated in post_config().
3. If we are running on a cons25 terminal let term_printf() return
instead of trying to printf the escapes which won't work and will
annoy users.
4. Fix 2 places where sudo privileges might be needed but the non-sudo
version of the command was called. [1]
5. If a user chose -G don't print the (${dep_of_deps}/${num_of_deps})
in the xterm title since the latter will not be incremented. This has
the pleasant side effect of allowing better indenting of the code.

Submitted by:   N.J. Mann <njm@njm.me.uk> [1] (for pkg_delete)
2010-02-08 06:43:31 +00:00
Doug Barton
9679abeda0 Update for version 2.17 2010-01-24 06:18:22 +00:00
Doug Barton
c63b6cd8a6 Update copyright date
Update for version 2.17

Document the --no-confirm option

Attempt to improve readability by re-sorting and rewording a few
of the paragraphs.
2010-01-24 06:17:48 +00:00
Doug Barton
3b044c801a Update for version 2.17, add the --no-confirm option 2010-01-24 06:17:16 +00:00
Doug Barton
5d8abffd26 Update the copyright date
New Features:
=============
1. When running through the config phase a list of things to be installed
and/or upgraded will be generated. This list will then be presented to
the user for confirmation before proceeding.
2. Add a --no-confirm option to suppress this new feature.
3. When using portmaster in an X terminal window that supports updating
the title you will now see a status update for what port is being
built, and as appropriate what dependency of that port and an (N/M)
counter. Thanks to ehaupt for the push on this, as well as some testing
and sample code.
4. Make the "yes or no" prompts (hopefully) more clear by adding "y/n"
to the text of the message, e.g., "===>>> Do you want to live? y/n [y] "

Feature expansion:
==================
Do a more thorough job of tracking things that should fall into the
--packages-build/--delete-build-only category. I.e., if something is
a run dependency of a port or ports that themselves are only build
dependencies, add it to the build_only_dl_g anyway.

New internals:
=============
1. Add a uniquify_list function so that internal lists of variables
can be made unique. Start using it for some of the new stuff, and
in clean_build_only_list().
2. Add a pm_cd_pd() which will cd into the port directory or error out
with an appropriate message.
3. Start using pm_cd_pd() where appropriate, including in a couple of
new places where we have to go back to the port directory after cd'ing
around elsewhere due to the new update_build_l().
4. Make some other cd/pm_cd invocations consistent

Cleanups:
=========
1. Instead of saving some of the new variables unconditionally in
safe_exit() move the things that are only done in the config phase
to that section, and move build_deps_il to the !config section.
2. Since $new_port may be set as a side effect of the new "Terminal
title" feature, conditionalize it for the "main" process.
3. Remove the old RCS Id stuff since I'm not using it

Bug fix:
========
In safe_exit() when doing multiports and we interrupt the process
the attempt to print the INSTALLED_LIST was not successful. So move
all of the related code into a test for INSTALLED_LIST's existence,
and just print the whole list (even if it has only one item) in both
the -a (as it was already) and multiport cases.
2010-01-24 06:16:33 +00:00
Doug Barton
b8c2a01f0c Update for version 2.16 2009-12-31 03:54:30 +00:00
Doug Barton
b958971e52 Update for version 2.16:
1. Versions of pkg_add in FreeBSD older than 6.4-RELEASE will not have
the proper options available, so warn the user if they try to use
package-related code.[1]

2. Highlight some different features

Reported by:    Miroslav Lachman <000.fbsd@quip.cz>[1]
2009-12-31 03:53:59 +00:00
Doug Barton
68ab910943 Two minor bug fixes:
====================
1. We only want to set PM_BUILD_ONLY_LIST=pm_bol in the command line
parser if we are the parent port. Otherwise proper build dep detection
will not occur.
2. Versions of pkg_add in FreeBSD older than 6.4-RELEASE will not have
the proper options available, so warn the user if they try to use
package-related code.[1]

Reported by:	Miroslav Lachman <000.fbsd@quip.cz>[1]
2009-12-31 03:52:19 +00:00
Doug Barton
1f6c4862bd Update for version 2.15 2009-12-19 07:27:26 +00:00
Doug Barton
c8effc2604 Update for version 2.15:
It's no longer necessary to supply PM_BUILD_ONLY_LIST in an rc file
2009-12-19 07:26:49 +00:00
Doug Barton
3e4a05d81f This is svn version r200709
Feature Update
==============
1. Further update the --packages-build and --delete-build-only options
to work with -a:
	a. Create a new function clean_build_only_list() from code that
	was already in dependency_check() and use it both there and at
	the end of the config mode in -a.
	b. Properly initialize the variables related to these two features
	in the same spot as all the other global vars are initialized rather
	than doing it in different locations.

Major Cleanups
==============
1. 9-CURRENT has its own package repo now, hurray!

2. Instead of having a pca() to describe the post-config action
collect the stuff that always runs after config is done into a
function, and use the pca() logic to determine what to print. This
also restores the whitespace to consistency between the modes
(one port, multiport, -a).

3. Instead of fetching the directory listing for each port category
(devel, ports-mgmt, etc.) every time we need to check a port, fetch
it once and save it to a temporary file. This lets us do several
cool things:
	a. Save a lot of time not having to re-fetch each iteration
	b. Run the sed code to fix %2c -> , up front
	c. Add a sed pattern to fix %2b -> +
	d. Run a variety of different patterns to try and find the
	latest_pv

4. We only want to run the logic tree on whether $latest_pv is up to
date or not if that variable has a value, so add appropriate tests.

Minor Cleanups
==============
1. Make it easier to include the --packages-build and --delete-build-only
options in a portmaster rc file by setting the PM_BUILD_ONLY_LIST variable
(which is used by both options) in the script if either of the two
options is detected.

2. More robust error-handling for package directory creation in
pm_pkg_create().

3. Move the error message for "no package in -PP mode" to a variable
for both reuse and code readability.

Bug Fixes
=========
1. Not finding a package (or even a package repo) should only fail()
if we are using -PP, not if we're just using -P.
2009-12-19 07:25:44 +00:00
Doug Barton
bd93253eec Update for version 2.14 2009-12-10 23:46:38 +00:00
Doug Barton
abcaff5110 Bug Fixes
=========
1. In the test for -PP being alone on the command line I forgot the
-dash at the beginning of the second test so it was falsely picking
up ports with names like p5-Devel-PPPort.

2. If you are building more than one port on the command line, and you
use --packages-build and/or --delete-build-only, and one of the ports
on the command line would otherwise qualfiy as a build-only dep, it was
falsely being treated as such. Solve this problem by adding all ports
on the command line to the run_dl_g list in multiport().

3. With the new parser if you use -v with --check-port-dbdir it's going
to be $1, not $2.

4. Don't unset the packages_init function till we're actually done using it

5. If you are using -g plus one of the --packages* options then creation
of the new package will fail since there is nothing for 'make package'
to work with. So change backup_package() to a more generic form called
pm_pkg_create and use that for both making backup packages and making
a new local package from an installed package.

6. In order to facilitate 5, update the dependency information in an
installed package's +CONTENTS file before creating the new package.

Minor Tweaks
============
1. Include the [-v] in the detailed usage() for --check-port-dbdir too

2. Make the output of --version more clear to everyone who isn't me  :)

3. If DISTDIR is its own zfs filesystem then the code to delete empty
DIST_SUBDIRs can cause problems, so special case it in its own function.

4. Remove some white space
2009-12-10 23:46:04 +00:00
Doug Barton
f17fa70b6b 1. Show that -v can be used with --check-port-dbdir
2. In the procedure for using portmaster to re-install after a major
version upgrade, list "re-install portmaster" as an actual step. [1]

Submitted by:	Kevin Oberman <oberman@es.net> [1]
2009-12-10 23:38:02 +00:00
Doug Barton
42fb40ecd6 Update for version 2.13 2009-12-07 07:15:04 +00:00
Doug Barton
8352a9251c This is svn version r200201
1. Document the new package-related features for version 2.13
2. Remove the requirement that --options be first on the command line
3. Deprecate the -p option
4. Improve the prose in a few sections, mostly removing commas and
simplifying sentences.
5. Small markup tweaks
6. Clearly indicate that +IGNOREME files only work on installed ports
7. Document that -x will work on the origin directory if there is
no installed version.
8. In the example .portmasterrc file the verbose variable needed a value
2009-12-07 07:14:40 +00:00
Doug Barton
463ef3703a Introducing portmaster with package support!
This is svn version r200206.

New Features
============
1. Support for the following new options:
	a. --packages|-P and --packages-only|-PP
	b. --packages-build
	c. --packages-if-newer
	d. --delete-build-only
	e. --always-fetch
	f. --local-packagedir
In addition to the new code this also involved making some existing
messages more generic, and customizing some others to be aware of
whether packages are in use or not.
2. New command line parser allows placement of --long-options
anywhere in the command line

Minor Tweaks and Fixes
======================
1. Make fail() less finicky about how the message is input
2. Start the process of deprecating -p since it isn't useful
any longer
3. Fix parsing of PKG_DBDIR so that we don't depend on it having
exactly 3 components. This also saves 2 external calls to cut.
4. For the --clean-distfiles[-all] options sort the list before
printing to make it easier to see when files are related.
5. Instead of repeating the tests on when to run read_distinfos()
do them once in the initialization phase then rely on whether or
not DI_FILES is set.
6. Improve some messages to make their meaning more clear

Excellent beta testing and feedback by:	Christer Solskogen

Major funding for the package code, including the --packages-build
and --packages-if-newer options was provided by Modirum MDpay.

Additional funding provided by (in no particular order):
	Jan Hornyak
	Christer Solskogen
	R Koole
	Michael Proto
	Bard Skaflestad
	Paul Lambert
	Societe ToDoo
	Andrew Belashov
	Yoriyuki Sakai
	Flemming Jacobsen
	Julian Stecklina
	Douglas Berry
	Beat Gatzi
	Christopher Dawkins
	Mark Boolootian
	Soeren Schroeder
	Christoph Sold

More information on sponsorship is available at:
http://dougbarton.us/portmaster-proposal.html

My deepest appreciation to the FreeBSD community for the outpouring
of support that allowed me to complete this portion of the project.
2009-12-07 07:14:26 +00:00
Doug Barton
e91dad25f9 Update for version 2.12
Add OPTIONS to install programmable completion files for Bash and zsh.
The Bash file is mine, the zsh file and installation suggestions are
from the PR. Additional testing for the zsh completions from garga.

PR:		ports/127319
Submitted by:	Shota Iwazaki <iwazaki8@yahoo.co.jp>
2009-09-15 08:23:19 +00:00
Doug Barton
5979c0efa6 Update for version 2.12:
1. Document new --list-origins feature
2. Indicate that -x can be used more than once
3. EXAMPLES for both
2009-09-15 08:20:26 +00:00
Doug Barton
62287a57b1 New Features
============
1. The -x option can now be specified more than once.
2. The --list-origins option will list origins from root and leaf ports
for use in rebuilding all ports (for example after a major version upgrade).
This requires moving ports_by_category() up into the --features section

Improvements
============
1. Error checking for -f and -i now fails instead of silently unsetting -i
2. In dependency_check():
a. Switch to $origin instead of $d_port in several places to make the
messages to the user more clear and consistent
b. $origin is also better for check_interactive()
c. Move check_exclude down to after CONFLICTS check, and use $iport
if it exists. This is more consistent with how check_exclude() usually
works
3. Prefix DEPTH, PARENT_PID and EXCL environment variables with PM_
4. Tighten up multiport by saving confirmed directories into a temporary
list, then running check_exclude() and check_interactive() against
each item of the temporary list, then adding to the final list
5. Execute make in a subshell and unset some of the more unwieldy
environment variables in that shell. (Suggestions and testing by avg)

Details for -x:
===============
1. Since there may be multiple arguments for PM_EXCL, use export not $ARGS
2. Move the error checking into getopts
3. In check_exclude() go through each pattern in turn
2009-09-15 08:18:57 +00:00
Doug Barton
d1d357bf93 Update for version 2.11 2009-08-25 00:24:13 +00:00
Doug Barton
37746f52ef 1. Add a "quick start" note to the top of the man page that directs
users to the EXAMPLES section.
2. Expand the EXAMPLES with some more commonly used features.
3. Minor tweaks to other texts.

This version will go out with portmaster version 2.11 but the changes
are not specific to that version.
2009-08-25 00:23:34 +00:00
Doug Barton
42ff8ab4cf In the previous update I did s/$globlist/$glob_dirs/ in multiport()
to make the code match the equivalent code in the main command line
parser, but I missed one which meant that if you specified multiple
glob patterns on the command line it no longer matched anything.

"Hey this doesn't work anymore" by: Florian Smeets <flo@smeets.im>
"I will do global searches for even small variable changes" x 1000: me
2009-08-25 00:21:45 +00:00
Doug Barton
f5fbd84513 Update for version 2.10 2009-08-21 04:01:20 +00:00
Doug Barton
81f5e6d560 Bug Fixes
=========
1. Rework the NO_DEP_UPDATES feature which is an optimization when you
are updating or installing a port whose dependencies are all up to date.
a. Stop using a temporary file for this feature, and instead utilize the
existing IPC_SAVE mechanism
b. Focus the toggling of this flag in update_port() so that it will always
be unset when it needs to be (and not when it doesn't)
[This is the actual bug fix]
c. Add a flag that is global but not exported in dependency_check() so
that the toggle in update_port() will know when (and when not) to fire
2. Set PM_BUILDING when it needs to be set in multiport()

Enhancements
============
1. Use globstrip() in multiport(), change the variable to match the parser,
and add notes in the parser and multiport() to keep the code in synch
(it's _just_ different enough so that a function doesn't make sense atm)
2. Replace globstrip sed kludge with more effcient shell pattern
3. Make the PM_BUILDING values more explicit to aid in debugging
2009-08-21 04:00:40 +00:00
Doug Barton
aad020ce85 Update for version 2.9 2009-08-06 17:06:41 +00:00
Doug Barton
442f482bce In multiport() add a check_interactive() for every port in the list
when using the -i option. This is a minor inconvenience for those users
that give a list of specific ports on the command line, but a huge
benefit for users who use a glob pattern that can easily match things
that don't need to be rebuilt.
2009-08-06 17:06:02 +00:00
Doug Barton
65d2873db6 Update for version 2.8 2009-07-29 23:26:57 +00:00
Doug Barton
90fe4b0bc4 Update for version 2.8:
1. Deprecation of -u
2. Improve the wording for -R
3. Add an example of using -af for "in place" update of all ports
2009-07-29 23:26:14 +00:00
Doug Barton
11ddabc267 Feature Updates
===============
1. For the -[rf] and -R options:
a. Do not delete the flag files that indicate a port has been updated
until the -[rf] process is successful.
b. Update the wording in usage() to be more clear about what -R does
c. If a user starts -[rf] without -R, and there are flag files present,
ask if they would like to delete them, or enable -R mode.

2. Add a globstrip() function and use it to clean up inputs to -x
(and in the input parser where the idea originated)

3. Improve the wording of the message in -s mode about what to do if
they choose not to remove a port with an empty +REQUIRED_BY file

4. Tell the user how many fetches we are waiting for in -F

Removed Feature
===============
Remove the -u option. It did very little, and not what users expected.
2009-07-29 23:24:43 +00:00
Doug Barton
825c979ac5 Update for version 2.7 2009-02-05 23:16:06 +00:00
Doug Barton
782ca5da36 Update for version 2.7:
1. Document the --check-port-dbdir

2. Add a paragraph about why it's not possible for portmaster to continue
when there is an error.

3. Update the suggested alias for portmaster -L

4. Update the process of deleting and reinstalling ports to include the
new --check-port-dbdir option, and to check /var/db/pkg
2009-02-05 23:15:21 +00:00
Doug Barton
e06a996271 New Feature
===========
1. Add --check-port-dbdir to clean stale entries from /var/db/ports [1]
Since the definition of PORT_DBDIR is now used in more than one place,
add it to the initialization routine at the top.

General Improvements
====================
1. Add a 'nonfatal' option to find_moved_port() so that when it's
called in a context where we don't care about a port that has been
deleted (such as distfile listing) it doesn't exit. Add some code to
that function to tell -L that the port has been deleted.

2. Deal with ports that require user interaction to fetch by checking
first whether MASTER_SITES is empty before running 'make checksum'.
This should solve the problem of portmaster unintentionally deleting
the distfiles for java ports, inter alia. [2]

3. Improve kill_bad_children() by using process group id [3]

4. Don't call kill_bad_children() in safe_exit() without reason.

a. Implement this for the distinfo child process by flagging the first
line of the file and checking for a file with -s instead of just -e.
b. Implement this for -F mode by flagging when all the background
processes have finished.

This should result in less of those annoying 'Terminated' messages

5. Move the start of read_distinfos() until after we are sure that we
are going to try building the port.

Small Fixups
============
1. When update_contents() finds something odd when updating a port
suggest using --check-depends to clean it up.

2. In check_for_update() avoid having variables that differ only by case

3. In update_port() recurse with just the port to update [3]

4. In dependency_check() run check_interactive() for installed
versions that need updating.

5. Update copyright

Concept by:             RW <fbsd06@mlists.homeunix.com> [1]
Fix Suggested by:       ale [2]
Suggested by:           Geraint Edwards <gedge@yadn.org> [3]
2009-02-05 23:11:23 +00:00
Doug Barton
c93d20bde6 Update for version 2.6 2008-07-28 21:26:19 +00:00
Doug Barton
09e773a456 Update to reflect the ability to specify multiple glob patterns
added in version 2.6.
2008-07-28 21:25:48 +00:00
Doug Barton
62ccec52c0 New Features
============
1. You can now specify multiple globs for directories in /var/db/pkg on the
command line (along with full names of directories/paths from /usr/ports
and/or /var/db/pkg, as before)
2. When calling check_interactive or update_port from check_for_updates
tell the user what updated version is available. [1]

Bug Fixes
=========
1. Don't set show_list to "all" for -a unless there is somthing to show
2. Add K (don't postclean) to getopts [2]

Other Improvements
==================
1. In check_dependency_files() don't let ro_opd be empty for the purpose
of the egrep expression. It works now, but it apparently violates the
spec and could case problems down the road (e.g., for bsdgrep).
2. Since the BSDPAN pseudo-ports do not exist in the ports tree there
is nothing for portmaster to do with them. Therefore ignore them when
appropriate, notifying the user when necessary. [3]

Submitted by:	Geraint Edwards <gedge@yadn.org> [1]

PR:		ports/126006 [2]
Submitted by:	ahze [2]
Pointy hat:	moi [2]

Problem pointed out by:	Bapt <baptiste.daroussin@gmail.com> [3]
PR:			ports/125428 [3]
2008-07-28 21:24:53 +00:00
Doug Barton
230aa2029d Update for version 2.5 2008-06-12 20:33:32 +00:00
Doug Barton
0eab31bb77 Bug Fixes
=========
1. Fix -a mode by moving the update of CONFIG_SEEN_LIST to after the port
has been checked for available updates. The old way worked as a side
effect to one of the things I fixed in version 2.4. This is probably
how it should have been done all along, but since the old way worked
I was hesitant to change it.

2. Now that we are using a different format for the INSTALLED_LIST,
fix the bit that always displays the list if we are using -a.
2008-06-12 20:33:04 +00:00
Doug Barton
28f12ee959 Document the potentially useful variables for rc files 2008-06-12 20:27:05 +00:00
Doug Barton
3ed25b7d18 Add "rm -rf /usr/local/lib/compat/pkg" to the list of steps to
update your ports tree after a major version upgrade
2008-06-11 20:08:16 +00:00
Doug Barton
b4445975fb Update for version 2.4 2008-06-11 19:39:29 +00:00
Doug Barton
cb20064d5b Minor New Feature
=================
Print a list of ports that will be worked on when doing multiple
ports, either from a glob or listed on the command line.

Bug Fixes
=========
1. When working multiple ports, if a port that is specified on the
command line is reached as a dependency for another port that is on
the command line (either specifically or from a glob) that port
should be rebuilt the first time through, even if it is up to date.
2. By the same token, only rebuild that dependent port once if it
was not up to date. Implement these features by keeping lists of
what needs to be, and has been built specific to the multiport
context.
3. In multiport() declare local variables to be local
4. When reading a glob pattern from the command line do not run
the multiport feature if there is only one match, just pass it on.

Minor Enhancements
==================
1. Save the list of work done using \t and \n and print with echo -e
2. Now that we are properly updating CONFIG_SEEN_LIST at the end of
the config run remove the old update to that list from
dependency_check()
2008-06-11 19:38:54 +00:00
Doug Barton
9e206425c4 Update for version 2.3 2008-06-04 21:18:18 +00:00
Doug Barton
6269d5f21c Update for version 2.3:
1. A glob pattern on the command line now updates all ports that match
2. Clarify that we rebuild the port(s) on the command line by default
3. Document -K option
4. Note the move of /etc/portmaster.rc -> /usr/local/etc/portmaster.rc
5. Document that you need to look in the script to find values to place
in the *rc files. TODO: List potentially useful variables
5. Fix the Xr for sudo
2008-06-04 21:17:48 +00:00
Doug Barton
1e374ac146 New Features
===========
1. By popular demand, change the command line behavior of 'portmaster blah*'
to update all ports in /var/db/pkg which match the glob.
2. Add the -K flag to avoid cleaning the work directory after the build.[1]

Bug Fixes
=========
1. Instead of /etc/portmaster.rc we should be reading
/usr/local/etc/portmaster.rc.[2] Begin introducing support for that.
2. If using the -n option, don't try to fetch the distfiles.[3]
3. When I added the optimization to only run 'make -V CONFLICTS' if
it existed in the Makefile I neglected to unset the value of $conflicts
in the script between ports.[4]
4. I ran into a port which set VERBOSE to a value that it needed to use
in its build process, and since I was using the -v option for portmaster
(which sets VERBOSE=yes) the build failed. To work around this, prefix
the variable names for common English words (VERBOSE, FORCE, BUILDING)
with PM_.
5. To aid future debugging (as in 4. above) change the values of flag
variables to something meaningful instead of just "yes."
6. Automatically handle the case where the parent port has MOVED instead
of asking the user to re-run portmaster with the right options.

Submitted by:	pav [1]
Submitted by:	Miroslav Lachman 000.fbsd@quip.cz [2]
Submitted by:	Jiawei Ye <leafy7382@gmail.com> [3]

PR:		ports/124271 [4]
Submitted by:	James Kelly <jjk@tilted.net> [4]
2008-06-04 21:17:30 +00:00
Doug Barton
f50961d10a Update for version 2.2 2008-03-19 21:47:36 +00:00