Bug 571845 - A bunch of changes for yum-langpacks
Summary: A bunch of changes for yum-langpacks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-langpacks
Version: 13
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-09 17:14 UTC by James Antill
Modified: 2014-01-21 06:16 UTC (History)
4 users (show)

Fixed In Version: yum-langpacks-0.1.5-1.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-16 23:51:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
diff for a bunch of changes to langpacks (3.03 KB, patch)
2010-03-09 17:14 UTC, James Antill
no flags Details | Diff

Description James Antill 2010-03-09 17:14:02 UTC
Created attachment 398855 [details]
diff for a bunch of changes to langpacks

Description of problem:
 This patch does:

1. Moves print's => yum logger uses.

2. Moves tsinfo ops. to real install/remove ops. This means deps. will be solved, among other things.

3. Handles erase properly.

4. Doesn't force upgrade langpacks on upgrades/downgrades/etc.

5. Doesn't try to install multiple versions of langpacks.

6. Move from d.has_key(v) to "v in d", as py3 removes the former.

...completely untested both before and after changes.

Version-Release number of selected component (if applicable):

% make verrel
yum-langpacks-0.1.4-2.fc13

Comment 1 Peter Hjalmarsson 2010-03-11 07:48:50 UTC
I applied this patch (applied cleanly), and when I ran "yum upgrade" after the dependencies was calculated, I got the following:

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 150, in main
    (result, resultmsgs) = base.buildTransaction() 
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 875, in buildTransaction
    self.plugins.run('postresolve', rescode=rescode, restring=restring)
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 177, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/langpacks.py", line 98, in postresolve_hook
    add_deps_to_ts(conduit, po)
  File "/usr/lib/yum-plugins/langpacks.py", line 77, in add_deps_to_ts
    if yb.tsinfo.matchNaevr(name=pkg.name):
AttributeError: 'YumBaseCli' object has no attribute 'tsinfo'

Comment 2 Jens Petersen 2010-03-11 10:48:04 UTC
Funny, I was just about to post the same backtrace...

Comment 3 seth vidal 2010-03-11 13:36:54 UTC
In that line:

    if yb.tsinfo.matchNaevr(name=pkg.name):

change it to be
  
    if yb.tsInfo.matchNaevr(name=pkg.name):


and try it again, please

Comment 4 Peter Hjalmarsson 2010-03-11 15:10:59 UTC
(In reply to comment #3)
> In that line:
> 
>     if yb.tsinfo.matchNaevr(name=pkg.name):
> 
> change it to be
> 
>     if yb.tsInfo.matchNaevr(name=pkg.name):
> 
> 
> and try it again, please    

Now it looks like this:

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 150, in main
    (result, resultmsgs) = base.buildTransaction() 
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 875, in buildTransaction
    self.plugins.run('postresolve', rescode=rescode, restring=restring)
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 177, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/langpacks.py", line 100, in postresolve_hook
    remove_deps_from_ts(conduit, po)
  File "/usr/lib/yum-plugins/langpacks.py", line 90, in remove_deps_from_ts
    for pkg in yb.rpmdb.returnPackages(patterns=[pkgmatches]):
  File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 432, in returnPackages
    pkgobjlist = parsePackages(pkgobjlist, patterns, not ignore_case)
  File "/usr/lib/python2.6/site-packages/yum/packages.py", line 115, in parsePackages
    if command in pkgdict:
TypeError: unhashable type: 'list'

Comment 5 James Antill 2010-03-11 15:39:47 UTC
 Bah, that (line 90) should be:

    for pkg in yb.rpmdb.returnPackages(patterns=pkgmatches):

Comment 6 Peter Hjalmarsson 2010-03-11 16:00:01 UTC
(In reply to comment #5)
>  Bah, that (line 90) should be:
> 
>     for pkg in yb.rpmdb.returnPackages(patterns=pkgmatches):    

Now it passes the dependency checks. Currently waiting for yum to download all updates so I can check if it also installs.

Comment 7 Jens Petersen 2010-03-24 11:38:51 UTC
Thanks, Guys

Do we even need remove_deps_from_ts ?
I guess normally langpacks would get removed
anyway when their dependent packages are.

When I do an upgrade in current Live, yum shows

=================================================================================================
 Package                         Arch   Version                            Repository       Size
=================================================================================================
Updating:
:
 openoffice.org-core             i686   1:3.2.0-12.13.fc13                 updates-testing  80 M
 openoffice.org-draw             i686   1:3.2.0-12.13.fc13                 updates-testing 144 k
 openoffice.org-draw-core        i686   1:3.2.0-12.13.fc13                 updates-testing 783 k
 openoffice.org-graphicfilter    i686   1:3.2.0-12.13.fc13                 updates-testing 312 k
 openoffice.org-impress          i686   1:3.2.0-12.13.fc13                 updates-testing 146 k
 openoffice.org-impress-core     i686   1:3.2.0-12.13.fc13                 updates-testing 1.1 M
 openoffice.org-langpack-en      i686   1:3.2.0-12.13.fc13                 updates-testing 130 k
 openoffice.org-math             i686   1:3.2.0-12.13.fc13                 updates-testing 138 k
 openoffice.org-math-core        i686   1:3.2.0-12.13.fc13                 updates-testing 1.1 M
 openoffice.org-opensymbol-fonts noarch 1:3.2.0-12.13.fc13                 updates-testing 204 k
 openoffice.org-pdfimport        i686   1:3.2.0-12.13.fc13                 updates-testing 475 k
 openoffice.org-presenter-screen i686   1:3.2.0-12.13.fc13                 updates-testing 495 k
 openoffice.org-ure              i686   1:3.2.0-12.13.fc13                 updates-testing 2.5 M
 openoffice.org-writer           i686   1:3.2.0-12.13.fc13                 updates-testing 147 k
 openoffice.org-writer-core      i686   1:3.2.0-12.13.fc13                 updates-testing 5.0 M
 openoffice.org-xsltfilter       i686   1:3.2.0-12.13.fc13                 updates-testing 338 k
:
Removing:
 openoffice.org-langpack-en      i686   1:3.2.0-12.11.fc13                 @released/$releasever

which looks wrong.

Comment 8 James Antill 2010-03-24 19:45:28 UTC
My guess is it should still do it, but should skip anything that matches yb.tsInfo.MatchNaevr() or something.

Comment 9 Jens Petersen 2010-04-07 10:37:20 UTC
Ok I will leave for now then with the current changes,
which should fix the breakage - thanks.

Comment 10 Jens Petersen 2010-04-07 10:52:26 UTC
yum-langpacks-0.1.5-1.fc13
http://koji.fedoraproject.org/koji/taskinfo?taskID=2099410

Comment 11 Fedora Update System 2010-04-07 11:02:16 UTC
yum-langpacks-0.1.5-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/yum-langpacks-0.1.5-1.fc13

Comment 12 Fedora Update System 2010-04-07 20:54:25 UTC
yum-langpacks-0.1.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-langpacks'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yum-langpacks-0.1.5-1.fc13

Comment 13 Jens Petersen 2010-04-08 10:05:27 UTC
(In reply to comment #8)
> My guess is it should still do it, but should skip anything that matches
> yb.tsInfo.MatchNaevr() or something.    

Dunno if it is related but seems there are still problems:
see https://bugzilla.redhat.com/show_bug.cgi?id=569352#c29 .

Comment 14 Fedora Update System 2010-04-16 23:51:11 UTC
yum-langpacks-0.1.5-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.