[server] drop scripts dir, stuff is now in build.git repo

This commit is contained in:
Fabio Erculiani
2011-10-16 13:18:42 +02:00
parent e42ffb5237
commit 74c818f28e
4 changed files with 0 additions and 118 deletions

View File

@@ -1,30 +0,0 @@
#!/bin/sh
kernels="2.6.31-sabayon 2.6.32-sabayon 2.6.33-sabayon 2.6.34-sabayon"
running_kernel="2.6.34-sabayon"
packages="app-emulation/virtualbox-guest-additions app-emulation/virtualbox-modules x11-drivers/xf86-video-virtualbox"
export ETP_REPO="sabayonlinux.org"
# build for latest kernel
KERNEL_DIR="/usr/src/linux-${running_kernel}" emerge xf86-input-virtualbox $packages virtualbox-bin
echo -5 | etc-update
reagent update
for kernel in $kernels; do
if [ "${kernel}" = "${running_kernel}" ]; then
continue
fi
rm -rf /usr/portage/packages/*
KERNEL_DIR="/usr/src/linux-${kernel}" emerge -B ${packages} || ( echo "ouch unable to build" && exit 1 )
built_pkgs=$(find /usr/portage/packages -name "*.tbz2" | xargs echo)
[[ -z "${built_pkgs}" ]] && echo "ouch no kernel pkgs" && exit 2
reagent inject ${built_pkgs} || ( echo "ouch unable to inject" && exit 3 )
echo
reagent query tags ${kernel} -qv | sort
echo
done
echo "Now you should remove old packages:"
echo ETP_REPO=sabayonlinux.org reagent repo remove `reagent query search virtualbox -qv | grep MY_OLD_VER | xargs echo`
echo

View File

@@ -1,82 +0,0 @@
#!/usr/bin/python2
import sys
la_patterns = sys.argv[1:]
if not la_patterns:
print sys.argv[0], "<.la files patterns>"
raise SystemExit(1)
import os
import re
import tempfile
import shutil
from entropy.server.interfaces import Server
import entropy.tools
la_compiled_patterns = dict((x, re.compile(x)) for x in la_patterns)
print la_compiled_patterns
srv = Server()
def scan_match(pkg_id, repo_id):
dbconn = srv.open_repository(repo_id)
# get pkg path
pkg_path = srv._get_package_path(repo_id, dbconn, pkg_id)
if not os.path.isfile(pkg_path):
print "WTF, file not found =>", pkg_path
return True # if recursive, it will be pulled in, you nevvah know
# now extract
tmp_dir = tempfile.mkdtemp()
try:
rc = entropy.tools.uncompress_tarball(pkg_path, extract_path = tmp_dir,
catch_empty = True)
if rc != 0:
print "WTF, cannot extract file", pkg_path, "at dir", tmp_dir
return False
la_paths = []
for cur_dir, subdirs, files in os.walk(tmp_dir):
for file in files:
path = os.path.join(cur_dir, file)
if path.endswith(".la") and os.path.isfile(path) and os.access(path, os.R_OK):
la_paths.append(path)
if not la_paths:
return False
# print "pkg:", dbconn.retrieveAtom(pkg_id), "la:", la_paths
found = False
for la_path in la_paths:
# apply regexps
la_f = open(la_path, "r")
la_content = la_f.read()
la_f.close()
for la_pattern, cm_pattern in la_compiled_patterns.items():
if cm_pattern.search(la_content):
found = True
break
if found:
key_slot = dbconn.retrieveKeySlotAggregated(pkg_id)
f_pkg_id, f_repo_id = srv.atom_match(key_slot)
if repo_id != f_repo_id:
found = scan_match(f_pkg_id, f_repo_id)
if found:
print dbconn.retrieveKeySlotAggregated(pkg_id)
break
finally:
shutil.rmtree(tmp_dir, True)
return found
repo_id = os.getenv("ETP_REPO", "sabayonlinux.org")
dbconn = srv.open_repository(repo_id)
pkg_ids = dbconn.listAllIdpackages(order_by="atom")
for pkg_id in pkg_ids:
scan_match(pkg_id, repo_id)
srv.shutdown()
raise SystemExit(0)

View File

@@ -1,4 +0,0 @@
#!/bin/sh
KERNEL_PACKAGE="sys-kernel/"
[[ -z "${1}" ]] && echo "usage: $(basename ${0}) <entropy-kernel-tag>" && exit 1
reagent query tags "${1}" -q | grep -v ${KERNEL_PACKAGE} | cut -d# -f 1 | sed 's/^/~/g' | xargs emerge

View File

@@ -1,2 +0,0 @@
#!/bin/sh
reagent query search x11-drivers/xf86-input x11-drivers/xf86-video -q | cut -d# -f 1 | sed 's/x11/=x11/' | xargs emerge