Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Nov 2014 09:30:24 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: after 10.0 -> 10.1 rebuild: how to force pkg reinstall ?
Message-ID:  <54686EB0.70804@FreeBSD.org>
In-Reply-To: <20141116082544.GB44537@home.opsec.eu>
References:  <20141116082544.GB44537@home.opsec.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--1iKQB6jWuAmqT4Pw06w2EcWXlcKM3v1sx
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 16/11/2014 08:25, Kurt Jaeger wrote:
> Now that 10.1 is released, I re-built all the ports relevant to me via
>=20
> poudriere bulk -f ~/pkg/all -j 10x
>=20
> and then had a nice new repo to pkg update.
>=20
> But: If I upgrade a 10.0 box to 10.1 and then ask them to use the
> new repo, how can I enforce a complete reinstall of all packages
> built on 10.1 instead of having a mix of old and new pkgs ?

For a 10.0 to 10.1 upgrade, reinstalling everything is not generally
required.  However I assume you have your own reasons to want to do so.

You can force a re-install of all installed packages by:

	 # pkg upgrade -f

If you want to selectively update just the packages installed from a
particular repo, or installed before a specific date, there isn't a
handy built-in way to do that.  You'll have to generate a list of
appropriate packages and feed it to pkg install -f using xargs(1) -- eg.

  # pkg query "%n-%v %An %Av" | grep "repository $reponame" \
	| cut -d' ' -f 1 | xargs pkg install -f

  # date=3D$( date -j -f "%Y-%m-%d %H:%M:%S" "2014-10-16 00:00:00" +%s )
  # pkg query "%n-%v %t" | awk "{ if (\$2 < $date ) print \$1; }" \
	| xargs pkg install -f

The business with 'date -j -f ...' is to convert a  date specified in
the usual way (year, month, day, hour, minutes, seconds) into the unix
epoch time, which can then be compared as an integer to the timestamp
pkg(8) produces.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



--1iKQB6jWuAmqT4Pw06w2EcWXlcKM3v1sx
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)

iQJ8BAEBCgBmBQJUaG64XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT5p8P/Ri/whx9E5cn/Uf9M/Jmeukl
MtU9Lu9RYuBqLpm5gHivFFRmR+WCMc1IrN3YrGtqzoAfqkOAOU6qvXJb3A2tlpmz
IjrBBsuiVbrmbPnSqJ1Txrfiqz4Kt/WwrwuMDAP1WW+gUFhazQxKgrnRYwSybeKT
PxKMb2SvXyAoFMECQ6nJ5ouGyoilrhDWxx2BXmjfxXqgLQG4l6+Mw79tzNW4nkO0
T91TwlADQwPwJGIOunL8mfTuycQgZc/X7tbGirAwvwo6hm8GbCnt/Y84e6R/9W7F
BY0aDq5i6k0J4Pe8XckBpUOsVpl2doJhBtUA1BYa3sGEKUl00waQlfRlwQ+LjduV
jDVIyiHUKlO1j9Ymafgpt2wIUnUW/fWLBhujbDsYjFtAHGP0LVs66czT53yw8sL5
Ur064HOUSF2LCurWfRn1MHjQCjPkyqLZ6pQEKqRCUqvcbGYKpBfVL3PfxaYCJcj/
uPfSkLlSs4wuRnS4Uz2smwKvKRSS2RtQdNMy6RMRiW9H8E/7F/tEmIqTwOQH1PBu
AUJYnZtkZqHb1uFchB06EVwntdM09Ix0biYKjId3EpPrES3pWMBl83LLas3gKrLY
b1gANWntMJF8Vylx6GhN744CCe4oYqZmfI1bBgtCcBv8p10rhWDV9h6oa334v7E7
i55EQ7aR9LDIsRE5jpav
=ny6k
-----END PGP SIGNATURE-----

--1iKQB6jWuAmqT4Pw06w2EcWXlcKM3v1sx--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54686EB0.70804>