[27554] in Source-Commits

home help back first fref pref prev next nref lref last post

debathena-thirdparty commit: Support suppression of dependency checking

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Dec 30 10:26:19 2013

Date: Mon, 30 Dec 2013 10:26:12 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201312301526.rBUFQCMQ017576@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/debathena-thirdparty/commit/05a4b6569f19c6a4a4dff4e6ca4b1c3a16dd1714
commit 05a4b6569f19c6a4a4dff4e6ca4b1c3a16dd1714
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Mon Dec 30 09:56:52 2013 -0500

    Support suppression of dependency checking
    
    - Add a syntax (+packagename) to force inclusion as a dependency,
      even if it's not present in the APT cache.  This is probably a bad
      idea, but we need it for, e.g., things in our repository, since
      chdist can't support multiple sources.  To minimize potential
      damage, this syntax is only allowed in distro-specific list files.
    - Note in the changelog that the athinfo defs file was removed in 1.2

 debian/changelog         |    8 ++++++++
 generate-package-list.pl |   11 +++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0545c73..f076d78 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debathena-thirdparty (1.2.1) unstable; urgency=low
+
+  * Document that the athinfo defs file was removed in 1.2
+  * Support the forced inclusion of distro-specific dependencies,
+    for things that can't be verified in the APT cache
+
+ -- Jonathan Reed <jdreed@mit.edu>  Mon, 30 Dec 2013 10:19:09 -0500
+
 debathena-thirdparty (1.2) unstable; urgency=low
 
   [ Alexander Chernyakhovsky ]
diff --git a/generate-package-list.pl b/generate-package-list.pl
index 605f31f..f246918 100755
--- a/generate-package-list.pl
+++ b/generate-package-list.pl
@@ -80,8 +80,8 @@ while (<COMMON>) {
     s/\s+$//;
     next if /^#/;
     next unless /\S/;
-    if (/^-/) {
-	die "Syntax error: package exclusion in the common file, line $.";
+    if (/^[-\+]/) {
+	die "Syntax error: forced inclusion or exclusion in the common file, line $.";
     } 
     if (/^(\S+) \| (\S+)$/) {
 	debug("Examining conditional line: $_");
@@ -129,6 +129,9 @@ if (-f join('/', $opt_l, $codename)) {
 	} elsif (/^\?(\S+)$/) {
 	    debug("Adding $1 to recommendations");
 	    $packages{$1} = 2;
+	} elsif (/^\+(\S+)$/) {
+	    debug("Force-adding $1 to recommendations");
+	    $packages{$1} = 3;
 	} else {
 	    debug("Adding $_ to dependencies");
 	    $packages{$_} = 1;
@@ -140,6 +143,10 @@ if (-f join('/', $opt_l, $codename)) {
 }
 
 foreach my $pkgname (sort(keys(%packages))) {
+    if ($packages{$pkgname} == 3) {
+	warn("Dependency-checking suppressed for $pkgname");
+	next;
+    }
     my $pkg = $cache->{$pkgname};
     if (! $pkg) {
 	debug("Removing $pkgname as it can't be found in the APT cache.");

home help back first fref pref prev next nref lref last post