This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 571845 - A bunch of changes for yum-langpacks
A bunch of changes for yum-langpacks
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum-langpacks (Show other bugs)
13
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-09 12:14 EST by James Antill
Modified: 2014-01-21 01:16 EST (History)
4 users (show)

See Also:
Fixed In Version: yum-langpacks-0.1.5-1.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-16 19:51:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description James Antill 2010-03-09 12:14:02 EST
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 02:48:50 EST
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 05:48:04 EST
Funny, I was just about to post the same backtrace...
Comment 3 seth vidal 2010-03-11 08:36:54 EST
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 10:10:59 EST
(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 10:39:47 EST
 Bah, that (line 90) should be:

    for pkg in yb.rpmdb.returnPackages(patterns=pkgmatches):
Comment 6 Peter Hjalmarsson 2010-03-11 11:00:01 EST
(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 07:38:51 EDT
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 15:45:28 EDT
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 06:37:20 EDT
Ok I will leave for now then with the current changes,
which should fix the breakage - thanks.
Comment 10 Jens Petersen 2010-04-07 06:52:26 EDT
yum-langpacks-0.1.5-1.fc13
http://koji.fedoraproject.org/koji/taskinfo?taskID=2099410
Comment 11 Fedora Update System 2010-04-07 07:02:16 EDT
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 16:54:25 EDT
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 06:05:27 EDT
(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 19:51:11 EDT
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.