Bug 1352886 - Debian Mirror sync issue - debPackage.py
Summary: Debian Mirror sync issue - debPackage.py
Keywords:
Status: CLOSED EOL
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
: 1351251 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-05 12:03 UTC by Florian
Modified: 2020-03-06 13:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-06 13:26:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Florian 2016-07-05 12:03:33 UTC
Description of problem:

Debian Mirror upload/sync problem via api call (debianSync.py [1])

/debianSync.py --url=http://ftp2.de.debian.org/debian/dists/jessie/main/binary-amd64/ --channel=debian-jessie-main-x86_64 --username=XXXX --password=XXXX

 Exception Handler Information
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/spacewalk/server/apacheUploadServer.py", line 103, in _wrapper
ret = function(req)
File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 125, in handler
relative_path=self.rel_package_path, org_id=self.org_id)
File "/usr/lib/python2.7/site-packages/spacewalk/server/rhnPackageUpload.py", line 137, in push_package
header_end=a_pkg.header_end, channels=channels)
File "/usr/lib/python2.7/site-packages/spacewalk/server/importlib/mpmSource.py", line 110, in create_package
org_id=org_id, channels=channels)
File "/usr/lib/python2.7/site-packages/spacewalk/server/importlib/debPackage.py", line 65, in __init__
if isinstance(val, UnicodeType):
NameError: global name 'UnicodeType' is not defined


http://pastebin.com/raw/46WZD2TY


OS: CentOS7 7.2.1511 / system up2date
Pyhton 2.7.5 
Spacewalk 2.5 (latest)

[1]https://github.com/philicious/spacewalk-scripts/blob/master/debianSync.py

Comment 1 Florian 2016-07-05 12:39:09 UTC
###temp fix###

NameError: global name 'UnicodeType' is not defined

changed UnicodeType->unicode @65 ->  if isinstance(val, unicode):

--

thanks to chickahoona and ggainey - #spacewalk

Comment 2 Alex West 2016-09-29 21:24:08 UTC
I was also able to fix this by changing line 25 in debPackage.py to

from spacewalk.common.usix import ListType, TupleType, IntType, LongType, StringType, UnicodeType

instead of

from spacewalk.common.usix import IntType

Python 2.7.5
spacewalk-backend-server-2.5.43-1.el7.noarch

Comment 3 Jiří Dostál 2016-09-30 07:49:35 UTC
*** Bug 1351251 has been marked as a duplicate of this bug. ***

Comment 4 Michael Mráka 2020-03-06 13:26:31 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.


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