public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] for those that have been using portage 1.8.9_prex
@ 2002-02-17  8:55 Geert Bevin
  2002-02-17 22:12 ` Bart Verwilst
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Bevin @ 2002-02-17  8:55 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

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

[-- Attachment #2: convertslot.sh --]
[-- Type: text/x-sh, Size: 409 bytes --]

#!/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

[-- Attachment #3: convertslots2.py --]
[-- Type: text/x-python, Size: 727 bytes --]

#!/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()


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gentoo-dev] for those that have been using portage 1.8.9_prex
@ 2002-02-17  8:54 Geert Bevin
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Bevin @ 2002-02-17  8:54 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

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

[-- Attachment #2: convertslot.sh --]
[-- Type: text/x-sh, Size: 409 bytes --]

#!/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

[-- Attachment #3: convertslots2.py --]
[-- Type: text/x-python, Size: 727 bytes --]

#!/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()


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-02-18  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-17  8:55 [gentoo-dev] for those that have been using portage 1.8.9_prex Geert Bevin
2002-02-17 22:12 ` Bart Verwilst
2002-02-18  7:02   ` Geert Bevin
  -- strict thread matches above, loose matches on Subject: below --
2002-02-17  8:54 Geert Bevin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox