Re: regenerating /var/db/pkg

2010-04-26 Thread Eitan Adler
On Mon, Apr 26, 2010 at 2:01 PM, RW wrote: > On Thu, 22 Apr 2010 20:05:48 +0300 > Eitan Adler wrote: > >> bak=/var/backups > > This should be configurable IMO. This currently isn't configurable in 210.backup-aliases which is where I copied this from. I'm going to submit a *separate* PR with an e

Re: regenerating /var/db/pkg

2010-04-26 Thread RW
On Thu, 22 Apr 2010 20:05:48 +0300 Eitan Adler wrote: > bak=/var/backups This should be configurable IMO. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-

Re: regenerating /var/db/pkg

2010-04-26 Thread Eitan Adler
> It would be nice if some of the more usable functions got moved out of > rc.subr though :(... It would cure 20 lines of duplicate code here and > elsewhere outside of rc land... Where should they go? I'll gladly work on a patch to make them available to periodic scripts. > > Yes, and you're assu

Re: regenerating /var/db/pkg

2010-04-26 Thread Garrett Cooper
2010/4/25 Doug Barton : > On 04/25/10 19:44, Garrett Cooper wrote: >> On Thu, Apr 22, 2010 at 10:05 AM, Eitan Adler >> wrote: >>> Same as before - if all is good I'll send a PR >>> >>> #!/bin/sh >>> # >>> # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 >>> 2009/10/25 01:10:29

Re: regenerating /var/db/pkg

2010-04-26 Thread Eitan Adler
On Mon, Apr 26, 2010 at 5:33 AM, Doug Barton wrote: > FWIW, this looks fine to me. Have you submitted a PR? > Yes, http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145957 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listi

Re: regenerating /var/db/pkg

2010-04-25 Thread Doug Barton
On 04/25/10 19:55, Doug Barton wrote: >>>if [ ! -d $db_loc ] > > I generally do quote the string as a matter of paranoia, however the > practical result is likely to be the same. ... unless it's possible that the path name will have spaces in it, which is the main reason for my paranoia.

Re: regenerating /var/db/pkg

2010-04-25 Thread Doug Barton
On 04/25/10 19:44, Garrett Cooper wrote: > On Thu, Apr 22, 2010 at 10:05 AM, Eitan Adler > wrote: >> Same as before - if all is good I'll send a PR >> >> #!/bin/sh >> # >> # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 >> 2009/10/25 01:10:29 kensmith Exp $ >> # >> >> # If th

Re: regenerating /var/db/pkg

2010-04-25 Thread Garrett Cooper
On Thu, Apr 22, 2010 at 10:05 AM, Eitan Adler wrote: > Same as before - if all is good I'll send a PR > > #!/bin/sh > # > # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 > 2009/10/25 01:10:29 kensmith Exp $ > # > > # If there is a global system configuration file, suck it in.

Re: regenerating /var/db/pkg

2010-04-25 Thread Doug Barton
FWIW, this looks fine to me. Have you submitted a PR? Doug On 04/22/10 10:05, Eitan Adler wrote: > Same as before - if all is good I'll send a PR > > #!/bin/sh > # > # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 > 2009/10/25 01:10:29 kensmith Exp $ > # > > # If there is

Re: regenerating /var/db/pkg

2010-04-23 Thread Wesley Shields
On Thu, Apr 22, 2010 at 08:56:39AM -0500, Dan Rue wrote: > On Thu, Apr 22, 2010 at 03:21:16PM +0300, Eitan Adler wrote: > > > > > > Just asking opinions, if people want this, I'll make a patch and > > > file a PR. > > > > > > > Is this script correct? > > We're starting to use SSDs for boot drive

regenerating /var/db/pkg

2010-04-23 Thread Robert Huff
Aryeh M. Friedman writes: > I acciddentally rm'ed my /var/db/pkg and want to know is it > possible to rgenerate it (I have portmaster and portupgrade > installed) (I'm assuming you have _completely_ deleted the contents of /var/db/pkg.) If you have not deleted /usr/ports/distf

Re: regenerating /var/db/pkg

2010-04-22 Thread Diane Bruce
On Thu, Apr 22, 2010 at 06:48:43PM +, b. f. wrote: > Doug Barton wrote: > >On 4/20/2010 7:11 PM, Aryeh M. Friedman wrote: ... > find /usr/local -type f -print0 | xargs -0 pkg_which -v | fgrep '?' libchk would also be useful. ... > > But as Doug suggests, a full cleanup of PREFIX/LOCALBASE an

Re: regenerating /var/db/pkg

2010-04-22 Thread b. f.
Doug Barton wrote: >On 4/20/2010 7:11 PM, Aryeh M. Friedman wrote: >> I acciddentally rm'ed my /var/db/pkg and want to know is it possible to >> rgenerate it (I have portmaster and portupgrade installed) > >Portmaster certainly can't do this, it uses the information from >/var/db/pkg. I'm not sure

Re: regenerating /var/db/pkg

2010-04-22 Thread b. f.
>Am 22.04.2010 14:49, schrieb Diane Bruce: >> On Tue, Apr 20, 2010 at 10:11:24PM -0400, Aryeh M. Friedman wrote: >>> I acciddentally rm'ed my /var/db/pkg and want to know is it possible to >>> rgenerate it (I have portmaster and portupgrade installed) >> >> >> You would have to write a script which

Re: regenerating /var/db/pkg

2010-04-22 Thread ไพรัช ศรีโยธา
hi, have you tried pkgdb -u ? -- psr มะฃาม ฅินเดินดน มะไฟ ฅนเหลิงฟ้า http://makham.blogspot.com Quoting Diane Bruce : On Tue, Apr 20, 2010 at 10:11:24PM -0400, Aryeh M. Friedman wrote: I acciddentally rm'ed my /var/db/pkg and want to know is it possible to rgenerate it (I have portmaster

Re: regenerating /var/db/pkg

2010-04-22 Thread Matthias Andree
Am 22.04.2010 14:49, schrieb Diane Bruce: > On Tue, Apr 20, 2010 at 10:11:24PM -0400, Aryeh M. Friedman wrote: >> I acciddentally rm'ed my /var/db/pkg and want to know is it possible to >> rgenerate it (I have portmaster and portupgrade installed) > > > You would have to write a script which wen

Re: regenerating /var/db/pkg

2010-04-22 Thread Diane Bruce
On Thu, Apr 22, 2010 at 09:48:37AM -0700, Doug Barton wrote: > On 4/22/2010 6:44 AM, Diane Bruce wrote: > > On Thu, Apr 22, 2010 at 04:12:08PM +0300, Eitan Adler wrote: ... > > MAILTO=... > > @weekly /usr/sbin/pkg_info -I -a > > pkg_info -o -a would probably be more useful from the standp

Re: regenerating /var/db/pkg

2010-04-22 Thread Eitan Adler
Same as before - if all is good I'll send a PR #!/bin/sh # # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 2009/10/25 01:10:29 kensmith Exp $ # # If there is a global system configuration file, suck it in. # if [ -r /etc/defaults/periodic.conf ] then . /etc/defaults/perio

Re: regenerating /var/db/pkg

2010-04-22 Thread Doug Barton
On 4/22/2010 9:54 AM, Doug Barton wrote: > Also, a better invocation might be: > db_loc=`pm_make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null` Make that just "/usr/bin/make" instead of pm_make, I should have looked more carefully at what I pasted. :) Doug -- ... and that's jus

Re: regenerating /var/db/pkg

2010-04-22 Thread Doug Barton
On 4/22/2010 9:08 AM, Eitan Adler wrote: > taking into account your feedback here is the new version > If all is good I'll submit a PR > > #!/bin/sh > # > # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 > 2009/10/25 01:10:29 kensmith Exp $ > # > > # If there is a global s

Re: regenerating /var/db/pkg

2010-04-22 Thread Doug Barton
On 4/22/2010 6:44 AM, Diane Bruce wrote: > On Thu, Apr 22, 2010 at 04:12:08PM +0300, Eitan Adler wrote: >>> Hmm, I guess you shouldn't backup /var/foo to /var/bar. If /var is lost, >>> your backup is gone, too. > > In your crontab > > MAILTO=... > @weekly /usr/sbin/pkg_info -I -a pkg_in

Re: regenerating /var/db/pkg

2010-04-22 Thread Eitan Adler
taking into account your feedback here is the new version If all is good I'll submit a PR #!/bin/sh # # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 2009/10/25 01:10:29 kensmith Exp $ # # If there is a global system configuration file, suck it in. # if [ -r /etc/defaults

Re: regenerating /var/db/pkg

2010-04-22 Thread Joerg Sonnenberger
On Thu, Apr 22, 2010 at 08:56:39AM -0500, Dan Rue wrote: > We're starting to use SSDs for boot drives in our freebsd boxes. We'd > like to have /var on a memory backed FS, but losing the package database > on every reboot is troublesome. Tried using a symlink from /var/db/pkg to /usr/local/.pkg

Re: regenerating /var/db/pkg

2010-04-22 Thread Dan Rue
On Thu, Apr 22, 2010 at 03:21:16PM +0300, Eitan Adler wrote: > > > > Just asking opinions, if people want this, I'll make a patch and > > file a PR. > > > > Is this script correct? We're starting to use SSDs for boot drives in our freebsd boxes. We'd like to have /var on a memory backed FS, but

Re: regenerating /var/db/pkg

2010-04-22 Thread Trond Endrestøl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010 15:21+0300, Eitan Adler wrote: > > Just asking opinions, if people want this, I'll make a patch and > > file a PR. > > Is this script correct? > > #!/bin/sh > # > # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2

Re: regenerating /var/db/pkg

2010-04-22 Thread Diane Bruce
On Thu, Apr 22, 2010 at 04:12:08PM +0300, Eitan Adler wrote: > > Hmm, I guess you shouldn't backup /var/foo to /var/bar. If /var is lost, > > your backup is gone, too. In your crontab MAILTO=... @weekly /usr/sbin/pkg_info -I -a Once a week is reasonable. - Diane -- - d...@freebsd.org

Re: regenerating /var/db/pkg

2010-04-22 Thread Lars Engels
On Thu, Apr 22, 2010 at 03:21:16PM +0300, Eitan Adler wrote: > > > > Just asking opinions, if people want this, I'll make a patch and > > file a PR. > > > > Is this script correct? > > #!/bin/sh > # > # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 > 2009/10/25 01:10:29 kensm

Re: regenerating /var/db/pkg

2010-04-22 Thread Eitan Adler
> Hmm, I guess you shouldn't backup /var/foo to /var/bar. If /var is lost, > your backup is gone, too. I took the backup location from one of the other periodic scripts. Where should it be backed up to then? ___ freebsd-hackers@freebsd.org mailing list h

Re: regenerating /var/db/pkg

2010-04-22 Thread Diane Bruce
On Tue, Apr 20, 2010 at 10:11:24PM -0400, Aryeh M. Friedman wrote: > I acciddentally rm'ed my /var/db/pkg and want to know is it possible to > rgenerate it (I have portmaster and portupgrade installed) You would have to write a script which went through each file in /usr/local/bin and /usr/local

Re: regenerating /var/db/pkg

2010-04-22 Thread Eitan Adler
> > Just asking opinions, if people want this, I'll make a patch and > file a PR. > Is this script correct? #!/bin/sh # # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1 2009/10/25 01:10:29 kensmith Exp $ # # If there is a global system configuration file, suck it in. # if [ -

Re: regenerating /var/db/pkg

2010-04-22 Thread Ruben de Groot
On Wed, Apr 21, 2010 at 10:43:37PM -0700, Doug Barton typed: > On 4/20/2010 7:11 PM, Aryeh M. Friedman wrote: > > I acciddentally rm'ed my /var/db/pkg and want to know is it possible to > > rgenerate it (I have portmaster and portupgrade installed) > > Portmaster certainly can't do this, it uses

Re: regenerating /var/db/pkg

2010-04-21 Thread Samuel Martín Moro
I once coded a shellscript to do that, restore from corrupted pkgdb I have it at work (if you can wait until next monday) the easyest way I found was to pkg_add -Ff every package missing in pkg_info, and extract missing files from packages still there but you would need a package list to do that

Re: regenerating /var/db/pkg

2010-04-21 Thread Doug Barton
On 4/20/2010 7:11 PM, Aryeh M. Friedman wrote: > I acciddentally rm'ed my /var/db/pkg and want to know is it possible to > rgenerate it (I have portmaster and portupgrade installed) Portmaster certainly can't do this, it uses the information from /var/db/pkg. I'm not sure if portupgrade can do it

regenerating /var/db/pkg

2010-04-20 Thread Aryeh M. Friedman
I acciddentally rm'ed my /var/db/pkg and want to know is it possible to rgenerate it (I have portmaster and portupgrade installed) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, sen