openbsd update

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Is there a quick way to uninstall & reinstall all of my packages (for 3.6->3.7)? I have a bunch, and manually adding them all would be a big waste of time.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I think there is a way to tell pkg_add to use a textfile as a list of packages to install. I can't remember where the docs are on that though, or if it uses ports instead of pre-compiled packages. :eek:

Uninstalling is pretty simple. Just a for loop, and I think the -f flag in pkg_delete. You could probably do the same for packages, just knowing the versions is a PITA.

I don't usually keep the same list of packages installed on every upgrade, except for small things like screen and vim.

After 3.7, the -r flag should work fine for updating packages.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
From what I understand, you have to use the full version and file extension in the package name. Package names here and just point PKG_PATH to the appropriate directory on your mirror of choice. That's my minimal experience anyways, n0cmonkey is, of course, the one who knows.

And n0cmonkey, are you saying that you essentially tear down all your installed packages every major release?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: kamper
From what I understand, you have to use the full version and file extension in the package name. Package names here and just point PKG_PATH to the appropriate directory on your mirror of choice. That's my minimal experience anyways, n0cmonkey is, of course, the one who knows.

And n0cmonkey, are you saying that you essentially tear down all your installed packages every major release?

I try to reinstall all packages whenever I update. It's the proper thing to do.

I think package name wwildcards are in the works, but either not working yet or in -current.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Ok, so that's pretty much useless then... what I did (before posting this thread) was:

ls /var/db/pkg/ > packages.txt
rm -rf /usr/include/g++
pkg_something to delete them all in one shot
sed -e "s/^/pkg_add/" packages.txt > doit
sh doit

Then I went through and fixed the version number for each package as it failed. It was tedious.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I would be surprised if it hadn't, but do you still have to specify the entire package, including version, when installing?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Nothinman
I would be surprised if it hadn't, but do you still have to specify the entire package, including version, when installing?

I'm not sure. I don't have access to an OpenBSD machine at the moment. I think so though. IIRC, that is being worked on.