Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Skip lib32-* packages on non-x64 architectures.
  • Loading branch information
Trizen committed Feb 17, 2013
1 parent 1db5427 commit 6a8ff9d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions trizen
@@ -1,6 +1,6 @@
#!/usr/bin/perl #!/usr/bin/perl
# #
# Copyright (C) 2010-2012 Trizen <echo dHJpemVueEBnbWFpbC5jb20K | base64 -d>. # Copyright (C) 2010-2013 Trizen <echo dHJpemVueEBnbWFpbC5jb20K | base64 -d>.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
Expand All @@ -21,7 +21,7 @@
# Created on: 07 July 2010, 12:00 PM # Created on: 07 July 2010, 12:00 PM
# Rewritten on: 16 February 2011 # Rewritten on: 16 February 2011
# Second rewrite on: 24 March 2012 # Second rewrite on: 24 March 2012
# Latest edit on: 27 December 2012 # Latest edit on: 17 February 2013
# http://trizen.googlecode.com # http://trizen.googlecode.com


eval 'exec perl -S $0 ${1+"$@"}' eval 'exec perl -S $0 ${1+"$@"}'
Expand Down Expand Up @@ -56,6 +56,7 @@ my $config_dir = (


my $config_file = catfile($config_dir, "$execname.conf"); my $config_file = catfile($config_dir, "$execname.conf");
my $user = (getpwuid $<)[0] || substr(`whoami`, 0, -1); my $user = (getpwuid $<)[0] || substr(`whoami`, 0, -1);
my $arch = substr(`arch`, 0, -1);


if (not -d $config_dir) { if (not -d $config_dir) {
make_path($config_dir) or warn "[!] Unable to create dir $config_dir: $!"; make_path($config_dir) or warn "[!] Unable to create dir $config_dir: $!";
Expand Down Expand Up @@ -935,6 +936,14 @@ sub install_local_tarball ($$) {
return; return;
} }


sub _is_lib32 ($) {
my ($pkg) = @_;
if ($arch ne 'x86_64') {
return 1 if $pkg =~ /^lib32-\w/;
}
return;
}

sub install_package ($) { sub install_package ($) {
my ($pkg) = @_; my ($pkg) = @_;


Expand Down Expand Up @@ -996,6 +1005,11 @@ sub install_package ($) {
next; next;
} }


if (_is_lib32($dep)) {
say "** Ignoring lib32-* package arch '$arch': $dep" if $lconfig{debug};
next;
}

if (not $lconfig{install_all} and package_is_installed($dep)) { if (not $lconfig{install_all} and package_is_installed($dep)) {
say "** Skipping package $dep - already installed!" if $lconfig{debug}; say "** Skipping package $dep - already installed!" if $lconfig{debug};
} }
Expand Down

0 comments on commit 6a8ff9d

Please sign in to comment.