pakrat icon indicating copy to clipboard operation
pakrat copied to clipboard

Unexpected keyword argument when updating local repo.

Open alexie83 opened this issue 10 years ago • 4 comments

When initially using pakrat to create local mirror everything downloads and is created with no issues.

When trying to update a local repo I get the error:

errors(1): start() got an unexpected keyword argument 'filename'

I am running the command: pakrat --repoversion=Updates-$(date +%Y-%m-%d) --name=centos7 --baseurl=http://mirror.bytemark.co.uk/centos/7/updates/x86_64/

This is being run on a CentOS7 VM in VMWare. I have also tried using different mirrors. Also this happens with all directories from mirrors not just "updates" but also "centosplus" "extras" etc.

Any help in resolving the issue would be appreciated.

alexie83 avatar Aug 10 '15 11:08 alexie83

Hi Alexie,

Thanks for reporting this issue. Do you have the full trace log? A cursory look through the code makes me think this might be an issue in an external library Pakrat is using some place.

It's also worth mentioning that YUM itself has changed quite a bit since Pakrat last saw an update. @vamegh have you by chance seen this behavior before? I know you've worked on Pakrat's source more recently than I have.

ryanuber avatar Aug 14 '15 01:08 ryanuber

./pakrat --repoversion=Updates-$(date +%Y-%m-%d) --name=centos7 --baseurl=http://mirror.bytemark.co.uk/centos/7/updates/x86_64/

repo              done/total       complete    metadata
-------------------------------------------------------
centos7            268/1200        22%         -

total:             268/1200        22%

Ive just tested this on a centos7 vm (both using an outdated centos7 build and using the latest build with latest packages) and its worked fine, trace log / error logs copy & paste of run would be good, any other information would be good.

on centos 6 pyliblzma is required for a centos 7 repo -- centos7 will probably default to creating zma compressed repo data even for centos 6 and 5 repos (I havent tested this, but I would assume this would be its default behaviour and it should be easily changeable), other than this I cant say I have come across this particular issue.

vamegh avatar Aug 14 '15 11:08 vamegh

Hi,

I'll have to check again next time that the mirrors are updated as I deleted the initial VM and set it up again. However since then (11th august) there do not appear to have been any updates.

Please note that the initial creation (first time that ./pakrat --repoversion=Updates-$(date +%Y-%m-%d) --name=centos7 --baseurl= http://mirror.bytemark.co.uk/centos/7/updates/x86_64/ is run) everything works fine. however when there is an update and new rpms have been added that is when I get the error.

I will keep an eye on things and let you know as soon as the error crops up again and let you have any log details.

Alexie

2015-08-14 12:26 GMT+01:00 vamegh [email protected]:

./pakrat --repoversion=Updates-$(date +%Y-%m-%d) --name=centos7 --baseurl= http://mirror.bytemark.co.uk/centos/7/updates/x86_64/ repo done/total complete metadata

centos7 0/1200 0% -

Ive just tested this on a centos7 vm (both using an outdated centos7 build and using the latest build with latest packages) and its worked fine, trace log / error logs copy & paste of run would be good, any other information would be good.

on centos 6 pyliblzma is required for a centos 7 repo -- centos7 will probably default to creating zma compressed repo data even for centos 6 and 5 repos (I havent tested this, but I would assume this would be its default behaviour and it should be easily changeable), other than this I cant say I have come across this particular issue.

— Reply to this email directly or view it on GitHub https://github.com/ryanuber/pakrat/issues/3#issuecomment-131082319.

Alexie Astachenko,

Freelance Web guy and Kids martial arts instructor

www.happypenguin.co.uk

www.rapidfirewingchun.com

http://affiliate.daily.co.uk/idevaffiliate.php?id=111

alexie83 avatar Aug 14 '15 12:08 alexie83

I was chasing this one down forever. I assume the reason is because of https://github.com/rpm-software-management/yum/commit/007667ec829b47bade0ce1eb4b384c9c9b51d866:

- self.progress.start(text='<locally rebuilding deltarpms>', size=total)
+ self.progress.start(filename=None, url=None, # BZ 963023
+                     text='<locally rebuilding deltarpms>', size=total)

This calls start in pakrat/progress.py:

def start(self, _file, url, basename, size, text):

Now we can see why you were getting the following exception:

TypeError: start() got an unexpected keyword argument 'filename'

The start function does not have a filename parameter. Instead it has a _file parameter. I was able to fix this by patching the start function in pakrat/progress.py. Pull request https://github.com/ryanuber/pakrat/issues/5 opened.

jrwesolo avatar Jan 27 '16 00:01 jrwesolo