pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Upgrade all installed packages



On 4/19/23 04:49, Chavdar Ivanov wrote:
On Wed, 19 Apr 2023 at 06:14, Jason Bacon <jtocino%gmx.com@localhost> wrote:

On 4/17/23 23:03, Marko Bauhardt wrote:
Hi,
I believe this is a beginner question which is asked often.
But I didn‘t found an exactly answer.

I‘m using pkgsrc on a System where I don‘t have Admin permissions. So I installed pkgsrc and a couple of packages in my home dir.
After a while I upgraded pkgsrc to a higher version by switching to the next CVS tag. So I now I want to upgrade my installed packages as well. But how?

I see these options
- going step by step into every package and installing it again
- I read something about bulk installation?
- pkg_comp?

Can you give an advice what the best way is to Upgrade all my installed pkgs from source (compile) as a non-Admin user?

Thanks
Marko

pkgtools/pkg_chk and pkgtools/pkg_rolling-replace (layered on top of
pkg_chk) are the basic tools I'm aware of.  The difference is
pkg_rolling-replace attempts to minimize the number of packages
deinstalled at any instant, so the system is more usable during the
upgrade process, which can take a long time.

In either case, the tree must be updated separately before running the
tool, e.g. "cvs -q up -dP".

To fully automated it, you can install sysutils/auto-admin and run
"auto-update-pkgsrc --defaults".  This will update the source tree and
then run "pkg_chk -su".

I run this overnight as a cron job on my development system and manually
on other installations when the time is right.

I haven't noticed auto-admin so far, thanks for pointing it out. It
failed for me on a NetBSD host - it checks for NetBSD by the presence
of pkg_add in /usr/sbin and by the presence of /usr/pkg/sbin/pkg_add;
but one can run pkgsrc under NetBSD without ever installing
pkgtools/pkg_install.

I guess it should have something like

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/auto-admin/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile    28 Dec 2022 15:27:18 -0000      1.12
+++ Makefile    19 Apr 2023 09:43:53 -0000
@@ -11,6 +11,9 @@

  USE_LANGUAGES= # none

+DEPENDS+=       pkg_install-[0-9]*:../../pkgtools/pkg_install
+DEPENDS+=       pkgin-[0-9]*:../../pkgtools/pkgin
+
  NO_BUILD=      yes

  .include "../../mk/bsd.pkg.mk"


For cron, run "crontab -e" and add something like the following:

00 01 * * * env
PATH=/home/bacon/Pkgsrc/pkg/bin:/home/bacon/Pkgsrc/pkg/sbin:$PATH
auto-update-pkgsrc --defaults > /home/bacon/pkgsrc-update.log 2>&1

Adjust the paths above according to your installation.

Run "man 5 crontab" for more info.

Best,

     J

Chavdar


Thanks for the report, I'll look into this ASAP.

Cheers,

	J



Home | Main Index | Thread Index | Old Index