subject: 'Dependency solving' title: | APT 3.0 dependency solver subtitle: | An orthodox approach to dependency solving, leading to a SAT solver comparable to DPLL. documentclass: scrartcl classoption: BCOR=0.5cm secnumdepth: 2 toc-depth: 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| domain: automation | |
| name: Controlling lights using Philips Hue Dimmer Switch (RWL021) | |
| description: Take the swith fast into use with pre-set configuration. | |
| input: | |
| zha_device: | |
| name: Philips Hue Dimmer Switch (RWL021 only) | |
| description: The swith to be taken into use. | |
| selector: | |
| device: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| import email | |
| import sys | |
| import base64 | |
| preserve=["from", "subject", "date"] | |
| msg = email.message_from_file(sys.stdin) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # SPDX-FileCopyrightText: 2023 Julian Andres Klode <[email protected]> | |
| # | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| # In[7]: | |
| #!/usr/bin/python3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="generator" content="pandoc" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> | |
| <title>APT 3.0 dependency solver</title> | |
| <style> | |
| html { | |
| line-height: 1.5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <list> | |
| #include <queue> | |
| #include <vector> | |
| #include <apt-pkg/pkgcache.h> | |
| #include <apt-pkg/depcache.h> | |
| #include <apt-pkg/policy.h> | |
| namespace APT | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| args="" | |
| if [ $(id -u) -ne 0 ]; then | |
| args=--user | |
| fi | |
| if echo $@ | grep update; then | |
| args="$args -p ProtectSystem=strict -p ReadWritePaths=/var -p PrivateTmp=yes -p PrivateDevices=yes -p ProtectProc=invisible -p RestrictSUIDSGID=yes" | |
| fi | |
| exec systemd-run $args -q --wait -G --unit apt.service -Pt -p ProtectHome=yes -p NoNewPrivileges=yes -p ProtectHostname=yes -p ProtectClock=yes -p ProtectKernelTunables=yes -p ProtectKernelModules=yes -p ProtectKernelLogs=yes -p ProtectControlGroups=yes -p RestrictRealtime=yes -p SystemCallFilter=@system-service /usr/bin/apt "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| args="" | |
| if [ $(id -u) -ne 0 ]; then | |
| args=--user | |
| fi | |
| if echo $@ | grep update; then | |
| args="$args -p ProtectSystem=strict -p ReadWritePaths=/var/lib/apt -p ReadWritePaths=/var/cache/apt -p PrivateTmp=yes -p PrivateDevices=yes" | |
| fi | |
| exec systemd-run $args -q --wait -G --unit apt.service -Pt -p ProtectHome=yes -p NoNewPrivileges=yes -p ProtectHostname=yes -p ProtectClock=yes -p ProtectKernelTunables=yes -p ProtectKernelModules=yes -p ProtectKernelLogs=yes -p ProtectControlGroups=yes -p RestrictRealtime=yes -p SystemCallFilter=@system-service /usr/bin/apt "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| args="" | |
| if [ $(id -u) -ne 0 ]; then | |
| args=--user | |
| fi | |
| if echo $@ | grep update; then | |
| args="$args -p ProtectSystem=strict -p ReadWritePaths=/var -p PrivateTmp=yes -p PrivateDevices=yes" | |
| fi | |
| exec systemd-run $args -q --wait -G --unit apt.service -Pt -p ProtectHome=yes -p NoNewPrivileges=yes -p ProtectHostname=yes -p ProtectClock=yes -p ProtectKernelTunables=yes -p ProtectKernelModules=yes -p ProtectKernelLogs=yes -p ProtectControlGroups=yes -p RestrictRealtime=yes -p SystemCallFilter=@system-service /usr/bin/apt "$@" |