LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackpkg Broken: 'gpg error' (http://www.linuxquestions.org/questions/slackware-14/slackpkg-broken-gpg-error-727868/)

skubik 05-22-2009 03:17 PM

Slackpkg Broken: 'gpg error'
 
I've been installing Slack 12.2 the last few days and so far everything has gone well. Until today.
I've been using slackpkg to apply updates to packages as well as install additional packages, usually from slackware-current.
Today I updated the glibc packages as well as a few others (what they were, I couldn't be 100% sure). slackpkg didn't seem to like this and start causing problems- specifically giving all kinds of 'gpg errors'. I then actually accidentally removed the glibc packages (which were upgraded to those in slackware-current) completely from the system. After about an hour or so of playing with it, reinstalling the glibc packages from Slack 12.2 as well as reinstalling a few other packages like findutils and pkgtools, everything seemed to be up and running again- except for slackpkg.

slackpkg continues to give me grief. Using 'slackpkg search' specifically almost ALWAYS returns "No package contains the selected pattern." If I look at my /var/lib/slackpkg/pkglist file, it only contains a handful (like 5) of packages that *are* part of slackware-current (which is what I have selected in /etc/slackpkg/mirrors), but some of which are NOT the actual packages installed on the system.
For example, pkglist has both pkgtools 12.34567890 and slackpkg 2.71.2 listed. But I only have pkgtools 12.1.0 and slackpkg 2.70.5 installed- as seen in pkgtool. I have completely removed and reinstalled (from the Slack 12.2 disc) slackpkg several times, each time making sure to remove any directories or files left behind (at /etc/slackpkg and /var/lib/slackpkg) after removing the package with removepkg.

I've tried setting mirrors to a 12.2 mirror and doing 'slackpkg update' there first and then changing it to slackware-current and doing slackpkg update again but to no avail. Somehow slackpkg seems to 'know' which packages were previously installed from slackware-current and only populates pkglist with those packages.

Again, when I try and do something like 'slackpkg search firefox', or even something that I know is already installed, like 'slackpkg search bash', I get: "No package contains the selected pattern."
If I try and search for one of the packages listed in the pkglist file, like 'slackpkg search slackpkg', it does return with: "[ upgrade ] - pkgtools-12.1.0-noarch-7 --> pkgtools-12.34567890-noarch-5"
But when I go to perform the upgrade with 'slackpkg upgrade pkgtools', I get something like this:

Code:

Looking for slackpkg in package list. Please wait... DONE

/usr/libexec/slackpkg/functions.d/dialog-functions.sh: line 16:  4746 Done                    cat $TMPDIR/dialog.tmp
      4747 Aborted                | xargs dialog --title $2 --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 70 13 2>$TMPDIR/dialog.out
        Package xargs: is already in cache - not downloading
md5sum: /var/cache/packages/xargs:: No such file or directory
        ERROR - Package not installed! gpg error!
        Package xargs.c:445: is already in cache - not downloading
md5sum: /var/cache/packages/xargs.c:445:: No such file or directory
        ERROR - Package not installed! gpg error!
        Package main: is already in cache - not downloading
md5sum: /var/cache/packages/main:: No such file or directory
        ERROR - Package not installed! gpg error!
        Package Assertion is already in cache - not downloading
md5sum: /var/cache/packages/Assertion: No such file or directory
        ERROR - Package not installed! gpg error!
        Package `bc_ctl.arg_max is already in cache - not downloading
md5sum: /var/cache/packages/`bc_ctl.arg_max: No such file or directory
        ERROR - Package not installed! gpg error!
        Package <= is already in cache - not downloading
md5sum: /var/cache/packages/<=: No such file or directory
        ERROR - Package not installed! gpg error!
        Package (131072-2048)' is already in cache - not downloading
md5sum: /var/cache/packages/(131072-2048)': No such file or directory
        ERROR - Package not installed! gpg error!
        Package failed. is already in cache - not downloading
md5sum: /var/cache/packages/failed.: No such file or directory
        ERROR - Package not installed! gpg error!

Searching for NEW configuration files
                No .new files found.


==============================================================================
WARNING!        WARNING!        WARNING!        WARNING!        WARNING!
==============================================================================
One or more errors occurred while slackpkg was running:

:      gpg
:      gpg
:      gpg
:      gpg
:      gpg
:      gpg
:      gpg
:      gpg

==============================================================================

I'm completely stumped. I've done everything I can think of but I'm obviously missing something.
Does anyone have any suggestions? I've contemplated formatting and start installing from scratch again (I'm not *that* far along yet) but would really rather not if it can be avoided.

Any help would be greatly appreciated!

- skubik

DidierSpaier 05-22-2009 03:43 PM

Rule of thumb: *do not* mix Slackware-12.2 and Slackware-current. Some -current packages will work with Slackware 12.2, others won't. And some packages you install from -current can make other packages from 12.2 unusable, so sooner or later you will mess up your system.

To (try to) go back to a clean Slackware 12.2 installation:
- make sure your slackpkg package is the one shipped with 12.2
- make sure the un-commented mirror in /etc/slackpkg/mirrors is for slackware-12.2
- run slackpkg update gpg then slackpkg update
- run slackpkg clean-system to remove all -current packages
- run slackpkg install-new to re install slackware-12.2 packages previously replaced by -current ones

To update to slackware-current from slackware 12.2 (credit Robby Workman on that):
1. Set your preferred slackware-current mirror by uncommenting the relevant line in /etc/slackpkg/mirrors.
2. Update package list: # slackpkg update
3. Install new packages: # slackpkg install-new
4. Upgrade all installed packages: # slackpkg upgrade-all
5. Run the above again (due to recent switch from TGZ to TXZ packages): # slackpkg upgrade-all
6. Remove unneeded packages: # slackpkg clean-system
7. Repeat steps 2, 3, 4 and 6 once or twice a week to ensure that you are always in sync with the "current" development.

And remember : once you run current, you won't be able to go back to 12.2, at least not easily.

If you have enough resource and want to play with -current whilst keeping -12.2 for production, install VirtualBox and run -current in a virtual machine.

skubik 05-22-2009 04:27 PM

Thanks for the quick response. Everything was going alright until I ran 'slackpkg clean-system'. I forgot to mention that I *did* do a clean-system earlier, which I suspect may have caused more damage than good.

Anyways, this is what I'm getting when I run clean-system:
Code:

Looking for packages to remove. Please wait... DONE

/usr/libexec/slackpkg/functions.d/dialog-functions.sh: line 16: 30972 Done                    cat $TMPDIR/dialog.tmp
    30973 Aborted                | xargs dialog --title $2 --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 70 13 2>$TMPDIR/dialog.out

Package: xargs:
        Removing...

ls: cannot access /var/log/packages/xargs:*: No such file or directory
No such package: /var/log/packages/xargs:. Can't remove.

Package: xargs.c:445:
        Removing...

ls: cannot access /var/log/packages/xargs.c:445:*: No such file or directory
No such package: /var/log/packages/xargs.c:445:. Can't remove.

Package: main:
        Removing...

ls: cannot access /var/log/packages/main:*: No such file or directory
No such package: /var/log/packages/main:. Can't remove.

Package: Assertion
        Removing...

ls: cannot access /var/log/packages/Assertion*: No such file or directory
No such package: /var/log/packages/Assertion. Can't remove.

Package: `bc_ctl.arg_max
        Removing...

ls: cannot access /var/log/packages/`bc_ctl.arg_max*: No such file or directory
No such package: /var/log/packages/`bc_ctl.arg_max. Can't remove.

Package: <=
        Removing...

ls: cannot access /var/log/packages/<=*: No such file or directory
No such package: /var/log/packages/<=. Can't remove.

Package: (131072-2048)'
        Removing...

ls: cannot access /var/log/packages/(131072-2048)'*: No such file or directory
No such package: /var/log/packages/(131072-2048)'. Can't remove.

Package: failed.
        Removing...

ls: cannot access /var/log/packages/failed.*: No such file or directory
No such package: /var/log/packages/failed.. Can't remove.

I've looked in /var/log/packages and, as expected, none of those files are listed. I wasn't doing a whole lot with slackware-current, literally just to install KDE 4.2 and update some of the accompanying libraries. I've heard the stories of people updating their ENTIRE distro to slackware-current and certainly don't want to go that route, but for the odd package here and there it doesn't seem too bad (maybe after this experience I might reconsider that position).

Any thoughts where to go from here? Or am I destined to reinstall from scratch?

Thanks,

- skubik

mRgOBLIN 05-22-2009 06:42 PM

Yeah as Didier said, you've hosed things by mixing stable with -current :(

Looks like xargs that's giving you the trouble with slackpkg. You can try setting DIALOG=off in your slackpkg.conf.

skubik 05-23-2009 04:23 PM

That's what I was afraid of. I've looked high and low for a way out of this mess but nothing seems to work.

I took the plunge and reinstalled everything from scratch. This time I'll make a backup after I install it so if it happens again it isn't such a chore.

I figured that even if I hacked at it enough to make it 'work' that there could still be something else broken 'behind the scenes' that might creep up on me later on. I wasn't very far along in installing Slack when I screwed it up so I figured reinstalling at this point and ensuring things work is a lot better than getting everything setup and having it blow up on me 6 months down the road.

Thanks for the input though. If anyone else has this same issue and finds a solution for it, feel free to append it here.

- skubik

rg3 05-23-2009 05:53 PM

You should write an article for DistroWatch.com to encourage people to mess their systems that way. :D

u-92 07-06-2009 01:00 AM

Sorry about the posting on an old thread but Ive been working on the same problem for a couple days. It was a pain to get fixed. Hear is the steps I used to fix the gpg error.
find you $/var/cache/packages/ and look for gnupg-1.4.9-i486-1
$removepkg gnupg-1.4.9-i486-1
then go to $/root/.gnupg/ and look for the gpg.conf
edit $nano gpg.conf
uncommit the lines
#no-greeting
#charset utf-8
save the file.
Then go to your slack repo and download a copy of gnupg2-2.0.9-i486-1
$installpkg gnupg2-2.0.9-i486-1
now you can run you $slackpkg update gpg
everything should go fine.
What i think happens and im not tottaly sure is that the gpg scripts have a lock on them. Once the lock it set for the settings and gpg It can not be changed.
Its what worked for me.

mRgOBLIN 07-06-2009 06:48 AM

Well assuming you were getting the same error as the OP then what is happening is an error from xargs

The error
Code:

xargs: xargs.c:445: main: Assertion `bc_ctl.arg_max <= (131072-2048)' failed.
This error is getting parsed by slackpkg and each part is treated as a package name as you can see in the errors posted.

The problem is usually caused by a glibc mismatch from mixing current packages with older versions.


All times are GMT -5. The time now is 12:42 PM.