diff --git a/osc-wrapper.py b/osc-wrapper.py index a88eca37..ebc57c40 100755 --- a/osc-wrapper.py +++ b/osc-wrapper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # this wrapper exists so it can be put into /usr/bin, but still allows the # python module to be called within the source directory during development diff --git a/osc/core.py b/osc/core.py index 45ffd5e2..7c820106 100644 --- a/osc/core.py +++ b/osc/core.py @@ -5,7 +5,7 @@ from __future__ import print_function -__version__ = '1.000' +__version__ = '0.164.2' # __store_version__ is to be incremented when the format of the working copy # "store" changes in an incompatible way. Please add any needed migration diff --git a/osc/fetch.py b/osc/fetch.py index 5a786250..597f7df3 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -78,9 +78,9 @@ class Fetcher: raise oscerr.APIError('CPIO archive is incomplete ' '(see .errors file)') if package == '_repository': - n = re.sub(rb'\.pkg\.tar\..z$', b'.arch', hdr.filename) + n = re.sub(b'\.pkg\.tar\..z$', b'.arch', hdr.filename) if n.startswith(b'container:'): - n = re.sub(rb'\.tar\..z$', b'.tar', hdr.filename) + n = re.sub(b'\.tar\..z$', b'.tar', hdr.filename) pac = pkgs[decode_it(n.rsplit(b'.', 1)[0])] pac.canonname = hdr.filename else: diff --git a/osc/util/rpmquery.py b/osc/util/rpmquery.py index dc9fad69..2c8271f3 100644 --- a/osc/util/rpmquery.py +++ b/osc/util/rpmquery.py @@ -5,6 +5,7 @@ import os import re import struct from . import packagequery +from osc.util.helper import decode_it def cmp(a, b): return (a > b) - (a < b) @@ -291,7 +292,7 @@ class RpmQuery(packagequery.PackageQuery, packagequery.PackageQueryResult): arch = 'src' else: arch = self.arch() - return RpmQuery.filename(self.name(), None, self.version(), self.release(), arch) + return RpmQuery.filename(decode_it(self.name()), None, decode_it(self.version()), decode_it(self.release()), decode_it(arch)) @staticmethod def query(filename):