| Summary: | Добавление нового priorities | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Sisyphus | Reporter: | alxvmr <alekseevamo> | ||||
| Component: | apt | Assignee: | placeholder <placeholder> | ||||
| Status: | NEW --- | QA Contact: | qa-sisyphus | ||||
| Severity: | normal | ||||||
| Priority: | P5 | CC: | boyarsh, glebfm, imz, ldv, nbr, placeholder, vt | ||||
| Version: | unstable | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
Created attachment 21561 [details] patch Сейчас apt предоставляет 6 priorities: const char *priorities[] = { "Essential", "Important", "Required", "Standard", "Optional", "Extra" }; Со следующими параметрами (rpmpackagedata.cc) Priorities PkgFlags VerPriority Scores Essential Essential Important +N Important Important Important +N Required Important Required +N Standard 0 Standard +N Optional 0 Optional ~0 Extra 0 Extra ~0 Пакеты с Flag::Essential или Flag::Important попадают в блок предупреждений ShowEssential ("This should NOT be done unless you know exactly what you are doing!"). Однако всем существующим priorities c этими флагами соответствует высокий VerPriority, который повышает score в resolver и делает пакет практически неудаляемым. В существующих priorities нет ни одного варианта, который бы предоставлял следующую логику: добавление в ShowEssential без повышения score. Такой priorities был бы полезен для пакетов, удаление которых нежелательно, но допустимо. В результате, резолвер не сломает зависимости и пользователь увидит удаляемый пакет в "This should NOT be done unless you know exactly what you are doing!". Приложила патч, который добавляет такой priorities "WarnRemove" (Flag::Important + VerPriority::Optional).