[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Scoperto qual'e' l'errore di apt-build



Vampir0 Ner0 wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hai mandato la patch in devel?

no, perché quella non funziona, o meglio ho trovato un caso in cui non funziona; con il gcc-3.3 non funzionava né la versione iniziale né quella modificata da me.

Ora ne ho fatta un'altra e la sto testando ... solo che per testare devo lasciare compilare tutto e ci vuole un po'.

In pratica riprendendo il discorso della prima mail ho fatto in modo che nel punto (A) usi anche apt-show per calcolare la versione e ho fatto in modo che prenda sempre l'ultima versione ritornata da apt-show e prende la prima che trova tra: * la riga ^Source: se contiene una versione tra parentesi (es: gcc-defaults (1.17))
* la riga ^Versione

Posto qui la nuova patch ... se qualcuno vuole aiutarmi a testarla per vedere se si trovano altri casi in cui non funziona e poi provo a segnalarla da qualche altra parte, magari direttamente sulla lista dei bachi così il manteiner può valutare se è valida

Ciao
Davide

--
Linux User: 302090: http://counter.li.org
Prodotti consigliati:
Sistema operativo: Debian: http://www.it.debian.org
Strumenti per l'ufficio: OpenOffice.org: http://it.openoffice.org
Database: PostgreSQL: http://www.postgres.org
Browser: FireFox: http://texturizer.net/firefox
Client di posta: Thunderbird: http://texturizer.net/thunderbird
Enciclopedia: wikipedia: http://it.wikipedia.org
--
Non autorizzo la memorizzazione del mio indirizzo di posta a chi usa
outlook: non voglio essere invaso da spam



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Rivoluzione tecnologica e il fax va in soffitta...oggi i tuoi fax li ricevi sul PC! Scopri come cliccando qui
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid28&d-12
--- /usr/bin/apt-build	2004-11-01 23:09:34.000000000 +0100
+++ apt-build.pl	2004-12-19 21:51:46.000000000 +0100
@@ -236,12 +236,26 @@
 	# And we retrieve the same information from apt-cache.
 	# (XXX this info from 'apt-cache show' is from old source, I dont know why.
 	# Since the test is made, I just added a print() if versions are not equal)
-	my $new; # set to 1 if versions from here and above are not the same.
+	my $new = 0; # set to 1 if versions from here and above are not the same.
 	my $oldver = $srcver;
-	read_apt_list("apt-cache show $pkg |", "^Version:",
-		sub { if (/^Version: (.+)$/ && !$new) { $srcver = $1; $new = 1 } });
-	$new = 0 if $srcver eq $oldver;
-
+        
+	read_apt_list("apt-cache show $pkg | grep '^Source:' |", "^Source:",
+	        sub { if (/^Source: (.+)$/) { $srcver = $1; $new = 1 } });
+
+#print $srcver;
+        $srcver =~ s/^.*\(//;
+	$srcver =~ s/\).*$//;
+
+#print "Source ver: $srcver";
+#print $new;
+	read_apt_list("apt-cache show $pkg | grep '^Version:' |", "^Version:",
+		sub { if (/^Version: (.+)$/) { $srcver = $1; $new = 1 } });
+
+        $new = 0 if $srcver eq $oldver;
+
+#print $srcver;
+#print $oldver;
+#exit;
 	print STDERR "-----> Downloading $pkg source ($srcpkg $srcver) <-----";
 	print STDERR "Taking version $srcver over $oldver\n" if $new;
 
@@ -256,7 +270,7 @@
 	my ($control, @packages, $srcpkg, $srcver, $upverchdir);
 
 	print STDERR "-----> Building $pkg <-----";
-
+	
 	chdir $conf{build_dir};
 
 	read_apt_list("apt-get --print-uris @apt_args source $pkg |", "^'",
@@ -265,7 +279,6 @@
 			($srcpkg, $srcver) = ($n, $v)
 		});
 
-
 	read_apt_list(
 		"apt-get --print-uris @apt_args source $srcpkg=".$upver.$maintver." |",
 		"^'", sub {
@@ -277,8 +290,10 @@
 			($srcpkg, $upverchdir) = ($n, $v);
 		});
 
+       $upverchdir = $srcver if( !$upverchdir );
+       
 	chdir "$srcpkg-$upverchdir";
-
+	
 	# Add an entry in changelog 
 	system "debchange --append 'Built by apt-build'";
 	for (@{$conf->patch}) {
 

Reply to: