NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Necessity of rebuilding pkgsrc after updating the system
On August 17, 2015 11:27:00 AM EDT, Ottavio Caruso <ottavio2006-netbsd%yahoo.com@localhost> wrote:
>On 17 August 2015 at 15:47, Pongthep Kulkrisada <ptkrisada%gmail.com@localhost>
>wrote:
>> So my question...
>> Is there a SINGLE command to force rebuild all installed pkgsrc?
>
>
>Never done it myself, but have you considered this:
>
>pkg_info -Q PKGPATH -a > pkgs_i_want_to_have
>
>pkg_info -a | sed 's/ .*//' | tail -r | while read p ; do pkg_delete $p
>; done
>
>cat pkgs_i_want_to_have | (while read pp ; do cd /usr/pkgsrc/$pp ;
>make && make install ; done)
>
>
>Taken from the wiki:
>https://wiki.netbsd.org/pkgsrc/how_to_upgrade_packages/#index8h2
That won't do quite what you want because it'll mark *all* packages as ones that you explicitly asked to be installed, which tends to lead to a lot of unnecessary work figuring out why you're getting conflict between old and new versions or renamed packages that other packages depend on.
Pkgsrc keeps track of which ones you pkg_add'ed (or make install'd) vs what just happened to get installed as a dependency and if you stick to just trying to (re)install the former things go much smoother.
I don't remember offhand how to get that list, but I think it was not quite as obvious as it should be, so you might need to look around a bit for the right commands.
Eric
Home |
Main Index |
Thread Index |
Old Index