puppet-pkgng icon indicating copy to clipboard operation
puppet-pkgng copied to clipboard

possibility of regulation (and turnoff) for pkg_has_updates / monopolization of pkg by pkgng via pkg-version

Open olevole opened this issue 6 years ago • 1 comments

For system with lot of packages execution of:

https://github.com/xaque208/puppet-pkgng/blob/2.1.1/lib/facter/pkg_updates.rb#L8:

50338  1  S      0:00.01 /usr/sbin/pkg version -ql<
50339  1  D      0:00.12 /usr/sbin/pkg version -ql<

for pkg_has_updates facts always lock pkg for a long time and user can do anything with pkg. The problem is the slow 'pkg version' execution when ports not installed (and fetchindex not performed). For example, on a PC with desktop role (KDE5) and 1746 packages this operation may take ~ 20 minutes (no ssd, one hdd).

More details: https://github.com/freebsd/pkg/issues/1739

it would be nice to regulate this behavior and be able to turn off. Or try to find another solution, for example pkg dry-run:

pkg upgrade -Unq

or

pkg version -RU

olevole avatar Feb 06 '19 13:02 olevole

That is a lot of packages. My largest box has 263. +1 to this change.

zachfi avatar Feb 13 '19 05:02 zachfi