DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default a strange package problem .. bash @name ..

Hi everyone !

Sorry to annoy you again with such newbie eccentricities ..

I did a pkg_delete /var/db/pkg/* before moving to an upgrade .. but to my surprise, a bash-related error prevented other packages from being removed .. the message I got was that bash @name exists but plist is empty .. I played with a few pkg_delete options but can't neither delete nor reinstall ........

so how can I force removal or solve the issue ?
Thank you for your help ! !


ps. I forgot to chsh -s ksh .. so I did the pkg_delete /var/db/pkg/* from bash .. could this be the source of the problem ?

Last edited by daemonfowl; 7th April 2012 at 05:59 PM. Reason: title mistake
Reply With Quote
  #2   (View Single Post)  
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

pkg_delete runs in perl, your operating shell should not effect it. However, if this was the root user, and not your personal userid, please be advised that you should always leave root's shell as one of the built-in shells, and never use a third party shell for that account.

We're not going to be able to help you with your failed pkg_delete without an actual problem report -- please refer to the "perfect newbie" thread we've sent you to some half a dozen times or so.

You did not need to delete your packages. # pkg_add -iu was all that was needed to upgrade any installed packages with newer signatures residing at your $PKG_PATH.

Last edited by jggimi; 7th April 2012 at 12:04 AM. Reason: clarity
Reply With Quote
  #3   (View Single Post)  
Old 7th April 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jggimi View Post
...please refer to the "perfect newbie" thread we've sent you to some half a dozen times or so.
Each one of us has sent you.
Reply With Quote
  #4   (View Single Post)  
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thank you .. yes , I'm fully aware to never use that for root .. I was runing sudo from bash .. is it the same as if being root on bash ? maybe I should rather adopt ksh an sh , and leave the rest ..
Quote:
You did not need to delete your packages. # pkg_add -iu was all that was needed to upgrade any installed packages with newer signatures residing at your $PKG_PATH.
that's sth new to learn .. so I don't have to remove all packages from /var/db/pkg before upgrading ..

I apologize for being somehow an imperfect newbie .. Report as soon as when I change to the affected disk .. as I am using an unproblematized spare disk ..
Reply With Quote
  #5   (View Single Post)  
Old 7th April 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by daemonfowl View Post
that's sth new to learn ..
daemonfowl, you're "sth"'ing again. Please stop it. Per the forum rules:
Quote:
Posters should be mindful that others reading their questions may be at different levels of fluency, so using regional phrases and jokes may not be understood by everyone. Abbreviations are discouraged.
Reply With Quote
  #6   (View Single Post)  
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
...is it the same as if being root on bash ?
No. Keeping root's shell built-in prevents any problems if you need to log on as root during a time when /usr/local/bin is unusable.

(Been there. Done that. Single-user mode required for recovery. Never did it again.)
Reply With Quote
  #7   (View Single Post)  
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Sorry Ocicat , 'sth' escaped me again .. the fossil defies the winds ..
The error goes :
Quote:
$ sudo pkg_delete bash
Fatal error: package bash-4.2.24 is missing a @name in plist
at /usr/libdata/perl5/OpenBSD/Delete.pm line 99
and whenever I install a package, it reads :
Quote:
No pkgname in packing-list for bash-4.2.24
No pkgname in packing-list for p5-Term-ReadLine-Gnu-1.16p2
No pkgname in packing-list for p5-Term-ReadLine-Perl-1.0302p0
Reply With Quote
  #8   (View Single Post)  
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The pkg_delete(8) man page could be helpful.

If there is a decision involved, this might help direct a solution:
Code:
     -i              Switch on interactive mode.  pkg_delete may ask questions
                     to the user if faced with difficult decisions.
If that fails, this should produce more detail about the problem:
Code:
     -v              Turn on verbose output.  Several -v turn on more verbose
                     output.  By default, pkg_delete is almost completely
                     silent, but it reacts to keyboard status requests (see
                     stty(1)).  -v turns on basic messages, -vv adds relevant
                     system operations, -vvv shows most internal computations
                     apart from individual file/directory additions, and
                     -vvvvv shows everything.
Reply With Quote
  #9   (View Single Post)  
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

thanks .. I tried with both switches , but it gave the same output.
Reply With Quote
Old 7th April 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by daemonfowl View Post
thanks .. I tried with both switches , but it gave the same output.
It is unclear from your answer as to whether you simply tried -v or used a multiple. -vvvvv will certainly enable more verbosity than a single -v.
Reply With Quote
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

even with those five .. same output :
Code:
$ sudo pkg_delete -vvvvv bash
Fatal error: package bash-4.2.24 is missing a @name in plist
 at /usr/libdata/perl5/OpenBSD/Delete.pm line 99
Reply With Quote
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

There is a packing list that should be stored in a file called "/var/db/pkg/bash-4.2.24/+CONTENTS" and it appears to be damaged.

The 4.2.24 release of bash was committed to the ports tree 16 March, and that is the last change made -- which means that you should be able to compare your +CONTENTS file with the +CONTENTS file in the package tarball, and make repairs.

NOTE: The +CONTENTS file has the special character "+" in the filename. You will need to either escape the character, or address the file in your shell with a directory. For the latter, if your working directory is /var/db/pkg/bash-4.2.24, you may refer to the file as ./+CONTENTS in shell commands.

Here is the +CONTENTS file from the i386 version of bash-4.2.24.tgz, taken from my nearby mirror's snapshot packages. If you unpack the .tgz yourself, you can easily compare the two files with diff(1).
Code:
@comment $OpenBSD: PLIST,v 1.15 2011/03/15 19:22:08 naddy Exp $
@name bash-4.2.24
@comment subdir=shells/bash cdrom=yes ftp=yes
@arch i386
+DESC
@sha ejt4yQi2gcBVBScUrLRGotL7xxUZqp9J0Q79+pBCPY4=
@size 505
@pkgpath shells/bash,static
@depend converters/libiconv:libiconv-*:libiconv-1.14
@depend devel/gettext:gettext->=0.10.38:gettext-0.18.1p1
@wantlib c.63.0
@wantlib iconv.6.0
@wantlib intl.6.0
@wantlib termcap.12.1
@cwd /usr/local
@shell bin/bash
@sha C7fBtkoEHaKxNDc+lyekyeLePA7KvQth92xM3c9gbjk=
@size 716800
bin/bashbug
@sha 9n6ERQDqMinL/urSoeMKj5VrIqQ2g+z7230MP4/OxmI=
@size 6848
@info info/bash.info
@sha TCT1ubGsdsPKYVI2tva9jncynwbXTkg+WyWs4MNcEfo=
@sha c/WOZG77vTDQUHnWCLA2UVN5AvjYpveZMdp0brCR/SA=
@size 45776
share/locale/en@boldquot/LC_MESSAGES/bash.mo
@sha 4LeiH7jGWIQNwg//4KZFK5ZkzK1aC67fJxQla+wDDDI=
@size 161163
share/locale/en@quot/LC_MESSAGES/bash.mo
@sha jgo6CNi/y/xAPvoqU64x4zTYpNJNxrOBLXDtr4/StSg=
@size 159611
share/locale/eo/LC_MESSAGES/bash.mo
@sha 4+/PKAm7slRNmJnXpSC4HrwHaUoVmCTd9g+bECwFb/Q=
@size 116790
share/locale/es/LC_MESSAGES/bash.mo
@sha AQ+CbPOVmyHROsVtuzE5J4VPqlxDRoa5waLDzPkEXhY=
@size 133409
share/locale/et/LC_MESSAGES/bash.mo
@sha 3ctsU8z04No9tRDE8Ng80Or550h7zJMkW52Bnw+dMEY=
@size 12257
share/locale/fi/LC_MESSAGES/bash.mo
@sha uvwsB0vBnq//1It0lm2E5yppOLKGpENcecaY1JVPBt0=
@size 120517
share/locale/fr/LC_MESSAGES/bash.mo
@sha EWVAxuZJG7kmAKm2I4AZxPF1fJSJAcMm/szQQEhBn2E=
@size 138545
share/locale/ga/LC_MESSAGES/bash.mo
@sha apSxJgu6Pjnbzpq3YN4qoIRnl+n/2aGy1sPhA7Lj9r4=
@size 62011
share/locale/hu/LC_MESSAGES/bash.mo
@sha SHp4/i19G7W+LiqWzBF2IM907vh3RsXwmqoI6HO4rF8=
@size 134317
share/locale/id/LC_MESSAGES/bash.mo
@sha SvtQSzR9H0VlyqRnEZ0e2gP2di8Vm7iN+Oi6b0to3x8=
@size 131500
share/locale/ja/LC_MESSAGES/bash.mo
@sha uAaHlGwVqiKSBRQO/Tgf2rqOpH2rpt8UpBvuV+gvDrw=
@size 145905
share/locale/lt/
share/locale/lt/LC_MESSAGES/
share/locale/lt/LC_MESSAGES/bash.mo
@sha dHRkqHMzBZhcrUyUct3R8wUDs/S7Ce+zG13nxenVCa4=
@size 30079
share/locale/nl/LC_MESSAGES/bash.mo
@sha owb2Nb1pW01+7pGeni1+vMUhtjGp+YgrHKn8b6SXXiM=
@size 131870
share/locale/pl/LC_MESSAGES/bash.mo
@sha 5rSGNacOWnInHdTusH81NAY9bOPUqeKAxG9BgWIMl88=
@size 24983
share/locale/pt_BR/LC_MESSAGES/bash.mo
@sha m+lNBqSlKuDl703nQHn/GyEEGy041Y/pNABiXSZo2SQ=
@size 9658
share/locale/ro/LC_MESSAGES/bash.mo
@sha JB14YSiFFwZm4hWc62nb0bv7IbRVKLWv4bCsUZPK7Bc=
@size 9415
share/locale/ru/LC_MESSAGES/bash.mo
@sha fYP8V68u/PSbvf/UPSkQqfeTkMCRKWTjFSa1mTmD/7o=
@size 9142
share/locale/sk/LC_MESSAGES/bash.mo
@sha ITEBOeHkW6I1pqIkUAcqUU2cjineIAkjUvbhIKsxL1E=
@size 132621
share/locale/sv/LC_MESSAGES/bash.mo
@sha HVjDA/yIPio50EedkvC9aMLv12xlU10+JJdehptifqo=
@size 128852
share/locale/tr/LC_MESSAGES/bash.mo
@sha XMCna1KELcT9MyK8B7bdQxcSynbeULArDfV/PdQm0SM=
@size 24589
share/locale/uk/LC_MESSAGES/bash.mo
@sha flVGcbgG/QdBarb5xeoWSBMHC7kEkgdgC6wLLmP/ACo=
@size 138956
share/locale/vi/LC_MESSAGES/bash.mo
@sha BokNw1t6gXURkTNw8R//ajiOLOiMprByqnvGbdClT2k=
@size 142862
share/locale/zh_CN/LC_MESSAGES/bash.mo
@sha bzZL+0S7qm5vDo76eGSkcNNVWbxjr1MH39n9YjPABBU=
@size 123267
share/locale/zh_TW/LC_MESSAGES/bash.mo
@sha dcmwPSK4wbVV/PPFFFuacB/tyndXZ7Wo+hzfbtgOJLM=
@size 5993

Last edited by jggimi; 7th April 2012 at 01:25 PM. Reason: typos, clarity
Reply With Quote
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thanks jgimmi !
Code:
 diff -l ./+CONTENTS /var/db/pkg/bash-4.2.24/./+CONTENTS  


Apr  8 02:30 2012 diff -l ./+CONTENTS /var/db/pkg/bash-4.2.24/./+CONTENTS Page 1


2a3,4
> @url ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/bash-4.2.24.tgz
> @option manual-installation
Reply With Quote
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I find unified diffs (-u) easier to read and understand.. They are also what the Project uses for is patches.

Did the repaired or replaced file solve your problem?
Reply With Quote
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

sorry it didn't help solve the problem .. I just was passionate when I read your post and felt it would be the way out .. is it thinkable to just replace the +CONTENTS ?
Reply With Quote
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It is my belief that you may have a damaged package database (/var/db/pkg/*) beyond this one file. I say this because if I've understood what you've posted, after running diff to compare the files you edited the file in the database and the problem still remained. If that is so, replacing the file would not work unless you edited the file incorrectly.

As you have a second system that is also showing packing list issues, there may be something you are doing procedurally that is damaging the package databases (/var/db/pkg/*) on your systems. This is just conjecture, and if it were true I do not know what you might be doing to cause it.

Last edited by jggimi; 7th April 2012 at 09:40 PM. Reason: typo, clarity
Reply With Quote
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

That troubled system was not upgraded weeks ago .. unfortunatey it is the big disk (500g disk) & almost full .. is there a way to avoid a fresh install , I mean cleaning the mess before I can embark on a fresh upgrade ?
foolish maybe .. if I leave everything as is now , and just go for the upgrade .... ? will afterwards the newer packages overwrite the older ? so bash won't be an issue anymore ?
I remember something : I had to build a few ports (and so mixing them with packages ) .. and then , I had removed recursively /usr/ports before I did pkg_delete /var/db/pkg/* ..
could this be the root of the problem?
Reply With Quote
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by daemonfowl View Post
.. is there a way to avoid a fresh install , I mean cleaning the mess before I can embark on a fresh upgrade ?
Only if the root cause can be uncovered and corrected.
Quote:
foolish maybe .. if I leave everything as is now , and just go for the upgrade .... ? will afterwards the newer packages overwrite the older ? so bash won't be an issue anymore ?
A package update does a simultaneous delete and install, since delete fails this will not solve your problem.
Quote:
I remember something : I had to build a few ports (and so mixing them with packages ) .. and then , I had removed recursively /usr/ports before I did pkg_delete /var/db/pkg/* ..
could this be the root of the problem?
I don't think so. The ports framework does not touch the package database except through the make targets that issue pkg_add or pkg_delete.

Last edited by jggimi; 7th April 2012 at 10:28 PM. Reason: upgrade -> update
Reply With Quote
Old 7th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

How to delete a package manually, when pkg_delete fails to do so:
  1. Does pkg_info -L <package> work? If not, you will have to look through the +CONTENTS file line by line for the names of individual files to delete
  2. Delete the individual files.
  3. Review the +CONTENTS file for manual deletions/changes you will have to make. You must manually delete files or make edits in /etc and /var.
  4. Delete the /var/db/pkg/<package> structure.
For bash, you will need to edit /etc/shells, at the very least.



---


Will this solve the problem? Maybe. You may do more damage, if you make an error, and you will not have discovered and eliminated the root cause ... so this same problem could happen again. (And may have already happened on another of your systems, based on your other packing list error thread.)
Reply With Quote
Old 7th April 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Quote:
Does pkg_info -L <package> work?
yes it does , eg:
Code:
/home/bifrost $ pkg_info -L bash
Information for inst:bash-4.2.24

Files:
/usr/local/bin/bash
/usr/local/bin/bashbug
/usr/local/info/bash.info
/usr/local/man/cat1/bash.0
/usr/local/man/cat1/bashbug.0
/usr/local/share/locale/af/LC_MESSAGES/bash.mo
/usr/local/share/locale/bg/LC_MESSAGES/bash.mo
/usr/local/share/locale/ca/LC_MESSAGES/bash.mo
/usr/local/share/locale/cs/LC_MESSAGES/bash.mo
/usr/local/share/locale/de/LC_MESSAGES/bash.mo
/usr/local/share/locale/en@boldquot/LC_MESSAGES/bash.mo
/usr/local/share/locale/en@quot/LC_MESSAGES/bash.mo
/usr/local/share/locale/eo/LC_MESSAGES/bash.mo
/usr/local/share/locale/es/LC_MESSAGES/bash.mo
/usr/local/share/locale/et/LC_MESSAGES/bash.mo
/usr/local/share/locale/fi/LC_MESSAGES/bash.mo
/usr/local/share/locale/fr/LC_MESSAGES/bash.mo
/usr/local/share/locale/ga/LC_MESSAGES/bash.mo
/usr/local/share/locale/hu/LC_MESSAGES/bash.mo
/usr/local/share/locale/id/LC_MESSAGES/bash.mo
/usr/local/share/locale/ja/LC_MESSAGES/bash.mo
/usr/local/share/locale/lt/LC_MESSAGES/bash.mo
/usr/local/share/locale/nl/LC_MESSAGES/bash.mo
/usr/local/share/locale/pl/LC_MESSAGES/bash.mo
/usr/local/share/locale/pt_BR/LC_MESSAGES/bash.mo
/usr/local/share/locale/ro/LC_MESSAGES/bash.mo
/usr/local/share/locale/ru/LC_MESSAGES/bash.mo
/usr/local/share/locale/sk/LC_MESSAGES/bash.mo
/usr/local/share/locale/sv/LC_MESSAGES/bash.mo
/usr/local/share/locale/tr/LC_MESSAGES/bash.mo
/usr/local/share/locale/uk/LC_MESSAGES/bash.mo
/usr/local/share/locale/vi/LC_MESSAGES/bash.mo
/usr/local/share/locale/zh_CN/LC_MESSAGES/bash.mo
/usr/local/share/locale/zh_TW/LC_MESSAGES/bash.mo
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash and pfctl = problem marbi OpenBSD General 2 14th November 2010 05:41 AM
Strange lib problem mururoa FreeBSD General 3 1st August 2009 07:34 AM
Strange network problem mururoa FreeBSD General 15 5th November 2008 08:25 AM
Strange Eterm-problem PatrickBaer FreeBSD General 5 22nd July 2008 07:54 AM
NFS and FreeBSD 6.2r strange problem .. bsduser FreeBSD Installation and Upgrading 3 11th July 2008 11:48 AM


All times are GMT. The time now is 08:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick