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

Flag lib32 out of date when non lib32 marked out of date #230

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lrustand
Copy link
Contributor

Took a stab at trying to fix issue #110, marking lib32 package as out of date when non lib32 package is flagged. I also added the reverse case, when a lib32 package is flagged the non lib32 package (and others based on the same pkgbase) also get flagged. Hope I got everything right as this is my first time working with django.

@jelly
Copy link
Member

jelly commented Aug 6, 2019

Thanks for the PR, just started testing, the second message after entering an out of date text only lists the original flagged out of date package. while two packages where flagged out of date. It would be nice to also list that

This message is what I am talking about.

Package Flagged - gconf
Thank you, the maintainers have been notified the following 1 package are out-of-date:

gconf 3.2.6+11+g07808097-4 [extra] (x86_64)

I'm also wondering if this case is always valid hmm since lib32-foo can be updated before foo, so maybe it should try and compare the pkgver.

Already found such a case here:

cairo 1.16.0-2 [extra] (x86_64)
lib32-cairo 1.17.2+17+g52a7c79fd-1 [multilib] (x86_64)

@lrustand
Copy link
Contributor Author

lrustand commented Aug 6, 2019 via email

@lrustand
Copy link
Contributor Author

lrustand commented Aug 8, 2019

This should take care of the issues you mentioned.

@jelly
Copy link
Member

jelly commented Sep 6, 2019

Found one issue when flagging lib32-libssh2 out of date while libssh2 was already flagged:

Internal Server Error: /packages/multilib/x86_64/lib32-libssh2/flag/
Traceback (most recent call last):
  File "/home/jelle/projects/archweb/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/jelle/projects/archweb/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/jelle/projects/archweb/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/jelle/projects/archweb/env/lib/python3.7/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/jelle/projects/archweb/packages/views/flag.py", line 87, in flag
    pkgs = find_same_pkgbase(pkg).filter(
  File "/home/jelle/projects/archweb/packages/views/flag.py", line 59, in find_same_pkgbase
    pkgname=pkg.pkgname.replace('lib32-',''))
  File "/home/jelle/projects/archweb/env/lib/python3.7/site-packages/django/shortcuts.py", line 93, in get_object_or_404
    return queryset.get(*args, **kwargs)
  File "/home/jelle/projects/archweb/env/lib/python3.7/site-packages/django/db/models/query.py", line 412, in get
    (self.model._meta.object_name, num)
main.models.Package.MultipleObjectsReturned: get() returned more than one Package -- it returned 2!

Since libssh is in [testing] and [core] in my test setup.

@anthraxx
Copy link
Member

anthraxx commented Oct 9, 2019

@lrustand ping, can you take a look to fix @jelly finding? Would be cool to have this feature

@lrustand
Copy link
Contributor Author

lrustand commented Oct 9, 2019

I'm sorry it has taken so long for me to respond to this. Currently I don't have the time to look at this for a while, but feel free to finish the work on this if you want.

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

Successfully merging this pull request may close these issues.

3 participants