Skip to content

Instantly share code, notes, and snippets.

Introduction

SAT solver can be used to implement xbps-repodb --index, that move packages from stagedata to repodata, ensuring consistency of package requirements.

Variables

Real packages, virtual packages and shared libraries are represented as boolean variables. Value of true represents presence of item in repo, false represent absence.

@Chocimier
Chocimier / deps.sh
Last active July 30, 2022 03:46
cycles in xbps-packages templates
# usage:
# cd $XBPS_DISTDIR
# ./deps.sh
# ./loops.py builddeps $XBPS_DISTDIR/srcpkgs
mkdir -p builddeps
find srcpkgs -mindepth 1 -maxdepth 1 | cut -d/ -f2 | while read pkg; do echo ' '$pkg; ./xbps-src show-build-deps $pkg > builddeps/$pkg; done
@Chocimier
Chocimier / patches
Last active July 20, 2019 19:05
patches
.
@Chocimier
Chocimier / commit-msg
Created January 16, 2019 11:47
void-packages commit-msg
#!/bin/sh
# commit-msg hook
if grep -q 'update to' "$1"; then
if git diff --staged | grep -qP '^( |\+)revision=1$'; then
:
else
echo 'On update, revision need to be 1. ~hook'
exit 1
@Chocimier
Chocimier / crossbuild-support.patch
Last active July 16, 2018 11:12
crossbuild-support.patch
diff --git KF5AuthConfig.cmake.in KF5AuthConfig.cmake.in
index 0895e60..59fe53b 100644
--- KF5AuthConfig.cmake.in
+++ KF5AuthConfig.cmake.in
@@ -17,8 +17,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthMacros.cmake")
if(NOT "${KAUTH_BACKEND_NAME}" STREQUAL "FAKE")
if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
- find_file(TARGETSFILE KF5Auth/KF5AuthToolsTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
- include("${TARGETSFILE}")
modes.add_cmds({{ ":ddg", "Search with DuckDuckGo",
function (w, o) w.view:eval_js("(function(){ var form = document.createElement('form'); form.method='POST'; form.action='https://duckduckgo.com'; var input=document.createElement('input'); input.name='q'; input.value='".. o.arg .. "'; form.appendChild(input); form.submit(); })();", {
no_return = true,
callback = function (_, err)
w:error(err)
end,
}) end }})
#!/usr/bin/env python
import re
import irc.bot
import lxml
from bs4 import BeautifulSoup
from six.moves import urllib
#!/usr/bin/env python3
"""Fixes desktop and ts files from Transifex"""
import os
import re
import shutil
import sys
class DesktopProcessor:
"""Processes localized .desktop files"""
#!/usr/bin/env python3
import os
import re
import sys
from curses.ascii import isblank
class DesktopEntry:
name = ''
diff --git a/src/core/WindowsManager.cpp b/src/core/WindowsManager.cpp
index 024d59a..3c838d2 100644
--- a/src/core/WindowsManager.cpp
+++ b/src/core/WindowsManager.cpp
@@ -324,6 +324,7 @@ void WindowsManager::addWindow(Window *window, bool background)
connect(window, SIGNAL(requestedNewWindow(ContentsWidget*,bool,bool)), this, SLOT(openWindow(ContentsWidget*,bool,bool)));
connect(window, SIGNAL(requestedSearch(QString,QString)), this, SLOT(search(QString,QString)));
connect(window, SIGNAL(titleChanged(QString)), this, SLOT(setTitle(QString)));
+ connect(window, SIGNAL(iconChanged(QIcon)), this, SLOT(passIcon(QIcon)));