[yum plugin], TransactionMember - ts_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greets,

Here is my plugin, just showing what's going on in a transaction :
-------------------------------------------------------------------
from yum.plugins import TYPE_CORE

requires_api_version = ' 2.1'
plugin_type = (TYPE_CORE,)

def pretrans_hook(conduit):
    conduit.info(2, 'Starting valorec plugin...')
    members= conduit.getTsInfo().getMembers()
    for member in members:
        print member
--------------------------------------------------------------------
 
The ts_state is always 'u' or 'e' wich means I think 'update' and 'erase' but transactioninfo.py tells me that there is also 'i' wich is I think 'install'
My problem is that I never get the 'i', always 'u' even when installing a new package.

Here is some tests output :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
yum update file

Loading "installonlyn" plugin
Loading "security" plugin
Loading "test" plugin
Setting up Update Process
Setting up repositories
Reading repository metadata in from local files
Skipping security plugin, no data
Resolving Dependencies
Skipping security plugin, no data
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for file to pack into transaction set.
file-4.17-9.0.1.el5.i386. 100% |=========================|  13 kB    00:00
---> Package file.i386 0:4.17-9.0.1.el5 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Updating:
 file                    i386       4.17-9.0.1.el5    rhel5-server      320 k

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       1 Package(s)
Remove       0 Package(s)

Total download size: 320 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): file-4.17-9.0.1.el 100% |=========================| 320 kB    00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Starting test plugin...
file.i386 0-4.17-9.0.1.el5 - u # 'u' for update, ok this is good
  Updating  : file                         ######################### [1/2]
  Cleanup   : file                         ######################### [2/2]

Updated: file.i386 0:4.17-9.0.1.el5
Complete!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
yum install mysql

Loading "installonlyn" plugin
Loading "security" plugin
Loading "test" plugin
Setting up Install Process
Setting up repositories
rhel5-server              100% |=========================| 1.4 kB    00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql.i386 0:5.0.22-2.1 set to be updated # Why is this set to be updated and not installed ??????
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 mysql                   i386       5.0.22-2.1       rhel5-server      3.0 M

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): mysql-5.0.22-2.1.i 100% |=========================| 3.0 MB    00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Starting test plugin...
mysql.i386 0-5.0.22-2.1 - u  # 'u' for update, not 'i' but I'm installing it, not updating
  Installing: mysql                        ######################### [1/1]

Installed: mysql.i386 0:5.0.22-2.1
Complete!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
yum remove mysql

Loading "installonlyn" plugin
Loading "security" plugin
Loading "test" plugin
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql.i386 0:5.0.22-2.1 set to be erased
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
 mysql                   i386       5.0.22-2.1       installed         5.5 M

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       1 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Starting test plugin...
mysql.i386 0-5.0.22-2.1 - e #OK This is good too
  Removing  : mysql                        ######################### [1/1]

Removed: mysql.i386 0:5.0.22-2.1
Complete!



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Regards,
FP

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux