Re: portupgrade && installation date of a package
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matthias Apitz wrote: | Hello, | | I was updating all packages which have been installed by the FreeBSD | 7.0R base installation and X11 with portupgrade like this: | | # portupgrade -f '<2008-08-13 12:55' | | i.e. update all packages/ports which have been installed before | 2008-08-13 12:55 (this was the time when the installation finished); | I picked up this time with an | | # ls -ltr /var/db/pkg | more | | and saw at which point the installation finished; so far so good; | | after some time I cancelled the 'portupgrade' because I forgot to say | "--batch" mode; a look into a new | | # ls -ltr /var/db/pkg | more | | showed that for each package dir there the time was updated to 'now', | i.e. no date before 2008-08-13 12:55 any more; but even with this a 2nd | | # portupgrade --batch -f '<2008-08-13 12:55' | | knows exactly which ports/packages have been installed before that date; | | my question is: where is this installation date stored? | | thx | | matthias | Hi Matthias, In the file /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb, there's a function for determining the package installation date: ~ def date_installed(pkgname) ~installed?(pkgname) or return nil ~File.mtime(pkg_comment(pkgname)) || ~ File.mtime(pkg_descr(pkgname)) || ~ File.mtime(pkg_contents(pkgname)) rescue Time.at(0) ~ end I'm not a Ruby programmer, but my reading of that snippet makes me think the mtime of one of the +COMMENT, +DESCR, or +CONTENTS files in /var/db/pkg/ is used for the installation date. I just checked a package directory on my system: fbsd70# cd /var/db/pkg/apache-2.0.63/ fbsd70# ls -latr total 142 - -rw-r--r--1 root wheel 17501 Apr 22 09:46 +MTREE_DIRS - -rw-r--r--1 root wheel 718 Apr 22 09:46 +INSTALL - -rw-r--r--1 root wheel 132 Apr 22 09:46 +DISPLAY - -rw-r--r--1 root wheel 501 Apr 22 09:46 +DESC - -rw-r--r--1 root wheel 49 Apr 22 09:46 +COMMENT - -rw-r--r--1 root wheel 100382 Jul 21 12:02 +CONTENTS drwxr-xr-x2 root wheel 512 Jul 23 14:40 . - -rw-r--r--1 root wheel 598 Jul 25 09:31 +REQUIRED_BY drwxr-xr-x 421 root wheel 11776 Aug 13 16:48 .. fbsd70# I believe the mtime for +COMMENT will be used, since it appears first in the Ruby expression above. The date on the directory itself is later, and is the same as many other directories in /var/db/pkg, as you noted, but that's not used. Hope that helps, Greg - -- Greg Larkin http://www.sourcehosting.net/ http://www.FreeBSD.org/ - The Power To Serve -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIpCdn0sRouByUApARAve0AKCkhRN8ciuiBzny0pLWInTJTv9vxwCghP7b ObkVBIW3xik7iL62iOiMiyI= =3h8D -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
portupgrade && installation date of a package
Hello, I was updating all packages which have been installed by the FreeBSD 7.0R base installation and X11 with portupgrade like this: # portupgrade -f '<2008-08-13 12:55' i.e. update all packages/ports which have been installed before 2008-08-13 12:55 (this was the time when the installation finished); I picked up this time with an # ls -ltr /var/db/pkg | more and saw at which point the installation finished; so far so good; after some time I cancelled the 'portupgrade' because I forgot to say "--batch" mode; a look into a new # ls -ltr /var/db/pkg | more showed that for each package dir there the time was updated to 'now', i.e. no date before 2008-08-13 12:55 any more; but even with this a 2nd # portupgrade --batch -f '<2008-08-13 12:55' knows exactly which ports/packages have been installed before that date; my question is: where is this installation date stored? thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e <[EMAIL PROTECTED]> - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ We should all learn from the peoples of The Netherlands, France and Ireland. Aprendamos todos de los pueblos de Holanda, Francia e Irlanda. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Installation date ?
On 02 May 2006, at 5:41 PM, S t i n g r a y wrote: Its been a long time since i installed my FreeBSD server & its been running since then , how can i find the installation date & time of my server ? If it's been running since you installed it, do 'uptime'. It'll tell you how long the machine's been running. *º¤., ¸¸,.¤º*¨¨¨*¤ Stingray *º¤., ¸¸,.¤º*¨¨*¤ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions- [EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Installation date ?
On 5/2/06, S t i n g r a y <[EMAIL PROTECTED]> wrote: Its been a long time since i installed my FreeBSD server & its been running since then , how can i find the installation date & time of my server ? If you used sysinstall to update (or create) anything in /etc/rc.conf it leaves a comment line with the date. Again, assuming the clock was correct at installation. -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Installation date ?
On Tue, May 02, 2006 at 11:18:50AM -0700, Kent Stewart wrote: > > Look at the date of the kernel in /boot. That was the time it was last > updated. You can use "uname -a" to find which version and also when it > was compiled. Thought there was once an option in ls to show birth/creation date of a file. stat(1) does the job, so "stat /var" to see when /var was created which is probably the same time as the system was installed. Assuming the system clock was correct during the operation. -- David Kelly N4HHE, [EMAIL PROTECTED] Whom computers would destroy, they must first drive mad. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Installation date ?
On Tuesday 02 May 2006 10:41, S t i n g r a y wrote: > Its been a long time since i installed my FreeBSD > server & its been running since then , how can i find > the installation date & time of my server ? > Look at the date of the kernel in /boot. That was the time it was last updated. You can use "uname -a" to find which version and also when it was compiled. Kent -- Kent Stewart Richland, WA http://www.soyandina.com/ "I am Andean project". http://users.owt.com/kstewart/index.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Installation date ?
If it's actually been running the entire time (no reboots) you can use the uptime command (this info is also displayed in top). If you've rebooted since install, I'm not sure how you could determine that. On 5/2/06, S t i n g r a y <[EMAIL PROTECTED]> wrote: Its been a long time since i installed my FreeBSD server & its been running since then , how can i find the installation date & time of my server ? *º¤., ¸¸,.¤º*¨¨¨*¤ Stingray *º¤., ¸¸,.¤º*¨¨*¤ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Installation date ?
Its been a long time since i installed my FreeBSD server & its been running since then , how can i find the installation date & time of my server ? *º¤., ¸¸,.¤º*¨¨¨*¤ Stingray *º¤., ¸¸,.¤º*¨¨*¤ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: finding installation date ?
On Wed, Jan 12, 2005 at 10:36:18AM -0800, faisal gillani wrote: > that shows 24 feb 2004 .. > but isnt that the release date of my freebsd 5.2 ? Try looking at the date of the /rescue directory and see what that says. Cheers. -- Jonathan Chen <[EMAIL PROTECTED]> -- Do not take life too seriously. You will never get out of it alive. > --- Jonathan Chen <[EMAIL PROTECTED]> wrote: > > > On Tue, Jan 11, 2005 at 09:49:26AM -0800, faisal > > gillani wrote: > > > how can i find what date did i install my freebsd > > box > > > > The date of the files in /rescue will tell you the > > date of your last > > installation or installworld. > > -- > > Jonathan Chen <[EMAIL PROTECTED]> > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: finding installation date ?
that shows 24 feb 2004 .. but isnt that the release date of my freebsd 5.2 ? thanks --- Jonathan Chen <[EMAIL PROTECTED]> wrote: > On Tue, Jan 11, 2005 at 09:49:26AM -0800, faisal > gillani wrote: > > how can i find what date did i install my freebsd > box > > The date of the files in /rescue will tell you the > date of your last > installation or installworld. > -- > Jonathan Chen <[EMAIL PROTECTED]> > -- > Don't worry about > avoiding temptation, > as you grow older, it > starts avoiding you. > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" > = *º¤., ¸¸,.¤º*¨¨¨*¤ Allah-hu-Akber*º¤., ¸¸,.¤º*¨¨*¤ __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: finding installation date ?
On Tue, Jan 11, 2005 at 09:49:26AM -0800, faisal gillani wrote: > how can i find what date did i install my freebsd box The date of the files in /rescue will tell you the date of your last installation or installworld. -- Jonathan Chen <[EMAIL PROTECTED]> -- Don't worry about avoiding temptation, as you grow older, it starts avoiding you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
finding installation date ?
how can i find what date did i install my freebsd box ? thanks = *º¤., ¸¸,.¤º*¨¨¨*¤ Allah-hu-Akber*º¤., ¸¸,.¤º*¨¨*¤ __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"