installdate of a port/package?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

installdate of a port/package?

Ronald Klop-2
Hello,

I just upgraded a machine from FreeBSD 6 to 7. Very nice.
But my portupgrade -fa failed after a while.
How can I know which ports/packages are still from FreeBSD 6? Is there a  
datee recorded somewhere or the FreeBSD-version of the port/package?
The date of the files in /var/db/pkg/* is unreliable, because installing a  
package gives these files the date of the files in the package.

How do I know which ports I still need to update?

Ronald.

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installdate of a port/package?

Alex Trull
Ronald,

Look for files that are older than your upgrade/portupgrade -fa date in
/usr/local/bin and /usr/local/sbin.

e.g. $ find $dir -mtime +2 -type f -xdev -print

Add a little guesswork/pkg_info to determine which ports they're from.

Throw in a few more forced recursive portupgrades incase anything is
broken for having built against older libraries.

--
Alex

On Tue, Jul 01, 2008 at 05:12:05PM +0200, Ronald Klop wrote:

> Hello,
>
> I just upgraded a machine from FreeBSD 6 to 7. Very nice.
> But my portupgrade -fa failed after a while.
> How can I know which ports/packages are still from FreeBSD 6? Is there a  
> datee recorded somewhere or the FreeBSD-version of the port/package?
> The date of the files in /var/db/pkg/* is unreliable, because installing
> a package gives these files the date of the files in the package.
>
> How do I know which ports I still need to update?
>
> Ronald.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installdate of a port/package?

Graham Menhennitt-3
In reply to this post by Ronald Klop-2
Ronald Klop wrote:
> I just upgraded a machine from FreeBSD 6 to 7. Very nice.
> But my portupgrade -fa failed after a while.
> ...
> How do I know which ports I still need to update?
Run "portupgrade -fan" and see which ones it says still need upgrading.

Graham
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installdate of a port/package?

Alexander Vyrlanovich-2
In reply to this post by Ronald Klop-2
Hi

May be this will be useful for you (from man portupgrade):

        Rebuild and reinstall all that ports that were installed  
prior to the
        date 2001-09-20:

        portupgrade -f '<2001-09-20'


On 1 июля 2008, at 18:12, Ronald Klop wrote:

> Hello,
>
> I just upgraded a machine from FreeBSD 6 to 7. Very nice.
> But my portupgrade -fa failed after a while.
> How can I know which ports/packages are still from FreeBSD 6? Is  
> there a datee recorded somewhere or the FreeBSD-version of the port/
> package?
> The date of the files in /var/db/pkg/* is unreliable, because  
> installing a package gives these files the date of the files in the  
> package.
>
> How do I know which ports I still need to update?
>
> Ronald.
>
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-
> [hidden email]"

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installdate of a port/package?

Andrew Kolchoogin-2
In reply to this post by Graham Menhennitt-3
Wed, 02/07/2008 в 08:11 +1000, Graham Menhennitt writes:

> Ronald Klop wrote:
> > I just upgraded a machine from FreeBSD 6 to 7. Very nice.
> > But my portupgrade -fa failed after a while.
> > ...
> > How do I know which ports I still need to update?
> Run "portupgrade -fan" ...
    ... and it will suggest you to reinstall/upgrade everything. :)

    "portupgrade -an" will do suggest you to upgrade only outdated
packages, but trouble in question is in that there is no way to
determine what version of FreeBSD package was built on, neither using
base system utilities, nor using tools from ports-mgmt/ -- one may
suggest me to do this the way Gentoo's "revdep-rebuild" script does --
i.e., using ldd to determine which version of libc.so executable in
question is linked with, asking pkg_info about what port contains the
file and rebuilding such a port with portupgrade, this method is more or
less good, but it is not a universal one.

    First of all, there're statically linked executables. Oh, well, one
might use "strings" to extract them from executable and try to guess C
compiler version executable was built with, but, in my opinon, human
trying to rely on method described above is a "dangerous sharlatan" (C)
opensolaris.org, BrandZ community. :)

    Second, there're a couple of ports that contains only libraries, and
there're TONS of software which doesn't use advanced capabilities of
modern link editors that are able to link one shared library with
others, thus giving a large chance to run-time link editor to choke from
incorrect versions of shared libraries, and making our first method of
determining fairly useless.

    At last, but not at least, one can rely on versioned symbols, but
this method can be used when people will upgrade old and obsolete
RELENG_7 to modern and sexy RELENG_8, :) so I will not discuss it here
at least in three years. ;)

    Conclusion: when you're upgrading from (n-1).x to n.x and starting
"portupgrade -fa", in my opinion, the only safe choice in a case of
"portupgrade -fa" faults is to start it again (oh-eh!).
It's feasible, though, to avoid use of "portupgrade -fa" -- prepare list
of packages with dependencies using "portupgrade -nfa" and use the
simplest shell statement:

for i in `cat package-list`; do portupgrade -f $i; done
--
Andrew Kolchoogin <[hidden email]>
Cronyx Plus LLC

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installdate of a port/package?

Norberto Meijome-2
In reply to this post by Alex Trull
On Tue, 1 Jul 2008 16:34:47 +0100
Alex Trull <[hidden email]> wrote:

> e.g. $ find $dir -mtime +2 -type f -xdev -print
>
> Add a little guesswork/pkg_info to determine which ports they're from.

you can use pkg_info -W {file} to find out which port installed {file}

_________________________
{Beto|Norberto|Numard} Meijome

Your reasoning is excellent -- it's only your basic assumptions that are wrong.

I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installdate of a port/package?

Oliver Fromme
In reply to this post by Ronald Klop-2
Ronald Klop wrote:
 > I just upgraded a machine from FreeBSD 6 to 7. Very nice.
 > But my portupgrade -fa failed after a while.
 > How can I know which ports/packages are still from FreeBSD 6? Is there a  
 > datee recorded somewhere or the FreeBSD-version of the port/package?
 > The date of the files in /var/db/pkg/* is unreliable, because installing a  
 > package gives these files the date of the files in the package.

Sorry for th late reply, I didn't see this thread earlier.

You can look at the ctime of the +DESC files.  That should
be the time when the packages were installed.  This command
will list all packages in the order they were installed:

ls -lcrt /var/db/pkg/*/+DESC

Best regards
   Oliver

--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

(On the statement print "42 monkeys" + "1 snake":)  By the way,
both perl and Python get this wrong.  Perl gives 43 and Python
gives "42 monkeys1 snake", when the answer is clearly "41 monkeys
and 1 fat snake".        -- Jim Fulton
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Loading...