[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Revert "Revert "Revert "reproducible: Support arbitrary package filters when...

Holger Levsen gitlab at salsa.debian.org
Sat Jan 12 17:57:47 GMT 2019


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
e7e9d6ce by Holger Levsen at 2019-01-12T17:52:59Z
Revert "Revert "Revert "reproducible: Support arbitrary package filters when generating deb822 output."""

This reverts commit 2b758ac01a91483009ac68564357568181737d6a.

- - - - -


1 changed file:

- bin/reproducible_create_meta_pkg_sets.sh


Changes:

=====================================
bin/reproducible_create_meta_pkg_sets.sh
=====================================
@@ -21,21 +21,8 @@ ABORT=false
 
 # helper functions
 packages_list_to_deb822() {
-	script=$(cat <<'EOF'
-		use Dpkg::Control;
-		my $fd;
-		open($fd, '<', $ARGV[0]) or die $!;
-		my %packages = map { chomp; $_ => 1 } <STDIN>;
-		while (1) {
-			my $deb822 = Dpkg::Control->new();
-			last unless $deb822->parse($fd);
-			print "$deb822\n" if $packages{$deb822->{'Package'}};
-		}
-		close($fd);
-EOF
-	)
-	perl -e "$script" $PACKAGES < $TMPFILE > $TMPFILE2
-	mv $TMPFILE2 $TMPFILE
+	ALL_PKGS=$(cat $TMPFILE | cut -d ":" -f1 | sed "s#([^()]*)##g ; s#\[[^][]*\]##g ; s#,##g ; s# #\n#g"  |sort -u | tr '\n' '|')
+	grep-dctrl -F Package -e '^('"$ALL_PKGS"')$' $PACKAGES > $TMPFILE
 }
 
 tails_build_manifest_to_deb822() {



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/e7e9d6cedf5b2effe05a9371f8e2dc18ab0ef545

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/e7e9d6cedf5b2effe05a9371f8e2dc18ab0ef545
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190112/0d65b310/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list