Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Jan 2000 23:25:37 -0500 (EST)
From:      Will Andrews <andrews@TECHNOLOGIST.COM>
To:        Igor Roshchin <igor@physics.uiuc.edu>
Cc:        ports@FreeBSD.ORG
Subject:   RE: Port-maintenance
Message-ID:  <XFMail.000108232537.andrews@TECHNOLOGIST.COM>
In-Reply-To: <200001090323.VAA10535@alecto.physics.uiuc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09-Jan-00 Igor Roshchin wrote:
> Situation:
> ---------
> Consider that you have a set of ports that you install on a particular
> computer (one of many boxes). Time-to-time, after the system is upgraded, 
> especially, in case of a major upgrade that includes kernel and/or library 
> format change,
> (consider both, update/upgrade via cvsup and make world, and via binaries - 
> /stand/sysinstall)
> you'd like to update the ports.
> This has two parts to it: 
> 1) to make sure that the sources are fresh
> (especially if you don't run cvsup regularly e.g. on a production machine,
> or on a machine with a slow connection), and 
> 2) recompile on the new system.

# cvsup -g -L 2 -h cvsupX.freebsd.org /usr/share/examples/cvsup/ports-supfile
# for i in "list of ports here"; do pkg_delete `ls /var/db/pkg/ | grep $[i}`;cd
/usr/ports/*/${i} && make install;done

..should handle the majority of your ports. Some, like Apache, need special
handling.

> Problem #1:
> ---------
> I don't want to refresh ALL port source tree,
> or, if I've choosen just some categories, - ALL ports in the choosen
> categories - just only those which I already have on my computer,
> and dependencies.
> (insert list of reasons here: slow link, limited time, ... )

You can choose which ports to upgrade.

> Suggestion #1:
> To have a list of the "already-used ports" -
> so that cvsup  can fetch/update only those. 
> This list should be automatically updated (new ports addedd)
> when a new port is compiled.
> Suggestion #1.a
> Probably "update" target (analogous to one in /usr/src/Makefile)
> that would update the particular port, would be nice.
> (i.e to update Makefile itself, pkg, files, ...)
> ---
> 
> Ok, say we have fresh sources
> 
> What do you do ?
> You hardly remember _all_ ports and packages you've installed
> from the FreeBSD collection. You can look through the list of
> packages installed, using pkg_info, then go to the appropriate
> subdirectories in /usr/ports and type "make install".

$ pkg_info -Ia

OR

$ ls /var/db/pkg

will list all installed ports (plus their COMMENT in the former case).

> If you had installed ALL possible ports (if you are release engineer or 
> just crazy)
> - you could just go to the /usr/ports directory and type "make install",
> and it should compile and install ALL ports.

Huh? Maybe you mean we should have an update target in /usr/ports/Makefile that
automagically updates the currently installed ports?

> Problem #2
> -----------
> How to compile/install only the ports that have been compiled/installed
> on this computer earlier.

for i in `pkg_info -Ia | awk '{print $1}'`; do cd /usr/ports/*/${i} && make
install....

> Possible hack:
> Edit Makefile in the /usr/ports/${CATEGORY} directory, removing
> all SUBDIRs, and adding only those that one wants to keep and use in the
> future.
> Disdvantage:
> Clamsy, and is not automated - would be nice to add/delete port names
> from the list at during post-install or deinstall.

See script above.

> Suggestion #2
> To have a list maintained as described above with a possible additional
> target for ports that would allow [re-]compile/install only already installed
> ports. It should allow "update" target as suggested in "Suggestion #1.a"

I can probably write this kind of thing. It'll probably not go in
/usr/ports/Makefile before 4.0-RELEASE (unless a committer takes up the job /
commits my patches).

> Problem #3
> ----------
> Much like the Problem #2, except for the case when one wants
> to use "pkg_add" to install precompiled packages, and not
> to compile them locally for one or another reason.
> 
> Suggestion #3
> Would be nice to have a menu - much like in sysinstall -
> which reads in the list of existing packages and allows you to
> do mass-upgrade, probably with an additional possibility to
> "uncheck" some of the ports from that list.
> Note: sysinstall itself would be too bulky and AFAIK can not
> upgrade existing packages - it will show them as already installed.

for i in `pkg_info -Ia | awk '{print $1}'`; do dialog_script();done
dialog_script () {

        blah blah

}

can accomplish this.

> Problem and Suggestion #4
> ----------
> (somewhat of an aesthetic thing)
> It would be nice to distinguish between ports installed via "add_pkg"
> (including sysinstall) and via compiling port.
> This way functionality described in #2 and #3 can be 
> (probably as an option) kept separately.

I agree. This is something I can't provide a solution for with existing tools.
Perhaps a simple /var/db/pkg/<port>/PACKAGE file or something to indicate this?

--
Will Andrews <andrews@technologist.com>
GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w---
?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ 
G++>+++ e->++++ h! r-->+++ y?


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000108232537.andrews>