aboutsummaryrefslogtreecommitdiffstats
path: root/rebuild_perl_iurt
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2023-11-26 21:34:16 +0000
committerPascal Terjan <pterjan@mageia.org>2023-11-26 21:34:16 +0000
commit92a5f7b1c1980be0ed210f03d44b1160d1d801de (patch)
treef4c480dd0311404b9c69c711e7edddd0e24aa83c /rebuild_perl_iurt
parent004b3fa810d0458d8ee583c6818b5edf0866b502 (diff)
downloadiurt-92a5f7b1c1980be0ed210f03d44b1160d1d801de.tar
iurt-92a5f7b1c1980be0ed210f03d44b1160d1d801de.tar.gz
iurt-92a5f7b1c1980be0ed210f03d44b1160d1d801de.tar.bz2
iurt-92a5f7b1c1980be0ed210f03d44b1160d1d801de.tar.xz
iurt-92a5f7b1c1980be0ed210f03d44b1160d1d801de.zip
Also set target when building package path
Diffstat (limited to 'rebuild_perl_iurt')
-rwxr-xr-xrebuild_perl_iurt2
1 files changed, 1 insertions, 1 deletions
diff --git a/rebuild_perl_iurt b/rebuild_perl_iurt
index 4d68186..c18da8e 100755
--- a/rebuild_perl_iurt
+++ b/rebuild_perl_iurt
@@ -47,7 +47,7 @@ sudo rpm -Uvh --force rpmbuild/RPMS/*/perl-List-MoreUtils-*.rpm
rpmbuild --target $arch -ba rpmbuild/SPECS/perl-URPM.spec
rpmbuild --target $arch -ba rpmbuild/SPECS/perl-Locale-gettext.spec
sudo rpm -Uvh --force rpmbuild/RPMS/*/perl-URPM-*.rpm rpmbuild/RPMS/*/perl-Locale-gettext-*.rpm
-updatepkgs() { spec=\$1; toupdate=; while read line; do set -- \$line; name=\$1; path=\$2; rpm -q \$name --quiet && toupdate="\$toupdate \$path"; done < <(rpm -q --specfile \$spec --qf '%{name} rpmbuild/RPMS/%{arch}/%{name}-%{version}-%{release}.%{arch}.rpm\n' | egrep -v -- '-(debuginfo|__restore__)-'); [ -n "\$toupdate" ] && sudo rpm -Uvh --force \$toupdate; }
+updatepkgs() { spec=\$1; toupdate=; while read line; do set -- \$line; name=\$1; path=\$2; rpm -q \$name --quiet && toupdate="\$toupdate \$path"; done < <(rpm -q --target $arch --specfile \$spec --qf '%{name} rpmbuild/RPMS/%{arch}/%{name}-%{version}-%{release}.%{arch}.rpm\n' | egrep -v -- '-(debuginfo|__restore__)-'); [ -n "\$toupdate" ] && sudo rpm -Uvh --force \$toupdate; }
rebuild() { p=\$1; mgarepo getsrpm -n \$p; rpm -ivh @*:\$p-*.src.rpm; spec=rpmbuild/SPECS/\$p.spec; sudo urpmi --auto --no-verify-rpm \$spec; rpmbuild --target $arch -ba \$spec; updatepkgs \$spec; }
pkgs=\$(LC_ALL=C rpm -q --qf '%{SOURCERPM}\n' --whatrequires \$(cat \$perlapis_path) | perl -lne '/^(\S+)-[^-]+-[^-]+$/ and print \$1' | uniq); for p in \$pkgs; do rebuild \$p; done
EOF