Package: fai-client
Version: 3.4.7
Severity: normal

We tried to put a package in the package_config file with the following:

linux-image-3.2.0-0.bpo.4-amd64/squeeze-backports

But install_packages declared that the package:

  linux-image-3.2.0-0.bpo.4-amd64/squeeze-backports

didn't exist, which is lies.

The installable function has a regex which pick out the package name, but
it doesn't support the above syntax. The attached patch adds this support
(against master).

Cheers!

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-28-vserver (SMP w/1 CPU core)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=POSIX (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages fai-client depends on:
ii  file                   5.04-5+squeeze2   Determines file type using "magic"
ii  iproute                20100519-3        networking and traffic control too
ii  libapt-pkg-perl        0.1.24+b1         Perl interface to libapt-pkg
ii  perl                   5.10.1-17squeeze4 Larry Wall's Practical Extraction 

Versions of packages fai-client recommends:
ii  cfengine2                     2.2.10-2   Tool for configuring and maintaini
ii  debconf-utils                 1.5.36.1   debconf utilities

fai-client suggests no packages.

-- Configuration Files:
/etc/fai/fai.conf changed [not included]

-- no debconf information
>From 1285f9491282ee6c6fa61f4fe78909756e6a2015 Mon Sep 17 00:00:00 2001
From: Andrew Ruthven <p...@catalyst.net.nz>
Date: Tue, 26 Feb 2013 15:05:33 +1300
Subject: [PATCH] This regex was incorrectly throwing away targetted installs.

For example:

  package/squeeze-backports

Was being rejected.  This patch pulls out "package" and allows us to
see if it exists.
---
 bin/install_packages |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/install_packages b/bin/install_packages
index 2f1b6b8..2bbde36 100755
--- a/bin/install_packages
+++ b/bin/install_packages
@@ -440,7 +440,7 @@ sub mkpackagelist {
 
     # simulate APTs and aptitudes understanding of "special" package names
     # suffixed by -, +
-    elsif ( $pack =~ /^(.+)[_=+-]$/ and $cache->exists($1)) {
+    elsif ( $pack =~ /^(.+?)(?:\/.+|[_=+-])$/ and $cache->exists($1)) {
 
       if (defined ($cache->{$1}{VersionList})) {
         push @known, $pack;
-- 
1.7.10.4

Reply via email to