[Megoldva] Csomag sikertelen leszedése

Sziasztok!

Az a problémám, hogy a preuninstall script-je beteg az egyik csomagnak, így aztán nem tudom leszedni. Ilyenkor mi a teendő?
[root@gépem ~]# package-cleanup --dupes
Loaded plugins: presto, refresh-packagekit, rpm-warm-cache
vala-0.16.0-4.fc17.x86_64
vala-0.16.1-1.fc17.x86_64
[root@gépem ~]# yum erase vala-0.16.0-4.fc17.x86_64
Loaded plugins: langpacks, presto, refresh-packagekit, rpm-warm-cache
Resolving Dependencies
--> Running transaction check
---> Package vala.x86_64 0:0.16.0-4.fc17 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package       Arch            Version                  Repository         Size
================================================================================
Removing:
 vala          x86_64          0.16.0-4.fc17            @updates          8.2 M

Transaction Summary
================================================================================
Remove  1 Package

Installed size: 8.2 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREUN scriptlet in rpm package vala-0.16.0-4.fc17.x86_64
  Verifying  : vala-0.16.0-4.fc17.x86_64                                    1/1 

Failed:
  vala.x86_64 0:0.16.0-4.fc17                                                   

Complete!
[root@gépem ~]# rpm -e vala-0.16.0-4.fc17.x86_64
/usr/share/man/man1/valac-0.16.1.gz has not been configured as an alternative for valac.1.gz
error: %preun(vala-0.16.0-4.fc17.x86_64) scriptlet failed, exit status 2
error: vala-0.16.0-4.fc17.x86_64: erase failed
[root@gépem ~]# rpm -e --force vala-0.16.0-4.fc17.x86_64
rpm: only installation and upgrading may be forced

Hozzászólások

> vala-0.16.0-4.fc17.x86_64
> vala-0.16.1-1.fc17.x86_64

Hogyan lehet egyszerre két változat a gépeden?


/usr/share/man/man1/valac-0.16.1.gz has not been configured as an alternative for valac.1.gz

A fenti hibaüzenet-részlet - érzésem szerint - éppen emiatt jelenik meg.

Ennek nagyon egyszerű oka van. Mivel a 0.16.0-4-es scriptje hibás, update alkalmával feltette a frissebbet, ám az öreg csomagot már nem tudta eltávolítani. Szóval lényegében tudom, mi a hiba, csak azt nem, mit tehetnék. Számomra az az aggályos, hogy egy hibás csomag felfordulást tud okozni. Szerintem az rpm-nek a csomag tartalmától függetlenül kellene olyan eszközének lenni, amellyel le lehet szedni a csomagot, még ha az hibás is.

tr '[:lower:]' '[:upper:]' <<<locsemege
LOCSEMEGE

Ezt próbáltad már?
rpm -e --nopreun vala-0.16.0-4.fc17.x86_64

Némi segítség az rpm kézikönyvéből:


       --noscripts

       --nopre

       --nopost

       --nopreun

       --nopostun
              Don't execute the scriptlet of the same name.  The --noscripts option is equivalent to

              --nopre --nopost --nopreun --nopostun

              and turns off the execution of the corresponding %pre, %post, %preun, and  %postun  script‐
              let(s).

       --notriggers

       --notriggerin

       --notriggerun

       --notriggerprein

       --notriggerpostun
              Don't  execute any trigger scriptlet of the named type.  The --notriggers option is equiva‐
              lent to

              --notriggerprein --notriggerin --notriggerun --notriggerpostun

              and turns off execution of the corresponding  %triggerprein,  %triggerin,  %triggerun,  and
              %triggerpostun scriptlet(s).

Azt hiszem hogy valamelyikkel sikerül ráncba szedned a dolgokat.

Csak a kesobbi guglizok kedveert, egy masik, ugyanezt eredmenyezo megoldas /gyanitom, hogy a fentit hivja meg/. Elonye, hogy a yum ellenorzesein keresztul tortenik, a dependency-k lekezelesevel /ez egyben a hatranya is sokszor/:

package-cleanup :
Duplicate Package Options:
--dupes Scan for duplicates in your rpmdb
--cleandupes Scan for duplicates in your rpmdb and remove older
--noscripts disable rpm scriptlets from running when cleaning
duplicates

azaz:

package-cleanup --cleandupes --noscripts