Re: Pkg_info corrupt for some packages
On Mon, Apr 14, 2008 at 10:47:01PM +0200, Aijaz Baig wrote: > Hello, > > I tried running the script suggested by mel and after that I was able to see > that some of those packages got registered as installed. > > However some of the packages were not being found and as an example I saw > the following: > > Restoring doodle-0.6.6_1 > Failed: cannot find doodle-0.6.6_1 in /usr/ports/INDEX-7* > > *Then as suggested by andrew I tried to see just how many packages have been > messed and to my shock the figure for the first command was 336 and for the > second command was 326. > > Well...how do I 'extract the port origins' from pkgdb.db?I am sorry if I > sound naive but im a bit new to freebsd. Ten lost ports is easy enough to do by hand - look what packages miss their contents and find them in the ports tree. Then just cd to each /usr/ports/whatever/whenever and run make install -DFORCE_PKG_REGISTER That should do it. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
Hello, I tried running the script suggested by mel and after that I was able to see that some of those packages got registered as installed. However some of the packages were not being found and as an example I saw the following: Restoring doodle-0.6.6_1 Failed: cannot find doodle-0.6.6_1 in /usr/ports/INDEX-7* *Then as suggested by andrew I tried to see just how many packages have been messed and to my shock the figure for the first command was 336 and for the second command was 326. Well...how do I 'extract the port origins' from pkgdb.db?I am sorry if I sound naive but im a bit new to freebsd. Hope to hear from you guys, On Sun, Apr 13, 2008 at 11:01 PM, Mel <[EMAIL PROTECTED]> wrote: > On Sunday 13 April 2008 11:41:19 Aijaz Baig wrote: > > Hi, > > > > Well...I tried to cut and paste the command as is by mel (though It > would > > have been better if you explained what that cryptic looking command > > actually meant) and I got the followinfg output: > > > > 'grep: /var/db/pkg/xorg-server-1.4_4,1/+CONTENTS: No such file or > directory > > Well, that explaines it right there. It wasn't installed properly, because > every installed port should have a +CONTENTS file. > You can grab the files from 'pkgdb.db' like Andrew suggested, but I > personally > wouldn't trust those if portupgrade was the one that did this in the first > place. > This is where daily backups rock :). > > If your /usr/ports/INDEX-6 (or -7) is in sync with your installed > packages, > then maybe the following script will work. It worked for me testing it, > but I > can't guarentee it will work in all cases. > > If you're on FreeBSD 6, change INDEXFILE to /usr/ports/INDEX-6. Rest > should > work without changes. > > #!/bin/sh > > > INDEXFILE='/usr/ports/INDEX-7' > for dir in /var/db/pkg/*; do >if test ! -e ${dir}/+CONTENTS -a -d ${dir}; then >pkgname=${dir##*pkg/} >echo "Restoring ${pkgname}" >IDX=$(grep "^${pkgname}|" ${INDEXFILE} 2>/dev/null) >if test -z "${IDX}"; then >echo "Failed: cannot find ${pkgname} in ${INDEXFILE}" >else >_origin=${IDX#*|} >origin=${_origin%%|*} >echo "---> ${origin}" >cd ${origin} >mv ${dir} /tmp/ >make -DFORCE_PKG_REGISTER generate-plist fake-pkg >for file in /tmp/${pkgname}/*; do >f=${file##*/} >if test ! -f ${dir}/${f}; then >echo "--> Restoring ${pkgname}/${f}" >mv ${file} ${dir}/ >fi >done >fi >fi > done > > > -- > Mel > > Problem with today's modular software: they start with the modules >and never get to the software part. > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
On Sunday 13 April 2008 11:41:19 Aijaz Baig wrote: > Hi, > > Well...I tried to cut and paste the command as is by mel (though It would > have been better if you explained what that cryptic looking command > actually meant) and I got the followinfg output: > > 'grep: /var/db/pkg/xorg-server-1.4_4,1/+CONTENTS: No such file or directory Well, that explaines it right there. It wasn't installed properly, because every installed port should have a +CONTENTS file. You can grab the files from 'pkgdb.db' like Andrew suggested, but I personally wouldn't trust those if portupgrade was the one that did this in the first place. This is where daily backups rock :). If your /usr/ports/INDEX-6 (or -7) is in sync with your installed packages, then maybe the following script will work. It worked for me testing it, but I can't guarentee it will work in all cases. If you're on FreeBSD 6, change INDEXFILE to /usr/ports/INDEX-6. Rest should work without changes. #!/bin/sh INDEXFILE='/usr/ports/INDEX-7' for dir in /var/db/pkg/*; do if test ! -e ${dir}/+CONTENTS -a -d ${dir}; then pkgname=${dir##*pkg/} echo "Restoring ${pkgname}" IDX=$(grep "^${pkgname}|" ${INDEXFILE} 2>/dev/null) if test -z "${IDX}"; then echo "Failed: cannot find ${pkgname} in ${INDEXFILE}" else _origin=${IDX#*|} origin=${_origin%%|*} echo "---> ${origin}" cd ${origin} mv ${dir} /tmp/ make -DFORCE_PKG_REGISTER generate-plist fake-pkg for file in /tmp/${pkgname}/*; do f=${file##*/} if test ! -f ${dir}/${f}; then echo "--> Restoring ${pkgname}/${f}" mv ${file} ${dir}/ fi done fi fi done -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
On Sun, Apr 13, 2008 at 11:41:19AM +0200, Aijaz Baig wrote: > Hi, > > Well...I tried to cut and paste the command as is by mel (though It would > have been better if you explained what that cryptic looking command actually > meant) and I got the followinfg output: > > 'grep: /var/db/pkg/xorg-server-1.4_4,1/+CONTENTS: No such file or directory > egrep: Unmatched ( or \(' Find out how many packages lost their contents: ls /var/db/pkg/*/?COMMENT|wc -l ls /var/db/pkg/*/?CONTENTS|wc -l Last time portupgrade removed all contents on my box, I had to extract port origins from pkgdb.db, then mkdir /var/db/pkg-old/ mv /var/db/pkg/* /var/db/pkg-old/ for i in origins; do cd /usr/ports/$i && make install done ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
Hi, Well...I tried to cut and paste the command as is by mel (though It would have been better if you explained what that cryptic looking command actually meant) and I got the followinfg output: 'grep: /var/db/pkg/xorg-server-1.4_4,1/+CONTENTS: No such file or directory egrep: Unmatched ( or \(' Then as suggested by leslie I issued a command '*pkgdb -F*' and on that I got the following on the terminal : '-- --> Checking the package registry database' and the I was back at the prompt. So I am wondering if theres a way to repair those packages somehow...cuz if I delete it before re installing the I would be jeopardizing the packages which are dependent on these packages and I do not know if reinstalling them without actually removing them first creates duplicates or not. Hope to hear from you guys about this. Regards, Aijaz Baig. On Fri, Apr 11, 2008 at 10:04 PM, Mel <[EMAIL PROTECTED]> wrote: > On Friday 11 April 2008 18:28:31 Andrew Pantyukhin wrote: > > On Fri, Apr 11, 2008 at 04:32:32PM +0200, Aijaz Baig wrote: > > > I was trying to find a way to list all the packages on my > > > system and I came across this little article and accordingly > > > issued the command *pkg_info | grep 'package name' *and I saw > > > the following on the screen instead: > > > > > > pkg_info: the package info for package 'Terminal-0.2.8' is corrupt > > > ... > > > pkg_info: the package info for package 'xorg-server-1.4_4,1' is > corrupt > > > > > > How did the pkg_info information for the above mentioned > > > packages became corrupt?.. > > > > Possibly the usual portupgrade fckup^Wglitch. > > > > > Is there to fix this problem? > > > > Reinstall all packages. > > That's a bit overdone maybe. > @OP: > Could you show output of: > grep '^@' /var/db/pkg/xorg-server-1.4_4,1/+CONTENTS |egrep -v '^(@comment > MD5| > @dirrm |@unexec)' > > > -- > Mel > > Problem with today's modular software: they start with the modules >and never get to the software part. > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
On Friday 11 April 2008 18:28:31 Andrew Pantyukhin wrote: > On Fri, Apr 11, 2008 at 04:32:32PM +0200, Aijaz Baig wrote: > > I was trying to find a way to list all the packages on my > > system and I came across this little article and accordingly > > issued the command *pkg_info | grep 'package name' *and I saw > > the following on the screen instead: > > > > pkg_info: the package info for package 'Terminal-0.2.8' is corrupt > > ... > > pkg_info: the package info for package 'xorg-server-1.4_4,1' is corrupt > > > > How did the pkg_info information for the above mentioned > > packages became corrupt?.. > > Possibly the usual portupgrade fckup^Wglitch. > > > Is there to fix this problem? > > Reinstall all packages. That's a bit overdone maybe. @OP: Could you show output of: grep '^@' /var/db/pkg/xorg-server-1.4_4,1/+CONTENTS |egrep -v '^(@comment MD5| @dirrm |@unexec)' -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
On Fri, Apr 11, 2008 at 04:32:32PM +0200, Aijaz Baig wrote: > I was trying to find a way to list all the packages on my > system and I came across this little article and accordingly > issued the command *pkg_info | grep 'package name' *and I saw > the following on the screen instead: > > pkg_info: the package info for package 'Terminal-0.2.8' is corrupt > ... > pkg_info: the package info for package 'xorg-server-1.4_4,1' is corrupt > > How did the pkg_info information for the above mentioned > packages became corrupt?.. Possibly the usual portupgrade fckup^Wglitch. > Is there to fix this problem? Reinstall all packages. > Furthermore, how do see the list of all the > available(installed) packages on my system? ls /var/db/pkg ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Pkg_info corrupt for some packages
Aijaz Baig skrev: Hello, I was trying to find a way to list all the packages on my system and I came across this little article and accordingly issued the command *pkg_info | grep 'package name' *and I saw the following on the screen instead: pkg_info: the package info for package 'Terminal-0.2.8' is corrupt pkg_info: the package info for package 'Thunar-0.9.0' is corrupt pkg_info: the package info for package 'doodle-0.6.6_1' is corrupt pkg_info: the package info for package 'hal-0.5.8.20070909' is corrupt pkg_info: the package info for package 'libexo-0.3.4' is corrupt pkg_info: the package info for package 'libextractor-0.5.18_2' is corrupt pkg_info: the package info for package 'libglade2-2.6.2' is corrupt pkg_info: the package info for package 'py25-libxml2-2.6.30' is corrupt pkg_info: the package info for package 'rarian-0.6.0_1' is corrupt pkg_info: the package info for package 'xf86-input-keyboard-1.2.2_1' is corrupt pkg_info: the package info for package 'xf86-input-mouse-1.2.3' is corrupt pkg_info: the package info for package 'xf86-video-ati-6.7.195' is corrupt pkg_info: the package info for package 'xf86-video-i810-1.6.5_3' is corrupt pkg_info: the package info for package 'xf86-video-nv-2.1.6' is corrupt pkg_info: the package info for package 'xf86-video-sunffb-1.1.0_4' is corrupt pkg_info: the package info for package 'xf86-video-vesa-1.3.0_1' is corrupt pkg_info: the package info for package 'xf86-video-vga-4.1.0_1' is corrupt pkg_info: the package info for package 'xfce-4.4.2' is corrupt pkg_info: the package info for package 'xfce4-desktop-4.4.2' is corrupt pkg_info: the package info for package 'xorg-7.3_1' is corrupt pkg_info: the package info for package 'xorg-drivers-7.3' is corrupt pkg_info: the package info for package 'xorg-server-1.4_4,1' is corrupt How did the pkg_info information for the above mentioned packages became corrupt?..Is there to fix this problem? Furthermore, how do see the list of all the available(installed) packages on my system? It looks like the command above only returned packages for which the pkg_info is corrupt. Hope to hear from you, Regards, AIjaz BAig. ___ Try pkgdb -F list all installed pkg_info | more /Leslie ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Pkg_info corrupt for some packages
Hello, I was trying to find a way to list all the packages on my system and I came across this little article and accordingly issued the command *pkg_info | grep 'package name' *and I saw the following on the screen instead: pkg_info: the package info for package 'Terminal-0.2.8' is corrupt pkg_info: the package info for package 'Thunar-0.9.0' is corrupt pkg_info: the package info for package 'doodle-0.6.6_1' is corrupt pkg_info: the package info for package 'hal-0.5.8.20070909' is corrupt pkg_info: the package info for package 'libexo-0.3.4' is corrupt pkg_info: the package info for package 'libextractor-0.5.18_2' is corrupt pkg_info: the package info for package 'libglade2-2.6.2' is corrupt pkg_info: the package info for package 'py25-libxml2-2.6.30' is corrupt pkg_info: the package info for package 'rarian-0.6.0_1' is corrupt pkg_info: the package info for package 'xf86-input-keyboard-1.2.2_1' is corrupt pkg_info: the package info for package 'xf86-input-mouse-1.2.3' is corrupt pkg_info: the package info for package 'xf86-video-ati-6.7.195' is corrupt pkg_info: the package info for package 'xf86-video-i810-1.6.5_3' is corrupt pkg_info: the package info for package 'xf86-video-nv-2.1.6' is corrupt pkg_info: the package info for package 'xf86-video-sunffb-1.1.0_4' is corrupt pkg_info: the package info for package 'xf86-video-vesa-1.3.0_1' is corrupt pkg_info: the package info for package 'xf86-video-vga-4.1.0_1' is corrupt pkg_info: the package info for package 'xfce-4.4.2' is corrupt pkg_info: the package info for package 'xfce4-desktop-4.4.2' is corrupt pkg_info: the package info for package 'xorg-7.3_1' is corrupt pkg_info: the package info for package 'xorg-drivers-7.3' is corrupt pkg_info: the package info for package 'xorg-server-1.4_4,1' is corrupt How did the pkg_info information for the above mentioned packages became corrupt?..Is there to fix this problem? Furthermore, how do see the list of all the available(installed) packages on my system? It looks like the command above only returned packages for which the pkg_info is corrupt. Hope to hear from you, Regards, AIjaz BAig. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"