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

Unexpected keyword argument when updating local repo. #3

Open
alexie83 opened this issue Aug 10, 2015 · 4 comments
Open

Unexpected keyword argument when updating local repo. #3

alexie83 opened this issue Aug 10, 2015 · 4 comments

Comments

@alexie83
Copy link

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.

@ryanuber
Copy link
Owner

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.

@vamegh
Copy link

vamegh commented Aug 14, 2015

./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.

@alexie83
Copy link
Author

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 notifications@github.com:

./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
#3 (comment).

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

@jrwesolo
Copy link
Contributor

I was chasing this one down forever. I assume the reason is because of rpm-software-management/yum@007667e:

- 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 #5 opened.

abtreece referenced this issue in abtreece/pakrat Feb 1, 2017
fix scope issue with exception handling
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

4 participants