From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=DMARC_REJECT, MAILING_LIST_MULTI,RDNS_NONE autolearn=no autolearn_force=no version=4.0.0 Received: from bigglesworth.mail.be.easynet.net (unknown [212.100.160.67]) by chiba.3jane.net (Postfix) with ESMTP id CD744200AD44 for ; Sun, 17 Feb 2002 02:57:33 -0600 (CST) Received: from 213-193-176-148.adsl.easynet.be ([213.193.176.148]) by bigglesworth.mail.be.easynet.net with esmtp (Exim 3.16 #1) id 16cN6e-0008NB-00 for gentoo-dev@gentoo.org; Sun, 17 Feb 2002 09:55:37 +0100 From: Geert Bevin To: gentoo-dev@gentoo.org Content-Type: multipart/mixed; boundary="=-255HKIiCI9gZrHGm1Xq4" X-Mailer: Evolution/1.0.2 Date: 17 Feb 2002 09:55:20 +0100 Message-Id: <1013936121.1157.0.camel@inspiron.uwyn.office> Mime-Version: 1.0 Subject: [gentoo-dev] for those that have been using portage 1.8.9_prex Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: 01fd1711-97a8-4eec-8f6d-04b4a7434139 X-Archives-Hash: b19d6a1a4a92da3d45fef75c1f959403 --=-255HKIiCI9gZrHGm1Xq4 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello, I provide these scripts to put your /var/db/pkg tree back to a compatible state after all the slots adventures. First run convertslot.sh and then convertslots2.py, afterwards your installed package tree should be compatible with 1.8.8 again and with what slots are supposed to become in the next revisions. Happy gentooing ! Geert -- Geert Bevin Uwyn "Use what you need" Lambermontlaan 148 http://www.uwyn.com 1030 Brussels gbevin@uwyn.com Tel & Fax +32 2 245 41 06 --=-255HKIiCI9gZrHGm1Xq4 Content-Disposition: attachment; filename=convertslot.sh Content-Transfer-Encoding: quoted-printable Content-Type: text/x-sh; charset=ISO-8859-1 #!/bin/sh # converts old changed dirnames to the previous format again # where slots aren't reflected in the dir path name slots=3D$(find /var/db/pkg -name SLOT) for slot in $slots; do dir=3D${slot%SLOT} pf=3D$(cat $dir/PF) newdir=3D$(dirname $dir) newdir=3D"$newdir/$pf" if [ ! -d $newdir ] then mv $dir $newdir echo "$dir has been converted" else echo "$newdir already exists" fi done --=-255HKIiCI9gZrHGm1Xq4 Content-Disposition: attachment; filename=convertslots2.py Content-Transfer-Encoding: quoted-printable Content-Type: text/x-python; charset=ISO-8859-1 #!/usr/bin/env spython import os from os.path import walk, splitext, exists, basename, dirname import sys import output from output import * import portage import string from string import strip, find, replace, split """converts $PV slots to null slots""" localtree=3Dportage.vartree() for node in localtree.getallnodes(): for package in localtree.dep_match(node): slotpath=3Ddirname(localtree.getebuildpath(package))+"/SLOT" if os.path.exists(slotpath): package_parts=3Dportage.catpkgsplit(package) slotfile=3Dopen(slotpath,'r+') actualslot=3Dslotfile.readline().strip() if actualslot=3D=3Dpackage_parts[2]: slotfile.truncate(0) print slotpath,"has been set to null" slotfile.close() --=-255HKIiCI9gZrHGm1Xq4--