Suggestions for portmaster

  • Thread starter Deleted member 10519
  • Start date
D

Deleted member 10519

Guest
I use ports-mgmt/portmaster for installing and upgrading ports, and I am very happy withit. I would be even happier if the following feature were supported.

I use the magnificent ZFS as my file system. In principle, I intend to perform a ZFS snapshot before upgrading my ports so I can easily revert an upgrade if something goes wrong; however, in practice I tend to forget this step. It would be great if portmaster would automagically ZFS snapshot my file system before an upgrade, and also rollback the snapshot if the upgrade failed (though I would settle for the snapshot alone).
 
Which filesystem? Afterall, a port install touches at least /usr/local/ and /var/.

But if /var/log/ is not separate from /var/, a snapshot rollback will cause issues with syslog (and anything else actively logging).

And if you put /var/db/ onto a separate filesystem instead, a rollback of that would remove changes to /var/db/ports/ as well (saved OPTIONS).

You could put /var/db/pkg/ onto a separate filesystem and snapshot that instead. Well, if you set an *_OVERWRITE_BASE option for a port (openssl, bind, cups, etc), which touches things under / and /usr/, then you'll have to snapshot those as well.

And you can't just snapshot the whole pool recursively, as a rollback would then affect your home folder and could lead to loss of user data (say you're editing files while upgrading, or someone's logged in via SSH, or someone's sharing files off the server, etc).

It's really not a simple issue to solve. :)
 
.. and I think it would be 'out of focus' to throw that task to portmaster, whose only task is to maintain/upgrade ports. Use a wrapper script.
 
Useful IMO

I've found out the hard way that portmaster is only for installing port i.e. portmaster -a installs all ports or at least tries. I think that it would be really really useful to have an option, perhaps a default option whereby it installs only ports that are already installed (especially when the -a option is used) .

When I do a pkg_version -v and see several out of date ports. I'd like to be able to bring those up to date, but not necessarily install them. I'd only like to install the ones that I have currently installed.

This feature would save a bunch of time. I wouldn't have to go to portsnap, then to portmaster -l to see what is installed and then to portmaster to install.

If this function currently exist, please enlighten me and I'll re-read the help.
 
Nevering said:
I've found out the hard way that portmaster is only for installing port i.e. portmaster -a installs all ports or at least tries. I think that it would be really really useful to have an option, perhaps a default option whereby it installs only ports that are already installed (especially when the -a option is used) .

That's what -a does, update ports that have been installed.

When I do a pkg_version -v and see several out of date ports. I'd like to be able to bring those up to date, but not necessarily install them. I'd only like to install the ones that I have currently installed.

The way out of date ports are brought up to date is by installing the new version.

This feature would save a bunch of time. I wouldn't have to go to portsnap, then to pkg_version -v to see what is installed and then to portmaster to install.

It's hard to tell what you're doing. There's a small script in Upgrading FreeBSD Ports that might help automate the process.
 
Not sure what you are doing, but when I run
# ./[url=http://forums.freebsd.org/showpost.php?p=39092&postcount=37]portupdater[/url] yes

# portmaster -a

... only the ports that need updating get updated. I like to update ports daily so that I'm current and the list of upgrades is small. My options in /usr/local/etc/portmaster.rc are "-bgmw --no-confirm", maybe that has something to do with it?

FWIW this is one of the reasons I use sysutils/zfs-snapshot-mgmt. I set the snapshot intervals at once every hour for my root mirror. As a result, recovering from a botched port upgrade is easy enough.
 
Code:
 portmaster -d -B -P
I found the easiest CLI to upgrade perl5.10 to perl5.12... and python26 to python27 ...
Code:
cd /usr/local/lib/python2.6/site-packages/
gnuls -oSr | grep -v drw 
portmaster -d -B -P /var/db/pkg/portname...
That is only
a synopsis, I used long complex pipes to prepare pre-wrapper scripts hardcoded with the results of the piped commands... the end result was super compared to any other slow upgrade I attempted ever.
...
(Hopefully no typos above nor digressing from the discussion).
 
Back
Top