pkgsrc-Users archive

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

Re: pkg_delete all dependant packages recursively

Mike Pumford <> writes:

> On 03/11/2020 11:11, Frank Wille wrote:
>> Mike Pumford wrote:
>>> How about
>>> pkg_delete -r perl
>>> pkg_delete perl
>>> Man page suggests that will do exactly what you want.
>> That would be too easy! ;)
>> Seems I have serious problems. I tried it like you said, after experimenting
>> with pkg_rolling-replace first, and most packages were not correctly
>> deleted, because of MD5 checksum errors or simply "Couldn't remove...".

MD5 checksum errors tend to leave files in the filesystem that then get
overwritten on re-install and it's not a big deal usually.

Do "pkg_admin rebuilt-tree" and "pkg_admin check".  I basically never
have to start over.  But starting over is not a bad thing.

> Ah pkg_rolling_replace can leave things in a scrambled state if it
> doesn't complete successfully. You might be able to use pkg_admin to
> put the db back together.

Aside from an issue with dependencies that rebuild-tree fixes, I don't
have reports of "scrambled".  Only that some package was replaced and
that some package that depends on it failed to build and thus doesn't

> I actually recreate the build sandbox for my binary package builds
> from scratch for every build. It takes a lot longer but guarantees no
> mismatches unless I happen to catch the pkgsrc tree in an inconsistent
> state (Which is rare). This means my build system spends 10 hours a
> week building packages for 9.1-STABLE-amd64 and
> 8.2-STABLE-amd64. However it is all automated so all I have to do is
> check that the builds workd and run pkgin to get the new packages.

That is a great approach if you can handle it.

> I'm mulling working out a way of pulling in unchanged packages from
> the previous build to speed things up but not spent any time on doing
> it yet ;)

I think if you set up pbulk this will do what you want.

> I switched to this having had to clean up one too many broken systems
> left by pkg_rolling_replace runs. Only time I've ever had an issue

I am guessing this was about some packages not building and thus having
the wrong-dependency issue.   That's definitely a real problem.

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index