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=0.8 required=5.0 tests=DMARC_REJECT, MAILING_LIST_MULTI autolearn=no autolearn_force=no version=4.0.0 Received: from bigglesworth.mail.be.easynet.net (bigglesworth.mail.be.easynet.net [212.100.160.67]) by chiba.3jane.net (Postfix) with ESMTP id 790DF200AD40 for ; Mon, 18 Feb 2002 01:05:51 -0600 (CST) Received: from 213-193-176-124.adsl.easynet.be ([213.193.176.124]) by bigglesworth.mail.be.easynet.net with esmtp (Exim 3.16 #1) id 16chq1-00022n-00 for gentoo-dev@gentoo.org; Mon, 18 Feb 2002 08:03:50 +0100 Subject: Re: [gentoo-dev] for those that have been using portage 1.8.9_prex From: Geert Bevin To: gentoo-dev@gentoo.org In-Reply-To: <1013983943.1534.1.camel@Gentoo> References: <1013936121.1157.0.camel@inspiron.uwyn.office> <1013983943.1534.1.camel@Gentoo> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 18 Feb 2002 08:02:00 +0100 Message-Id: <1014015721.826.0.camel@oak.uwyn.office> Mime-Version: 1.0 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: 8acda558-03e5-49e3-ad84-d73930758c04 X-Archives-Hash: e8a40ea5a70afa7268fd4eeb2bea4de1 I'm sorry I used the cvs version of portage to write those scripts. I'll post an updated version in a little while. On Sun, 2002-02-17 at 23:12, Bart Verwilst wrote: > After succesfully running the sh script, i try to run convertslots2.py, > it errors out with the following output: > > > root@Gentoo verwilst # ./convertslots2.py > Traceback (most recent call last): > File "./convertslots2.py", line 16, in ? > slotpath=dirname(localtree.getebuildpath(package))+"/SLOT" > AttributeError: 'vartree' instance has no attribute 'getebuildpath' > > > Bye! > > On Sun, 2002-02-17 at 09:55, Geert Bevin wrote: > > 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 > > ---- > > > > > #!/bin/sh > > # converts old changed dirnames to the previous format again > > # where slots aren't reflected in the dir path name > > slots=$(find /var/db/pkg -name SLOT) > > for slot in $slots; > > do > > dir=${slot%SLOT} > > pf=$(cat $dir/PF) > > newdir=$(dirname $dir) > > newdir="$newdir/$pf" > > if [ ! -d $newdir ] > > then > > mv $dir $newdir > > echo "$dir has been converted" > > else > > echo "$newdir already exists" > > fi > > done > > ---- > > > > > #!/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=portage.vartree() > > for node in localtree.getallnodes(): > > for package in localtree.dep_match(node): > > slotpath=dirname(localtree.getebuildpath(package))+"/SLOT" > > if os.path.exists(slotpath): > > package_parts=portage.catpkgsplit(package) > > slotfile=open(slotpath,'r+') > > actualslot=slotfile.readline().strip() > > if actualslot==package_parts[2]: > > slotfile.truncate(0) > > print slotpath,"has been set to null" > > slotfile.close() > > > -- > > Bart Verwilst > Gentoo Linux Developer, Desktop Team > Gent, Belgium > > _______________________________________________ > gentoo-dev mailing list > gentoo-dev@gentoo.org > http://lists.gentoo.org/mailman/listinfo/gentoo-dev > -- 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