daklib.policy¶
module to process policy queue uploads
Classes
|
process uploads to policy queues |
|
export a policy queue upload |
- class daklib.policy.PolicyQueueUploadHandler(upload: PolicyQueueUpload, session)[source]¶
process uploads to policy queues
This class allows to accept or reject uploads and to get a list of missing overrides (for NEW processing).
- get_action() Optional[str] [source]¶
get current action
- Returns:
string giving the current action, one of ‘ACCEPT’, ‘ACCEPTED’, ‘REJECT’
- missing_overrides(hints: Optional[list[dict]] = None) list[dict] [source]¶
get missing override entries for the upload
- Parameters:
hints – suggested hints for new overrides in the same format as the return value
- Returns:
list of dicts with the following keys:
package: package name
priority: default priority (from upload)
section: default section (from upload)
component: default component (from upload)
type: type of required override (‘dsc’, ‘deb’ or ‘udeb’)
All values are strings.
- class daklib.policy.UploadCopy(upload: PolicyQueueUpload, group: Optional[str] = None)[source]¶
export a policy queue upload
This class can be used in a with-statement:
with UploadCopy(...) as copy: ...
Doing so will provide a temporary copy of the upload in the directory given by the
directory
attribute. The copy will be removed on leaving the with-block.- export(directory: str, mode: Optional[int] = None, symlink: bool = True, ignore_existing: bool = False) None [source]¶
export a copy of the upload
- Parameters:
directory – directory to export to
mode – permissions to use for the copied files
symlink – use symlinks instead of copying the files
ignore_existing – ignore already existing files