stdver_warnings Package¶
stdver_warnings
Package¶
This app implements displaying warnings if a package has an outdated
Standards-Version field, when compared to the current version of the
debian-policy
package in the default repository.
The warning is displayed as an entry to the
distro_tracker.core.panels.ActionNeededPanel
>
This functionality is extracted to a separate app to allow other vendors to optionally activate it.
models
Module¶
tracker_tasks
Module¶
Distro Tracker tasks for the distro_tracker.stdver_warnings
app.
-
class
distro_tracker.stdver_warnings.tracker_tasks.
UpdateStandardsVersionWarnings
(force_update=False, *args, **kwargs)[source]¶ Bases:
distro_tracker.core.tasks.BaseTask
The task updates warnings for packages which have an outdated Standards-Version.
-
ACTION_ITEM_TYPE
= 'debian-std-ver-outdated'¶
-
DEPENDS_ON_EVENTS
= ('new-source-package-version',)¶
-
FULL_DESCRIPTION_TEMPLATE
= 'stdver_warnings/standards-version-action-item.html'¶
-
ITEM_DESCRIPTION
= 'Standards version of the package is outdated.'¶
-
create_action_item
(package, policy_version)[source]¶ Creates a
distro_tracker.core.models.ActionItem
instance if the Standards-Version of the given package is outdated when compared to the given policy version.
-
get_packages_from_events
()[source]¶ Returns: A list of distro_tracker.core.models.SourcePackageName
instances which are found from all raised events.
-
classmethod
unregister_plugin
()¶
-
tests
Module¶
Tests for the distro_tracker.stdver_warnings
app.
-
class
distro_tracker.stdver_warnings.tests.
StandardsVersionActionItemTests
(methodName='runTest')[source]¶ Bases:
distro_tracker.test.TestCase
Tests for the
distro_tracker.stdver_warnings.tracker_tasks.UpdateStandardsVersionWarnings
task.-
add_mock_event
(name, arguments)[source]¶ Helper method adding mock events which the news generation task will see when it runs.
-
add_mock_new_source_version_event
(package)[source]¶ Helper method adding mock ‘new-source-package-version’ events where the newly created source package should be the one given in the
package
parameter.
-
get_action_type
()[source]¶ Returns the
distro_tracker.core.models.ActionItemType
for Standards-Version warnings.
-
run_task
(initial_task=False)[source]¶ Initiates the task run.
Parameters: initial_task (Boolean) – An optional flag which if True
means that the task should be ran as if it were directly passed to thedistro_tracker.core.tasks.run_task()
function.
-
set_debian_policy_version
(policy_version)[source]¶ Set the version of the debian-policy package to the given version.
-
test_action_item_outdated_policy
()[source]¶ Tests that an action item is created when the package’s standards version is outdated.
-
test_action_item_policy_outdated_full_version
()[source]¶ Tests that an action item is created when the package’s standards version is outdated and set by giving all 4 version numbers.
-
test_action_item_removed
()[source]¶ Tests that an existing action item is removed when there is a new package version with a non-outdated Std-Ver.
-
test_action_item_severely_outdated_policy
()[source]¶ Tests that an action item is created when the package’s standards version is severely outdated (major version number differs from the major version number of debian-policy).
-
test_action_item_updated
()[source]¶ Tests that an existing action item is updated when there is a new package version which still has an outdated Std-Ver.
-
test_no_action_item_policy_up_to_date
()[source]¶ Tests that no action item is created when the package’s Standards-Version is up to date.
-