--- /dev/null
+Dir "/home/sources/source-report/apt/"
+{
+ // Location of the state dir
+ State "lists"
+ {
+ Lists "lists/";
+ xstatus "xstatus";
+ userstatus "status.user";
+ status "/home/sources/source-report/apt/status";
+ cdroms "cdroms.list";
+ };
+ Cache "cache" {
+ Archives "archives/";
+ srcpkgcache "srcpkgcache.bin";
+ pkgcache "pkgcache.bin";
+ };
+ Etc "etc/" {
+ SourceList "sources.list";
+ Preferences "preferences";
+ Parts "apt.conf.d/";
+ };
+
+}
--- /dev/null
+deb http://ftp.de.debian.org/debian sarge main
+deb http://grml.org/repos/ ./
+
+deb http://security.debian.org/ sarge/updates main contrib non-free
+#backports.org
+deb-src http://www.backports.org/debian sarge-backports main contrib non-free
#if we provide our own sources list it will be copied into the chroot
if ($config->{sourceslist} && -f $config->{sourceslist}) {
print "Copy sourceslist into chroot\n" if $debug;
- system ("cp " . $config->{sourceslist} . " " . $config->{chroot}."/etc/apt/sources.list") == 0
- or die "Could not copy sourceslist into chroot: $!";
+ copy($config->{sourceslist},"apt/etc/sources.list") or die "Sources list cannot be copied: $!";
}
#update chroot
-system ("sudo /usr/sbin/chroot " . $config->{chroot} . " apt-get update") if $config->{updatesource};
+system ("apt-get -c=apt-config update") if $config->{updatesource};
foreach my $package (keys %{$package_tree}) {
print "Working on $package\n" if $debug;
next;
}
$package_tree->{$package}->{'errors'} = ();
- open (my $fh, '-|', "sudo chroot " . $config->{chroot} . " apt-get --print-uris -d source $source=$version 2>&1 ")
- or warn "Could not launch chroot command:$!";
+ open (my $fh, '-|', "apt-get -c=apt-config --print-uris -d source $source=$version 2>&1 ")
+ or warn "Could not launch apt-get command:$!";
while (my $line = <$fh>) {
chomp $line;
if ($line =~ /^'([^']+)'\s+(\S+)\s+(\S+)\s+(\S+)/) {
}
-copy($config->{chroot}."/etc/apt/sources.list", $config->{reportdir}."/sources.list") or die "Sources list cannot be copied: $!";
+copy("apt/etc/sources.list", $config->{reportdir}."/sources.list") or die "Sources list cannot be copied: $!";
#first some statistics
my $pnum = keys(%{$package_tree});