Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1672836 - Command is broken
Summary: Command is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: json_diff
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matěj Cepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-06 01:48 UTC by Elliott Sales de Andrade
Modified: 2019-08-15 18:51 UTC (History)
2 users (show)

Fixed In Version: json_diff-1.4.1-5.fc30 json_diff-1.4.1-4.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-15 18:09:35 UTC
Type: Bug


Attachments (Terms of Use)
WIP patch to update the script (10.11 KB, patch)
2019-02-07 16:15 UTC, Matěj Cepl
no flags Details | Diff

Description Elliott Sales de Andrade 2019-02-06 01:48:01 UTC
Description of problem:
The command does not work:

$ json_diff 
Traceback (most recent call last):
  File "/usr/bin/json_diff", line 11, in <module>
    load_entry_point('json-diff==1.4.1', 'console_scripts', 'json_diff')()
TypeError: main() takes exactly 1 argument (0 given)


Version-Release number of selected component (if applicable):
json_diff-1.4.1-1.fc29.noarch

Comment 1 Matěj Cepl 2019-02-06 22:58:15 UTC
Is it just that it needs rebuild? If you use RPM from https://koji.fedoraproject.org/koji/taskinfo?taskID=32589305 does it work?

Comment 2 Elliott Sales de Andrade 2019-02-07 01:18:47 UTC
Nope, doesn't work:

$ mock -r fedora-29-x86_64 --install ./json_diff-1.4.1-1.fc29.noarch.rpm 
INFO: mock.py version 1.4.13 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.13
INFO: Mock Version: 1.4.13
Finish: chroot init
INFO: installing package(s): ./json_diff-1.4.1-1.fc29.noarch.rpm
fedora                                                                                                                 11 kB/s |  17 kB     00:01    
updates                                                                                                                11 kB/s |  16 kB     00:01    
Dependencies resolved.
======================================================================================================================================================
 Package                                Arch                         Version                                 Repository                          Size
======================================================================================================================================================
Installing:
 json_diff                              noarch                       1.4.1-1.fc29                            @commandline                        19 k
Installing dependencies:
 compat-openssl10                       x86_64                       1:1.0.2o-3.fc29                         fedora                             1.1 M
 gdbm                                   x86_64                       1:1.18-1.fc29                           fedora                             116 k
 python2                                x86_64                       2.7.15-11.fc29                          updates                             46 k
 python2-libs                           x86_64                       2.7.15-11.fc29                          updates                            6.1 M

Transaction Summary
======================================================================================================================================================
Install  5 Packages

Total size: 7.4 M
Installed size: 29 M
Downloading Packages:
[SKIPPED] compat-openssl10-1.0.2o-3.fc29.x86_64.rpm: Already downloaded                                                                              
[SKIPPED] gdbm-1.18-1.fc29.x86_64.rpm: Already downloaded                                                                                            
[SKIPPED] python2-2.7.15-11.fc29.x86_64.rpm: Already downloaded                                                                                      
[SKIPPED] python2-libs-2.7.15-11.fc29.x86_64.rpm: Already downloaded                                                                                 
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1 
  Installing       : gdbm-1:1.18-1.fc29.x86_64                                                                                                    1/5 
  Installing       : compat-openssl10-1:1.0.2o-3.fc29.x86_64                                                                                      2/5 
  Running scriptlet: compat-openssl10-1:1.0.2o-3.fc29.x86_64                                                                                      2/5 
  Installing       : python2-2.7.15-11.fc29.x86_64                                                                                                3/5 
  Installing       : python2-libs-2.7.15-11.fc29.x86_64                                                                                           4/5 
  Installing       : json_diff-1.4.1-1.fc29.noarch                                                                                                5/5 
  Running scriptlet: json_diff-1.4.1-1.fc29.noarch                                                                                                5/5 
  Verifying        : compat-openssl10-1:1.0.2o-3.fc29.x86_64                                                                                      1/5 
  Verifying        : gdbm-1:1.18-1.fc29.x86_64                                                                                                    2/5 
  Verifying        : python2-2.7.15-11.fc29.x86_64                                                                                                3/5 
  Verifying        : python2-libs-2.7.15-11.fc29.x86_64                                                                                           4/5 
  Verifying        : json_diff-1.4.1-1.fc29.noarch                                                                                                5/5 

Installed:
  json_diff-1.4.1-1.fc29.noarch          compat-openssl10-1:1.0.2o-3.fc29.x86_64     gdbm-1:1.18-1.fc29.x86_64     python2-2.7.15-11.fc29.x86_64    
  python2-libs-2.7.15-11.fc29.x86_64    

Complete!
INFO: 
Finish: run

$ mock -r fedora-29-x86_64 --shell
INFO: mock.py version 1.4.13 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Finish: chroot init
Start: shell
<mock-chroot> sh-4.4# json_diff 
Traceback (most recent call last):
  File "/usr/bin/json_diff", line 6, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources


Adding the missing dependency manually:

$ mock -r fedora-29-x86_64 --install python2-setuptools
INFO: mock.py version 1.4.13 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.13
INFO: Mock Version: 1.4.13
Finish: chroot init
INFO: installing package(s): python2-setuptools
fedora                                                                                                                 10 kB/s |  16 kB     00:01    
updates                                                                                                                11 kB/s |  16 kB     00:01    
Dependencies resolved.
======================================================================================================================================================
 Package                                    Arch                           Version                               Repository                      Size
======================================================================================================================================================
Installing:
 python2-setuptools                         noarch                         40.4.3-1.fc29                         fedora                         631 k

Transaction Summary
======================================================================================================================================================
Install  1 Package

Total size: 631 k
Installed size: 3.0 M
Downloading Packages:
[SKIPPED] python2-setuptools-40.4.3-1.fc29.noarch.rpm: Already downloaded                                                                            
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1 
  Installing       : python2-setuptools-40.4.3-1.fc29.noarch                                                                                      1/1 
  Running scriptlet: python2-setuptools-40.4.3-1.fc29.noarch                                                                                      1/1 
  Verifying        : python2-setuptools-40.4.3-1.fc29.noarch                                                                                      1/1 

Installed:
  python2-setuptools-40.4.3-1.fc29.noarch                                                                                                             

Complete!
INFO: 
Finish: run

$ mock -r fedora-29-x86_64 --shell
INFO: mock.py version 1.4.13 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Finish: chroot init
Start: shell
<mock-chroot> sh-4.4# json_diff
Traceback (most recent call last):
  File "/usr/bin/json_diff", line 11, in <module>
    load_entry_point('json-diff==1.4.1', 'console_scripts', 'json_diff')()
TypeError: main() takes exactly 1 argument (0 given)
<mock-chroot> sh-4.4#

Comment 3 Matěj Cepl 2019-02-07 16:15:00 UTC
Created attachment 1527856 [details]
WIP patch to update the script

I have spent too much time on upgrading this script (yes, missing BR on python-setuptools is real, and yes, package needs to be rebuilt and python setup.py install run with that package installed, you cannot inject it to the environment later), but I haven't managed to clean it up even to the level when

python2 setup.py test -v

would pass.

Currently the changes as recorded in this patch. If you want to play with it further, you are more than welcome.

Comment 4 Fedora Update System 2019-08-06 15:54:03 UTC
FEDORA-2019-b825247b25 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-b825247b25

Comment 5 Fedora Update System 2019-08-06 15:54:08 UTC
FEDORA-2019-a3215c1a53 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-a3215c1a53

Comment 6 Fedora Update System 2019-08-07 01:07:50 UTC
json_diff-1.4.1-5.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b825247b25

Comment 7 Fedora Update System 2019-08-07 03:49:04 UTC
json_diff-1.4.1-4.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-a3215c1a53

Comment 8 Fedora Update System 2019-08-15 18:09:35 UTC
json_diff-1.4.1-5.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2019-08-15 18:51:40 UTC
json_diff-1.4.1-4.fc29 has been pushed to the Fedora 29 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.