distfiles cleaner

Bryan Drewery bdrewery at FreeBSD.org
Mon Oct 19 23:16:48 UTC 2015


On 10/19/15 3:57 PM, Julian H. Stacey wrote:
> Hi, Reference:
>> From:		RW via freebsd-ports <freebsd-ports at freebsd.org>
>> Date:		Mon, 19 Oct 2015 14:56:11 +0100
> 
> RW via freebsd-ports wrote:
>> On Mon, 19 Oct 2015 14:16:37 +0200
>> Julian H. Stacey wrote:
>>
>>> Hi ports@
>>> What is the modern equivalent of this obsolete stuff please ?
>>>
>>> http://www.freebsd.org/cgi/man.cgi?query=portsclean&sektion=1&apropos=0&manpath=FreeBSD+9.0-RELEASE+and+Ports
>>> 	portsclean --distclean
>>> 	Clean out all the distfiles that are not referenced by any
>>> 	port in the ports tree.
>>>
>>> https://wiki.freebsd.org/portupgrade
>>> 	Portupgrade (aka pkgtools)
>>> 	last edited 2012-08-01
>>
>> Why are you looking at the wiki?
> 
> I didnt know what tool to look for so a search engine took me to the wiki.
> 
>> The code was updated only a few months
>> ago?

The wiki seems generally fine to me but I didn't read details.

> 
> Err ? moved from wiki to which ports/ ?
> Wiki has "It is currently maintained by BryanDrewery <bdrewery at FreeBSD.org>"
> So I added to CC. If the wiki is obsolete I suggest it be deleted
> or reduced to point to URL with new code.
> 
>>  https://svnweb.freebsd.org/ports/head/ports-mgmt/portupgrade/
> 
> Thanks.
> 
> [with current]
> cd /usr/ports/ports-mgmt/portupgrade ; make install ; man portupgrade
> 	"To clean unreferenced distfiles, working directories and old shared
>          libraries, use portsclean(1)"
> which portsclean				# /usr/local/sbin/portsclean
> pkg which /usr/local/sbin/portsclean		# portupgrade-2.4.14,2
> pkg info portupgrade-2.4.14,2 | grep Origin 	# ports-mgmt/portupgrade
> 
> 
>> I think the case for portupgrade and portsclean is now much stronger
>> than it was before they were fully converted to pkg. That removed all
>> the problems associated with maintaining a secondary database. The
>> conversion to pkg replaced portmaster's best code and portupgrade's
>> worst.
> 
> I'm lost. I presume portupgrade had some bad code,
> replaced by good code from portmaster.

Portupgrade is objectively better.  Having maintained both for quite a
while, I have given up trying to fix the problems in portmaster.

Portupgrade has proper dependency handling, which portmaster does not
(https://github.com/freebsd/portmaster/issues/44 not easily fixable in
portmaster compared to easy to fix in portupgrade).

Portupgrade handles libraries during upgrade so your system is not
totally trashed during upgrade AND it does it in a sane order which
portmaster does not as it removes things on the way down the chain which
can result in basically removing everything while it works back up
(https://github.com/freebsd/portmaster/issues/40)

Portupgrade supports installing from packages, which portmaster does not
(https://github.com/freebsd/portmaster/pull/34 incomplete). [Likely
referenced by OP]

Portupgrade keeps logs.

Portupgrade keeps a db of the INDEX so it can be fast, compared to
portmaster reparsing it.

Portupgrade used to be frowned on for having a 2nd db for tracking
installing ports, but it no longer does. It just queries the pkg db with
'pkg query' now [as referenced by OP].

Portupgrade's biggest problem is still with ruby upgrades.

I could go on, but really I think both are pretty bad compared to using
Poudriere, which also has a 'distclean' sub-command.



-- 
Regards,
Bryan Drewery


More information about the freebsd-ports mailing list