Archive

Posts Tagged ‘yum’

yum history

October 26th, 2009 timlau No comments

yum in Fedora 12 Beta contain a new cool history feature that make it posible to
see what happed in part transaction and redo/undo past transaction.

Example 1: Showing the past transaction


# yum history
Loaded plugins: presto, refresh-packagekit
ID     | Login user             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    17 | Tim Lauridsen     | 2009-10-26 15:43 | Erase          |    1
    16 | Tim Lauridsen     | 2009-10-26 15:30 | Install        |    1
    15 | Tim Lauridsen     | 2009-10-26 15:27 | Install        |    3
    14 | Tim Lauridsen     | 2009-10-26 15:25 | Erase          |    1
    13 | Tim Lauridsen     | 2009-10-26 15:09 | Install        |    1
    12 | Tim Lauridsen     | 2009-10-26 13:17 | Install        |    6
    11 | Tim Lauridsen     | 2009-10-26 13:13 | I, U           |   28
    10 | Tim Lauridsen     | 2009-10-24 18:50 | Install        |  122
     9 | Tim Lauridsen     | 2009-10-24 18:40 | Update         |   11
     8 | Tim Lauridsen     | 2009-10-23 19:39 | Install        |    2
     7 | Tim Lauridsen     | 2009-10-23 19:30 | Install        |   26
     6 | Tim Lauridsen     | 2009-10-23 18:51 | Install        |    1  <
     5 | Tim Lauridsen     | 2009-10-23 18:49 | Install        |   42 ><
     4 | Tim Lauridsen     | 2009-10-23 18:46 | Install        |    5 >
     3 | Tim Lauridsen     | 2009-10-23 18:34 | I, U           |  189
     2 | Tim Lauridsen     | 2009-10-23 18:14 | Install        |    3
     1 | System          | 2009-10-23 16:35 | Install        | 1136

Example 2: Showing transaction containing the yumex package

# yum history list yumex
Loaded plugins: presto, refresh-packagekit
ID     | Login user             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     2 | Tim Lauridsen     | 2009-10-23 18:14 | Install        |    3

Example 3: Show details about a transaction id.

# yum history info 2
Loaded plugins: presto, refresh-packagekit
Transaction ID : 2
Begin time     : Fri Oct 23 18:14:05 2009
Begin rpmdb    : 1136:908205640b70e31c5b163c091392b42ba71352d5
End time       :            18:14:11 2009 (6 seconds)
End rpmdb      : 1139:711687a3c9f18d3899a1dc5a6285cc4bed4cc037
User           : Tim Lauridsen 
Return-Code    : Success
Transaction performed with:
    Installed    rpm-4.7.1-6.fc12.i686
    Updated      yum-3.2.24-9.fc12.noarch
    Installed    yum-metadata-parser-1.1.2-14.fc12.i686
Packages Altered:
    Install      pexpect-2.3-4.fc12.noarch
    Install      python-enum-0.4.3-6.fc12.noarch
    Install      yumex-2.9.3-1.fc12.noarch

Example 4: Redo a transaction

# yum history info 16
Loaded plugins: presto, refresh-packagekit
Transaction ID : 16
Begin time     : Mon Oct 26 15:30:03 2009
Begin rpmdb    : 1355:1bc4615c42e3a0e781915a708df4880b262d60b5
End time       :            15:30:06 2009 (3 seconds)
End rpmdb      : 1356:d21998bce69db64bb12a14c3abe84e182fd4a19b
User           : Tim Lauridsen 
Return-Code    : Success
Transaction performed with:
    Installed    rpm-4.7.1-6.fc12.i686
    Installed    yum-3.2.25-1.fc12.noarch
    Installed    yum-metadata-parser-1.1.2-14.fc12.i686
    Installed    yumex-2.9.3-1.fc12.noarch
Packages Altered:
    Install      0xFFFF-0.3.9-4.fc12.i686

# yum history redo 16
Loaded plugins: presto, refresh-packagekit
Repeating transaction 16, from Mon Oct 26 15:30:03 2009
    Install      0xFFFF-0.3.9-4.fc12.i686
Resolving Dependencies
--> Running transaction check
---> Package 0xFFFF.i686 0:0.3.9-4.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch           Version                Repository         Size
================================================================================
Installing:
 0xFFFF           i686           0.3.9-4.fc12           rawhide            40 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 40 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 40 k
0xFFFF-0.3.9-4.fc12.i686.rpm                             |  40 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : 0xFFFF-0.3.9-4.fc12.i686                                 1/1 

Installed:
  0xFFFF.i686 0:0.3.9-4.fc12                                                    

Complete!

Example 5: Undo a transaction

# yum history undo 16
Loaded plugins: presto, refresh-packagekit
Undoing transaction 16, from Mon Oct 26 15:30:03 2009
    Install      0xFFFF-0.3.9-4.fc12.i686
Resolving Dependencies
--> Running transaction check
---> Package 0xFFFF.i686 0:0.3.9-4.fc12 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch          Version                 Repository          Size
================================================================================
Removing:
 0xFFFF          i686          0.3.9-4.fc12            installed          100 k

Transaction Summary
================================================================================
Remove        1 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : 0xFFFF-0.3.9-4.fc12.i686                                 1/1 

Removed:
  0xFFFF.i686 0:0.3.9-4.fc12                                                    

Complete!
Categories: Fedora, Linux Tags: ,

Yum in Linux Magazine

May 1st, 2009 timlau No comments

Article about Yum in Linux Magazine
http://www.linux-magazine.com/issues/2009/103/delicious

Some of it is a little outdated, but still nice :)

Categories: Fedora, Linux, Uncategorized Tags: ,

yum –skip-broken

November 15th, 2008 timlau 5 comments

I have be working on beating the skip broken functionallty in yum in better shape. The was a lot cases were it has to give up. One of the big problems debugging the code is that,  repo inconsistencies where skip broken is useful, don’t last long and can be hard to reproduce and retest.  So i had been working to make some unit tests in yum,  to reproduce the found issues and make the debug output from skip broken a lot better, so it is easier to see what goes wrong.

The current yum in rawhide (3.2.20) is in very good shape and the upstream 3_2_x branch is even better.

If you run into some situation where ‘–skip-broken’ bails out, then please checkout

http://yum.baseurl.org/wiki/SkipBroken

Categories: Fedora Tags: , ,

Yum Tips & Trick

April 1st, 2008 timlau 3 comments

Mohd Izhar Firdaus Ismai is have some comments to your post about yum & Friends.

Yum is not slower than Apt, yum does dynamic load of metadata, apt dont, it only refreshes the cache when the user tell it to, so you are comparing apple and oranges.

As the main yumex developer i don’t like statements like ‘Avoid using yumex’ because it might have behaved badly. If you detect any problems the collect documentation and make bugzilla reports, so if there is any problem they cant be solved. This is the way Open Source software evolves.  Behind the scene yumex, pirut, PackageKit (yum backend) and yum-cli all works by using the powerful Yum API to do the real action, so the difference is in the UI and to the level of feature and option each tool give to the user.

it is right you can install both apt & smart in Fedora, but there is some differences,  yum has put safety in a high place, so if there is a problem in the repo of some kind, yum will bail out with an error to not leave the users systems in a broken state, but some of the other package manager have options to try to fixes the issues and it can give strange/dangerous results.

Remember don’t blame the postman for delivering a bad message.

Categories: Fedora, Linux Tags: , ,

Yum speaks native languages

February 8th, 2008 timlau 11 comments

Yum now speaks native languages.

Localization has been on the Yum todo list for a long, so for i couple of weeks ago i started to make it happen.
Added the pieces of code and makefile magic to build the yum.pot and LANG.po files and adding a lot of _() translations wrappers around the strings to be translated in the yum source. (386 different messages at the moment)

Here is the result, Yum speak danish (Not eating danish, SPEAKING DANISH)

yum-dk.png

I also speak Norwegian by the way.
Now you ask yourself, how do i make yum speak my locale language.
Just go here and pick up yum.pot, rename it to LANG.po and start translating the strings using gtranslator,Kbabel or another translation editor.

http://translate.fedoraproject.org/module/yum#master

When you have done the translation, then make a bugzilla report against yum in the Redhat Bugzilla

Coding is fun

January 10th, 2008 timlau No comments

I can be fun to make test cases.

I am creating test cases for the new skip-broken functionality in yum.

Here is an example:


testcase.png
Consol debug output:
Checking deps for GutlessGibbon.noarch 0-1-0 – u
looking for (‘money’, None, (None, None, None)) as a requirement of GutlessGibbon.noarch 0-1-0 – u
looking for (‘nice’, None, (None, None, None)) as a requirement of GutlessGibbon.noarch 0-1-0 – u
looking for (‘features’, None, (None, None, None)) as a requirement of GutlessGibbon.noarch 0-1-0 – u
GutlessGibbon requires: money
Searching pkgSack for dep: money
skipping reposetup, pkgsack exists
Potential match for money from Spaceman – 1-0.noarch
Matched Spaceman – 1-0.noarch to require for money
Building updates object
skipping reposetup, pkgsack exists
skipping reposetup, pkgsack exists
skipping reposetup, pkgsack exists
TSINFO: Marking Spaceman – 1-0.noarch as install for GutlessGibbon
GutlessGibbon requires: nice
Searching pkgSack for dep: nice
skipping reposetup, pkgsack exists
GutlessGibbon requires: features
Searching pkgSack for dep: features
skipping reposetup, pkgsack exists
Checking deps for Spaceman.noarch 0-1-0 – u
Checking deps for GutlessGibbon.noarch 0-1-0 – u
looking for (‘money’, None, (None, None, None)) as a requirement of GutlessGibbon.noarch 0-1-0 – u
looking for (‘nice’, None, (None, None, None)) as a requirement of GutlessGibbon.noarch 0-1-0 – u
looking for (‘features’, None, (None, None, None)) as a requirement of GutlessGibbon.noarch 0-1-0 – u
GutlessGibbon requires: nice
Searching pkgSack for dep: nice
skipping reposetup, pkgsack exists
GutlessGibbon requires: features
Searching pkgSack for dep: features
skipping reposetup, pkgsack exists
Dependency Process ending
GutlessGibbon – 1-0.noarch from TestRepository has depsolving problems
skipping GutlessGibbon – 1-0.noarch from TestRepository because of depsolving problems
skipping reposetup, pkgsack exists
Checking deps for Spaceman.noarch 0-1-0 – u
Dependency Process ending
Skip-broken took 1 rounds

Categories: Fedora, Linux Tags: , ,

Better skip-broken support in yum

December 14th, 2007 timlau 4 comments

For a while i have been working on making better support for yum to handle packages with dependency problems. The current skip-broken plugin has a lot of problems, so i have worked on building the the skip-broken support into yum, without needing a special plugin.

The first step was to make the yum depsolver collect the packages causing problems while it was depsolving.

The second step was to find a good way to skip the packages causing problems and all the deps they have pull in to the yum transaction.

In the latest couple of months there have been some very nice progress in adding a test suite to yum, so there is a good infrastructure for building test cases for the yum code, this is very important in testing the skip-broken functionality, because it is a good way to simulate all kind of dependency problems and to test if code changes is breaking something.

The new skip-broken code is now checked into the yum git HEAD and will be available in yum 3.2.9.

If you want to test it, you can check out the yum git HEAD and check it out.


git clone http://linux.duke.edu/yum/git/yum.git
cd yum
sudo ./yummain.py --skip-broken some-yum-action

The code conflict with then yum-skip-broken plugin, so it have to be removed if you want to test tje new code

Fedora Rawhide is a nice place to test it, there have been a lot of packages with dep problems lately.

Categories: Misc Tags: , , , ,