Am Montag, 13. Februar 2006 22:51 schrieb Fabian Franz: > Hi, > > short story shorter: > > Put attached script in /var/lib/apt/methods/ and add an entry like deb > installed:/UNIONFS ./ to /etc/apt/sources.list. Ok, here is is an update. Previous version had various problems. Put dpkg-myrepack to /usr/bin/ but have dpkg-repack installed on your to updated system (has dependencies). I've tested it in a base sarge chroot, which I dist-upgraded without problems to a Kanotix. Also upgrading a file on Kanotix, apt-get update on chroot and upgrade did show the upgrade. Please report back if it works for you. If you have an old knoppix installation you no longer need or which you wanted to upgrade anyway you could update that for example to the newest one with the following steps: - Boot from CD-ROM - mkdir /target - mount /dev/hda1 /target - mkdir /target/UNIONFS - mount --bind /UNIONFS /target/UNIONFS - Copy files to target - chroot /target - Edit sources.list like shown in quote - apt-get update - apt-get upgrade cu Fabian
Attachment:
dpkg-myrepack
Description: Perl program
--- chroot3/usr/bin/dpkg-repack 2003-10-24 17:50:08.000000000 +0000 +++ dpkg-myrepack 2006-02-13 23:50:27.000000000 +0000 @@ -19,12 +19,12 @@ use strict; use File::stat; -use vars qw($error_flag $dirty_flag $build_dir $arch $rootdir $packagename +use vars qw($error_flag $dirty_flag $build_dir $arch $rootdir $packagename $buildname $dpkg_lib); sub Syntax { print STDERR <<eof; -Usage: dpkg-repack [--root=dir] packagename [packagename ..] +Usage: dpkg-repack [--root=dir] packagename debname --root=dir Take package from filesystem rooted on <dir>. --arch=arch Force the parch to be built for architecture <arch>. packagename The name of the package to attempt to repack. @@ -84,7 +84,7 @@ # Get package control file via dpkg -s. sub Extract_Control { - my @control=`dpkg --root=$rootdir/ -s $packagename |grep -v "^Status:"`; + my @control=`dpkg-query --admindir=$dpkg_lib/ -s $packagename |grep -v "^Status:"`; chomp foreach @control; # Add something to the Description to mention dpkg-repack. @@ -107,7 +107,8 @@ $arch=`dpkg --print-installation-architecture`; chomp $arch; } - push @control, "Architecture: $arch\n"; + push @control, "\n"; + #push @control, "Architecture: $arch\n"; return join("\n", @control); } @@ -177,7 +178,7 @@ # language output. my $lc_all=$ENV{LC_ALL}; $ENV{LC_ALL}='C'; - my @filelist=split /\n/,`dpkg --root=$rootdir/ -L $packagename`; + my @filelist=split /\n/,`dpkg-query --admindir=$dpkg_lib/ -L $packagename`; $ENV{LC_ALL}=$lc_all if defined $lc_all; # important to reset it. # Set up a hash for easy lookups. @@ -247,7 +248,9 @@ Warn "fakeroot run without its -u flag may corrupt some file permissions."; } -foreach $packagename (@ARGV) { +$packagename=$ARGV[0]; +$buildname=$ARGV[1]; +{ if (! -f "$dpkg_lib/info/$packagename.list") { Error("Package $packagename not installed"); next; @@ -269,7 +272,7 @@ Install_Control($control); # Let dpkg do its magic. - SafeSystem("dpkg","--build",$build_dir,".",""); + SafeSystem("dpkg","--build",$build_dir,$buildname,""); # Finish up. CleanUp();
Attachment:
installed
Description: application/shellscript
Attachment:
pgp0reI7D4inn.pgp
Description: PGP signature