pax_global_header00006660000000000000000000000064111170360730014511gustar00rootroot0000000000000052 comment=9dce7596dfd7941a5b82351d446f479818d22cb8 repocop-unittest-rpm-filetriggers-0.15/000075500000000000000000000000001111703607300202405ustar00rootroot00000000000000repocop-unittest-rpm-filetriggers-0.15/.gear/000075500000000000000000000000001111703607300212345ustar00rootroot00000000000000repocop-unittest-rpm-filetriggers-0.15/.gear/rules000064400000000000000000000000071111703607300223060ustar00rootroot00000000000000tar: . repocop-unittest-rpm-filetriggers-0.15/desktop-mime-entry.done000064400000000000000000000013251111703607300246450ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',''); $mainsec->subst(qr'^BuildRequires:\s+desktop-file-utils\s*$',''); $mainsec->subst_if(qr'\s+desktop-file-utils',' ', qr'^BuildRequires:'); &from_section($spec, $pkgname,'post','%update_desktopdb'); &from_section($spec, $pkgname,'postun','%clean_desktopdb'); &from_section($spec, $pkgname,'preun','%clean_desktopdb',1); }; 1; repocop-unittest-rpm-filetriggers-0.15/from_section.pl000064400000000000000000000007301111703607300232640ustar00rootroot00000000000000#!/usr/bin/perl -w sub from_section { my ($spec, $pkgname,$secname,$cmd, $suppress_oops) = @_; my $section=$spec->get_section($secname,'-n '.$pkgname); unless ($section) { print STDERR "Oops! ($cmd): $secname not found for $pkgname\n" unless $suppress_oops; return; } $section->subst(qr"^\s*$cmd\s*\n?$",''); #" $section->subst(qr"$cmd(?:\s*\n?$)?",''); if ($section->is_empty()) { $spec->del_section($secname,'-n '.$pkgname); } }; 1; repocop-unittest-rpm-filetriggers-0.15/obsolete-call-in-post-alternatives-0.3.done000064400000000000000000000031011111703607300302130ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_DBDIR/rpm.db" <get_sections()) { my $secname=$section->get_type(); my %scriptsec=map {$_=>1} qw/pre post preun postun triggerin triggerun triggerpostin triggerpostun/; if ($secname eq 'package') { $section->subst_if(qr'alternatives >= 0:0.2.0-alt0.12','alternatives >= 0:0.4', qr'^Requires'); $section->subst_if(qr'alternatives >= 0.2.0(?=(?:\s|$))','alternatives >= 0.4', qr'^Requires'); $section->subst_if(qr'alternatives >= 0.2(?=(\s|$))','alternatives >= 0.4', qr'^Requires'); } else { next unless $scriptsec{$secname}; $section->subst(qr'\s*\%post_register_alternatives\s+.+'s,''); $section->subst(qr'\s*\%preun_unregister_alternatives\s+.+'s,''); $section->subst(qr'\s*\%register_alternatives\s+.+'s,''); $section->subst(qr'\s*\%remove_alternatives\s+.+\n?'s,''); $section->subst(qr'\s*\%unregister_alternatives_always\s+.+'s,''); $section->subst(qr'\s*\%unregister_alternatives\s+.+'s,''); $section->subst(qr'\s*\%update_alternatives\s*',''); $section->exclude(qr'^\s*\[ -f "\%_altdir/\%name" \] \|\| exit 0\s*$'); #$section->subst(qr'\s*\',''); if ($section->is_empty()) { push @todel, [$secname,$section->get_package(), $section->get_trigger_condition()]; } } } map {$spec->del_section($_->[0],$_->[1],$_->[2])} @todel; }; 1; __END__ BuildRequires: help2man, alternatives >= 0:0.2.0-alt0.12 Requires: alternatives >= 0:0.2.0-alt0.12 Requires(post): alternatives >= 0:0.2.0-alt0.12 Requires(post): alternatives >= 0:0.2.0-alt0.12 jaxp_parser_impl Requires(post,preun): alternatives >= 0.2 Requires(post,preun): alternatives >= 0.2.0 Requires(postun): alternatives >= 0:0.2.0-alt0.12 Requires(preun): alternatives >= 0:0.2.0-alt0.12 Requires(preun): alternatives >= 0:0.2.0-alt0.12 jaxp_parser_impl Requires: xml-commons-apis alternatives >= 0:0.2.0-alt0.12 repocop-unittest-rpm-filetriggers-0.15/obsolete-call-in-post-gtk-update-icon-cache.done000064400000000000000000000012611111703607300312550ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',''); $mainsec->subst(qr'^Requires\(post,postun\):\s+scrollkeeper\s*$',''); &from_section($spec, $pkgname,'post','%update_scrollkeeper'); &from_section($spec, $pkgname,'postun','%clean_scrollkeeper'); }; 1; repocop-unittest-rpm-filetriggers-0.15/post_ldconfig.done000064400000000000000000000006641111703607300237470ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_sections()) { unless ($section->get_body()->[0]=~m!^\s*\%post\s+.*-p\s+(?:\%post_|/sbin/)ldconfig!) { push @sections, $section; } } $spec->set_sections(\@sections); &from_section($spec, $pkgname,'post','%post_ldconfig_lib',1); &from_section($spec, $pkgname,'post','%post_ldconfig_sys',1); &from_section($spec, $pkgname,'post','%post_ldconfig',1); }; 1; repocop-unittest-rpm-filetriggers-0.15/postun_ldconfig.done000064400000000000000000000006661111703607300243140ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_sections()) { unless ($section->get_body()->[0]=~m!^\s*\%postun\s+.*-p\s+(?:\%postun_|/sbin/)ldconfig!) { push @sections, $section; } } $spec->set_sections(\@sections); &from_section($spec, $pkgname,'postun','%postun_ldconfig',1); &from_section($spec, $pkgname,'postun','%post_ldconfig',1); }; 1; repocop-unittest-rpm-filetriggers-0.15/repocop-unittest-rpm-filetriggers.spec000064400000000000000000000055421111703607300277260ustar00rootroot00000000000000Name: repocop-unittest-rpm-filetriggers Version: 0.15 Release: alt1 BuildArch: noarch Packager: Igor Yu. Vlasenko Summary: test for obsolete calls in post/un sections Group: Development/Other License: GPL or Artistic #Url: Requires: repocop Conflicts: repocop-unittest-post_ldconfig >= 0.03 Obsoletes: repocop-unittest-post_ldconfig < 0.03 Provides: repocop-unittest-altdesktop = 0.09 Obsoletes: repocop-unittest-altdesktop < 0.09 Conflicts: repocop-unittest-freedesktop-mime-test >= 0.04 Obsoletes: repocop-unittest-freedesktop-mime-test < 0.04 Requires: perl-RPM-Source-Editor >= 0.40 Source: %name-%version.tar %description intergration test for repocop test platform. %prep %setup -q %build %install for i in *.done; do testname=`echo $i | sed -e s,.done\$,,` install -pD -m 755 $testname.done %buildroot%_datadir/repocop/pkgtests/$testname/done done mkdir -p %buildroot%_datadir/repocop/fixscripts/ install -m 644 *.pl %buildroot%_datadir/repocop/fixscripts/ %files %_datadir/repocop/pkgtests/* %_datadir/repocop/fixscripts/* %changelog * Sun Dec 07 2008 Igor Vlasenko 0.15-alt1 - real support for %%force_update_alternatives macro: if package requires alternatives >= 0.4 no warning is issued. * Sun Dec 07 2008 Igor Vlasenko 0.14-alt1 - improvements in fixscripts * Wed Dec 03 2008 Igor Vlasenko 0.13-alt1 - accurate choice of triggers * Wed Dec 03 2008 Igor Vlasenko 0.12-alt1 - update_menus in postun also cleaned up (thanks to mike@). * Sun Nov 30 2008 Igor Vlasenko 0.11-alt1 - support for %%force_update_alternatives macro: if package requires alternatives >= 0.4 no warning is issued. * Fri Nov 28 2008 Igor Vlasenko 0.10-alt2 - bugfixes in obsolete-call-in-post-alternatives * Sun Nov 23 2008 Igor Vlasenko 0.10-alt1 - bugfixes in obsolete-call-in-post-alternatives * Sun Nov 23 2008 Igor Vlasenko 0.09-alt1 - bugfixes in obsolete-call-in-post-alternatives * Fri Nov 21 2008 Igor Vlasenko 0.08-alt1 - added new test obsolete-call-in-post-alternatives-0.3 * Sun Nov 16 2008 Igor Vlasenko 0.07-alt1 - support for Denis * Sat Nov 15 2008 Igor Vlasenko 0.06-alt1 - cleanup and fixes * Sat Nov 15 2008 Igor Vlasenko 0.05-alt1 - nice patches with no blank lines added * Sat Nov 15 2008 Igor Vlasenko 0.04-alt1 - added new tests: * obsolete-call-in-post-gtk-update-icon-cache * obsolete-call-in-post-scrollkeeper-update * Sat Nov 15 2008 Igor Vlasenko 0.03-alt1 - multiple nightly bugs and misprints fixed * Fri Nov 14 2008 Igor Vlasenko 0.02-alt1 - fixed bug in from_section.pl * Thu Nov 13 2008 Igor Vlasenko 0.01-alt1 - First build for Sisyphus. repocop-unittest-rpm-filetriggers-0.15/shared-mime-info.done000064400000000000000000000013021111703607300242270ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_section('package',''); $mainsec->subst(qr'^BuildRequires:\s+shared-mime-info\s*$',''); $mainsec->subst_if(qr'\s+shared-mime-info',' ', qr'^BuildRequires:'); &from_section($spec, $pkgname,'post','%update_mimedb'); &from_section($spec, $pkgname,'postun','%clean_mimedb'); }; 1; repocop-unittest-rpm-filetriggers-0.15/update_menus.done000064400000000000000000000012021111703607300235730ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <