Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error while trying to get URL of RPM package #27

Open
harish2704 opened this issue Jun 16, 2018 · 0 comments
Open

Strange error while trying to get URL of RPM package #27

harish2704 opened this issue Jun 16, 2018 · 0 comments

Comments

@harish2704
Copy link

I am facing a strange error while trying to use python bindings of libzypp

the attached test program produces two different kind of outputs in two test cases as shown below
Output with bug

hari@harilocal:~/Downloads/squashfs-root/libzypp-bindings$ env CHECK_BUG=1 python2  libzypp_test.py | tail -n 3
http://download.opensuse.org/tumbleweed/repo/oss/��\B�U/plasma5-desktop-lang-5.13.0-1.1.noarch.rpm
http://download.opensuse.org/tumbleweed/repo/oss/p&�A�U/plasma5-session-5.13.0-1.1.noarch.rpm
http://download.opensuse.org/tumbleweed/repo/oss/е^B�U/plasma5-session-wayland-5.13.0-1.1.noarch.rpm

Output without bug

hari@harilocal:~/Downloads/squashfs-root/libzypp-bindings$ python2  libzypp_test.py | tail -n 3
http://download.opensuse.org/tumbleweed/repo/oss/./noarch/plasma5-desktop-lang-5.13.0-1.1.noarch.rpm
http://download.opensuse.org/tumbleweed/repo/oss/./noarch/plasma5-session-5.13.0-1.1.noarch.rpm
http://download.opensuse.org/tumbleweed/repo/oss/./noarch/plasma5-session-wayland-5.13.0-1.1.noarch.rpm
hari@harilocal:~/Downloads/squashfs-root/libzypp-bindings$ 

Piece of code which create this difference is given below

    if( 'CHECK_BUG' in os.environ ):
        itemUrl = str( item.lookupLocation().filename() )
    else:
        r=item.lookupLocation(); itemUrl = str( r.filename() )

Please see complete test program attached below

test_program_with_output.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant