task #101
auto-detect arch / distrelease and set default filters accordingly
| Status: | New | Start date: | 01/16/2011 | |
|---|---|---|---|---|
| Priority: | Medium | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.3 |
Description
Detection is based on user-agent, see how it was done in easy-urpmi ?
History
Updated by Samuel Verschelde about 2 years ago
- Target version changed from 0.2 to 0.3
Updated by Χάρης Υφαντής about 2 years ago
- Assignee set to Χάρης Υφαντής
Updated by Samuel Verschelde about 2 years ago
Description updated (simpler now)
To Xaris : what interests me most is that auto-detection of the arch based on the user-agent. Setting the default filter will be nice if
you can, but otherwise ttp or I will handle it.
Updated by Adrien Gallou about 2 years ago
the way i see it, you could you could add a
setOption($name, $value)
getOption($name)
hasOption($name)
to the lib/filtering/baseCriteriaFilter.class.php
then you could change the getDefaultParameters of the
lib/actions/madbActions.class.php,
to add just after the line $filter->hasDefault()
a $filter->setOption('user_agent', $_SERVER['HTTP_USER_AGENT']);
then in getDefault method of the archCriteriaFilter and the distreleaseCriteriaFilter
you could do a if ($this->hasOption('user_agent')) then
a if ($this->getOption('user_agent')) then do the logic of return the if of the arch of distrelease based on the user_agent value.
Updated by Χάρης Υφαντής about 2 years ago
- Status changed from New to In progress
- % Done changed from 0 to 30
I have implemented most of the code Adrien suggests above.
I still have to pass the arch or distrelease on the corresponding filter and add more distros to be recognized.
P.S: this task can be completed after all that but it might need improvements like not setting the $filter->setOption on all filters.
Updated by Samuel Verschelde over 1 year ago
Xaris, what is the status for this task ? Is there a branch I can pull (on which remote if yes?) to finish it if you don't have the time to do it?
Updated by Samuel Verschelde over 1 year ago
ping
Updated by Samuel Verschelde about 1 year ago
ping Xaris
Updated by Samuel Verschelde 9 months ago
- Status changed from In progress to New
- Assignee changed from Χάρης Υφαντής to Giacomo Picchiarelli
- % Done changed from 30 to 0
Assigning to Giacomo who volunteered.