[Build-common-hackers] Bug#616501: scripts/list-packages doesn't support wildcard architectures
Aurelien Jarno
aurelien at aurel32.net
Sun Sep 11 10:24:36 UTC 2011
tag 616501 + patch
thanks
On Sat, Mar 05, 2011 at 12:58:39AM +0100, José Manuel Santamaría Lema wrote:
> Package: cdbs
> Version: 0.4.92
> Severity: normal
>
> Hi,
>
> this is the result if you run list-packages same against the control file
> attached:
>
> $ /usr/lib/cdbs/list-packages same
> kdenetwork-filesharing kget libkopete4 kopete libkopete-dev krdc krfb
> kdenetwork-dbg kde-zeroconf
>
> Note that kppp is missing. However if you use a list of architectures instead of
> 'linux-any' (see the attached diff file), the output of 'list-packages same' is
> right:
>
> $ /usr/lib/cdbs/list-packages same
> kdenetwork-filesharing kget libkopete4 kopete libkopete-dev kppp krdc krfb
> kdenetwork-dbg kde-zeroconf
Please find below a patch to fix this issue. I think it is important to
fix that soon, given the armhf architecture is coming, and it can't be
easily supported through type-handling (which btw should just die).
--- a/debian/control
+++ b/debian/control
@@ -26,7 +26,7 @@
Package: cdbs
Architecture: all
-Depends: debhelper (>= 5.0.30)
+Depends: debhelper (>= 5.0.30), libdpkg-perl
Recommends: autotools-dev
Suggests: devscripts
Description: common build system for Debian packages
--- a/scripts/list-packages
+++ b/scripts/list-packages
@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+use Dpkg::Arch qw(debarch_is);
+
sub error {
my $err = shift;
print STDERR $err;
@@ -63,7 +65,7 @@
if ($package &&
(($type eq 'indep' && $arch eq 'all') ||
($type eq 'arch' && $arch ne 'all') ||
- ($type eq 'same' && ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) ||
+ ($type eq 'same' && (debarch_is($buildarch, $arch))) ||
! $type)) {
push @list, $package;
$package="";
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien at aurel32.net http://www.aurel32.net
More information about the Build-common-hackers
mailing list