Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37522392
en ru br
ALT Linux repos
S:0.24-alt1
5.0: 0.15-alt1

Group :: Development/Other
RPM: repocop-unittest-rpm-filetriggers

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064117337021360014515gustar00rootroot0000000000000052 comment=e2b6922bcd89c2a21dfe88ca3230f83e8bc8901b
repocop-unittest-rpm-filetriggers-0.23/000075500000000000000000000000001173370213600202435ustar00rootroot00000000000000repocop-unittest-rpm-filetriggers-0.23/.gear/000075500000000000000000000000001173370213600212375ustar00rootroot00000000000000repocop-unittest-rpm-filetriggers-0.23/.gear/rules000064400000000000000000000000071173370213600223110ustar00rootroot00000000000000tar: .
repocop-unittest-rpm-filetriggers-0.23/desktop-mime-entry.pl000064400000000000000000000014321173370213600243350ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my $mainsec=$spec->get_section('package','');
my $instsec=$spec->get_section('install');
unless ($instsec and $instsec->match_body('desktop-file-install')) {
$mainsec->subst_body(qr'^BuildRequires:\s+desktop-file-utils\s*$','');
$mainsec->subst_body_if(qr'\s+desktop-file-utils',' ', qr'^BuildRequires:');
}
$mainsec->subst_body(qr'^Requires\(post,postun\):\s+desktop-file-utils\s*$','');
my %scriptsec=map {$_=>1} qw/pre post preun postun
triggerin triggerun triggerpostin triggerpostun/;
foreach my $section ($spec->get_sections()) {
my $secname=$section->get_type();
next unless $scriptsec{$secname};
$section->exclude_body(qr'update-desktop-database');
}
};

1;
repocop-unittest-rpm-filetriggers-0.23/desktop-mime-entry.posttest000064400000000000000000000013251173370213600256100ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*update-desktop-database*' or POSTIN glob '*update-desktop-database*') and PKGID not glob 'desktop-file-utils-*';
.output $REPOCOP_TEST_TMPDIR/msg2
select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*update-desktop-database*' or POSTUN glob '*update-desktop-database*') and PKGID not glob 'desktop-file-utils-*';
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i update-desktop-database call in post/postun is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/from_section.pl000064400000000000000000000007071173370213600232730ustar00rootroot00000000000000#!/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_body(qr"^\s*$cmd\s*\n?$",''); #"
$section->subst_body(qr"$cmd(?:\s*\n?$)?",'');
if ($section->is_empty()) {
$section->delete;
}
};

1;
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-alternatives-0.3.pl000064400000000000000000000037671173370213600277260ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my @todel;
foreach my $section ($spec->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_body_if(qr'alternatives >= 0:0.2.0-alt0.12','alternatives >= 0:0.4', qr'^Requires');
$section->subst_body_if(qr'alternatives >= 0.2.0(?=(?:\s|$))','alternatives >= 0.4', qr'^Requires');
$section->subst_body_if(qr'alternatives >= 0.2(?=(\s|$))','alternatives >= 0.4', qr'^Requires');
} else {
next unless $scriptsec{$secname};
$section->subst_body(qr'\s*\%post_register_alternatives\s+.+'s,'');
$section->subst_body(qr'\s*\%preun_unregister_alternatives\s+.+'s,'');
$section->subst_body(qr'\s*\%register_alternatives\s+.+'s,'');
$section->subst_body(qr'\s*\%remove_alternatives\s+.+\n?'s,'');
$section->subst_body(qr'\s*\%unregister_alternatives_always\s+.+'s,'');
$section->subst_body(qr'\s*\%unregister_alternatives\s+.+'s,'');
$section->subst_body(qr'\s*\%update_alternatives\s*','');
$section->exclude_body(qr'^\s*\[ -f "\%_altdir/\%name" \] \|\| exit 0\s*$');
#$section->subst(qr'\s*\','');
if ($section->is_empty()) {
push @todel, [$secname,$section->get_raw_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.23/obsolete-call-in-post-alternatives-0.3.posttest000064400000000000000000000031411173370213600311620ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_DBDIR/rpm.db" <<EOSQL
.mode tabs
create temporary table tmp1 (id TEXT);
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*alternatives-*' or POSTIN glob '*alternatives-update*' or POSTIN glob '*alternatives-helper*') and PKGID not glob 'alternatives-*';
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*alternatives-*' or POSTUN glob '*alternatives-update*' or POSTUN glob '*alternatives-helper*') and PKGID not glob 'alternatives-*';
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_PREIN where (PREINPROG glob '*alternatives-*' or PREIN glob '*alternatives-update*' or PREIN glob '*alternatives-helper*') and PKGID not glob 'alternatives-*';
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_PREUN where (PREUNPROG glob '*alternatives-*' or PREUN glob '*alternatives-update*' or PREUN glob '*alternatives-helper*') and PKGID not glob 'alternatives-*';
INSERT INTO tmp1 select distinct pkgid from RPM_TRIGGERS where (TRIGGERSCRIPTPROG glob '*alternatives-*' or TRIGGERSCRIPT glob '*alternatives-update*' or TRIGGERSCRIPT glob '*alternatives-helper*') and PKGID not glob 'alternatives-*';
DELETE FROM tmp1 WHERE id IN (select pkgid from RPM_REQUIRES WHERE REQUIRENAME = 'alternatives' AND REQUIREVERSION glob '0.4*' OR REQUIREVERSION glob '0:0.4*');
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct id from tmp1;
DROP TABLE tmp1;
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i 'alternatives-* calls in post/preun and in triggers are deprecated'; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-gtk-update-icon-cache.pl000064400000000000000000000026631173370213600307550ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my @todel;
my %scriptsec=map {$_=>1} qw/pre post preun postun
triggerin triggerun triggerpostin triggerpostun/;
foreach my $section ($spec->get_sections()) {
my $secname=$section->get_type();
next unless $scriptsec{$secname};
$section->exclude_body(qr'^\s*touch\s+--no-create\s+(\%\{?_datadir\}?/icons|\%\{?_iconsdir\}?)/hicolor');
$section->multi_exclude_body(
qr'^\s*if\s+\[\s+-x\s+.*gtk-update-icon-cache\s+\]\s*;\s*then',
qr'^\s*.*gtk-update-icon-cache',
qr'^\s*fi',
);
$section->multi_exclude_body(
qr'^\s*\[\s+"?\$1"?\s+-eq\s+1\s+\] &&\s+\\$',
qr'^\s*.*gtk-update-icon-cache',
);
my @body=@{$section->get_bodyref()};
my @new_body;
my $multiline=0;
while (scalar @body) {
$_=shift(@body);
next if $multiline and /\\\s*$/;
if ($multiline and not /\\\s*$/) {
$multiline=0;
next;
}
if (/gtk-update-icon-cache/) {
$multiline=1 if /\\\s*$/;
next;
}
push @new_body, $_;
}
$section->set_body(\@new_body);
$section->exclude_body(qr'gtk-update-icon-cache');

my $flag_p=$section->get_flag('-p');
if ((!$flag_p && $section->is_empty()) or ($flag_p && $flag_p=~/gtk-update-icon-cache/)) {
push @todel, [$secname,$section->get_raw_package(), $section->get_trigger_condition()];
}
}
map {$spec->del_section($_->[0],$_->[1],$_->[2])} @todel;
};

1;

__END__
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-gtk-update-icon-cache.posttest000064400000000000000000000012611173370213600322200ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*gtk-update-icon-cache*' or POSTIN glob '*gtk-update-icon-cache*') and PKGID not glob 'libgtk*';
.output $REPOCOP_TEST_TMPDIR/msg2
select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*gtk-update-icon-cache*' or POSTUN glob '*gtk-update-icon-cache*') and PKGID not glob 'libgtk*';
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i gtk-update-icon-cache call in post/postun is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-install-info.pl000064400000000000000000000037421173370213600273170ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my @todel;
my %scriptsec=map {$_=>1} qw/pre post preun postun
triggerin triggerun triggerpostin triggerpostun/;
foreach my $section ($spec->get_sections()) {
my $secname=$section->get_type();
if ($secname eq 'package') {
$section->exclude_body(qr'^(?:Pre)?Req(?:uires)?\((post|preun|post,preun)\):\s*/sbin/install-info');
$section->exclude_body(qr'^Requires\(post\):\s*\%install_info\s*$');
$section->exclude_body(qr'^Requires\(preun\):\s*\%uninstall_info\s*$');
$section->exclude_body(qr'^Requires\(post,preun\): %__install_info\s*$');
$section->exclude_body(qr'^PreReq: \%__install_info\s*$');
} else {
next unless $scriptsec{$secname};
# $section->exclude(qr'^\s*\%install_info');
# $section->exclude(qr'^\s*\%uninstall_info');
# $section->exclude(qr'^\s*\%xemacs_install_info');
# $section->exclude(qr'^\s*\%xemacs_uninstall_info');

# $section->exclude(qr'install-info[^\\]*$');
# $section->exclude(qr'^\s*\%__install_info[^\\]*$');

my @body=@{$section->get_bodyref()};
my @new_body;
my $multiline=0;
while (scalar @body) {
$_=shift(@body);
next if /^\s*\%install_info/;
next if /^\s*\%uninstall_info/;
next if /^\s*\%xemacs_install_info/;
next if /^\s*\%xemacs_uninstall_info/;
next if $multiline and /\\\s*$/;
if ($multiline and not /\\\s*$/) {
$multiline=0;
next;
}
if (/^\s*\%__install_info/ or /install-info/) {
$multiline=1 if /\\\s*$/;
next;
}
push @new_body, $_;
}
$section->set_body(\@new_body);

my $flag_p=$section->get_flag('-p');
if ((!$flag_p && $section->is_empty()) or ($flag_p && $flag_p=~/install.info/)) {
push @todel, [$secname,$section->get_raw_package(), $section->get_trigger_condition()];
}
}
}
map {$spec->del_section($_->[0],$_->[1],$_->[2])} @todel;
};

1;

__END__


%post -p %install_info
%preun -p %uninstall_info
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-install-info.posttest000064400000000000000000000016341173370213600305670ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_DBDIR/rpm.db" <<EOSQL
.mode tabs
create temporary table tmp1 (id TEXT);
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*install?info*' or POSTIN glob '*install?info*');
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_PREUN where (PREUNPROG glob '*install?info*' or PREUN glob '*install?info*');
INSERT INTO tmp1 select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*install?info*' or POSTUN glob '*install?info*');
INSERT INTO tmp1 select distinct pkgid from RPM_TRIGGERS where (TRIGGERSCRIPTPROG glob '*install?info*' or TRIGGERSCRIPT glob '*install?info*');
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct id from tmp1;
DROP TABLE tmp1;
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i '(un)install[-_]info* calls in post/preun and in triggers are deprecated'; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-scrollkeeper-update.pl000064400000000000000000000011021173370213600306560ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my $mainsec=$spec->get_section('package','');
$mainsec->subst_body(qr'^Requires\((?:post|postun|post,postun)\):\s+scrollkeeper\s*$','');
# TODO: common lib of utils, shared with Convert
my %scriptsec=map {$_=>1} qw/pre post preun postun
triggerin triggerun triggerpostin triggerpostun/;
foreach my $section ($spec->get_sections()) {
my $secname=$section->get_type();
next unless $scriptsec{$secname};
$section->exclude_body(qr'scrollkeeper-update');
}

};

1;
repocop-unittest-rpm-filetriggers-0.23/obsolete-call-in-post-scrollkeeper-update.posttest000064400000000000000000000012651173370213600321420ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*scrollkeeper-update*' or POSTIN glob '*scrollkeeper-update*') and PKGID not glob 'scrollkeeper-*';
.output $REPOCOP_TEST_TMPDIR/msg2
select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*scrollkeeper-update*' or POSTUN glob '*scrollkeeper-update*') and PKGID not glob 'scrollkeeper-*';
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i scrollkeeper-update call in post/postun is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/post_ldconfig.pl000064400000000000000000000013441173370213600234340ustar00rootroot00000000000000#!/usr/bin/perl -w

require 'from_section.pl';

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
foreach my $section ($spec->get_sections()) {
if ($section->get_bodyref()->[0]=~m!^\s*\%(post|preun)\s+.*-p\s+(?:\%post_|/sbin/)ldconfig!) {
$spec->delete;
}
}
&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);
&from_section($spec, $pkgname,'preun','%post_ldconfig_lib',1);
&from_section($spec, $pkgname,'preun','%post_ldconfig_sys',1);
&from_section($spec, $pkgname,'post','\[\s+-x\s+/sbin/post_ldconfig\s+\]\s+\&\&\s+/sbin/post_ldconfig.*',1);
};

1;
repocop-unittest-rpm-filetriggers-0.23/post_ldconfig.posttest000064400000000000000000000006641173370213600247120ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg
select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*ldconfig*' or POSTIN glob '*ldconfig*') and PKGID not glob 'glibc-*';
EOSQL
for i in `cat $REPOCOP_TEST_TMPDIR/msg`; do repocop-test-warn -k $i ldconfig call in post is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/postclean-05-filetriggers.pl000064400000000000000000000017331173370213600255020ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my %scriptsec=map {$_=>1} qw/pre post preun postun
triggerin triggerun triggerpostin triggerpostun/;
foreach my $section ($spec->get_sections()) {
my $secname=$section->get_type();
next unless $scriptsec{$secname};
&_postclean_from_section($spec,$section,'(?<!%)%\{?update_menus\}?');
&_postclean_from_section($spec,$section,'(?<!%)%\{?clean_menus\}?');
&_postclean_from_section($spec,$section,'(?<!%)%\{?post_ldconfig\}?');
&_postclean_from_section($spec,$section,'(?<!%)%\{?postun_ldconfig\}?');
&_postclean_from_section($spec,$section,'(?<!%)%\{?post_fonts\}?');
&_postclean_from_section($spec,$section,'(?<!%)%\{?postun_fonts\}?');
}
};

sub _postclean_from_section {
my ($spec,$section,$cmd) = @_;
$section->subst_body(qr"^\s*$cmd\s*\n?$",''); #"
$section->subst_body(qr"$cmd(?:\s*\n?$)?",'');
if ($section->is_empty()) {
$section->delete;
}
};


1;
repocop-unittest-rpm-filetriggers-0.23/postun_ldconfig.pl000064400000000000000000000010441173370213600237740ustar00rootroot00000000000000#!/usr/bin/perl -w

require 'from_section.pl';

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
foreach my $section ($spec->get_sections()) {
if ($section->get_bodyref()->[0]=~m!^\s*\%postun\s+.*-p\s+(?:\%postun_|/sbin/)ldconfig!) {
$section->delete;
}
}
&from_section($spec, $pkgname,'postun','%postun_ldconfig',1);
&from_section($spec, $pkgname,'postun','(?<!%)%post_ldconfig',1);
&from_section($spec, $pkgname,'postun','\[\s+-x\s+/sbin/postun_ldconfig\s+\]\s+\&\&\s+/sbin/postun_ldconfig.*',1);

};

1;
repocop-unittest-rpm-filetriggers-0.23/postun_ldconfig.posttest000064400000000000000000000006661173370213600252570ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg
select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*ldconfig*' or POSTUN glob '*ldconfig*') and PKGID not glob 'glibc-*';
EOSQL
for i in `cat $REPOCOP_TEST_TMPDIR/msg`; do repocop-test-warn -k $i ldconfig call in postun is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/repocop-unittest-rpm-filetriggers.spec000064400000000000000000000110251173370213600277220ustar00rootroot00000000000000Name: repocop-unittest-rpm-filetriggers
Version: 0.23
Release: alt2
BuildArch: noarch
Packager: Igor Yu. Vlasenko <viy@altlinux.org>

Summary: test for obsolete calls in post/un sections
Group: Development/Other
License: GPL or Artistic
Url: http://repocop.altlinux.org

Requires: repocop > 0.55
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.66

Source: %name-%version.tar

%description
integration test for repocop test platform.

%prep
%setup -q

%build

%install
for i in *.posttest; do
testname=`echo $i | sed -e s,.posttest\$,,`
install -pD -m 755 $testname.posttest %buildroot%_datadir/repocop/pkgtests/$testname/posttest
done

mkdir -p %buildroot%_datadir/repocop/fixscripts/
install -m 644 *.pl %buildroot%_datadir/repocop/fixscripts/

%files
%_datadir/repocop/pkgtests/*
%_datadir/repocop/fixscripts/*

%changelog
* Sun Mar 25 2012 Igor Vlasenko <viy@altlinux.ru> 0.23-alt2
- further adapted for new R::S::E syntax

* Thu Nov 10 2011 Igor Vlasenko <viy@altlinux.ru> 0.23-alt1
- adapted for new fixscript syntax

* Fri Aug 26 2011 Igor Vlasenko <viy@altlinux.ru> 0.22-alt1
- use R::S::E 0.66

* Tue May 24 2011 Igor Vlasenko <viy@altlinux.ru> 0.21-alt1
- postclean patchgen improvements
- removed support for dropped macros

* Fri Feb 19 2010 Igor Vlasenko <viy@altlinux.ru> 0.20-alt7
- postclean patchgen improvement

* Mon Jan 18 2010 Igor Vlasenko <viy@altlinux.ru> 0.20-alt6
- post_ldconfig patchgen improvement

* Fri Jan 15 2010 Igor Vlasenko <viy@altlinux.ru> 0.20-alt5
- postclean patchgen improvement

* Tue Nov 24 2009 Igor Vlasenko <viy@altlinux.ru> 0.20-alt4
- postclean patchgen improvement

* Sat Nov 21 2009 Igor Vlasenko <viy@altlinux.ru> 0.20-alt3
- shared-mime-info patchgen improvement

* Thu Nov 12 2009 Igor Vlasenko <viy@altlinux.ru> 0.20-alt2
- obsolete-call-in-post-install-info improvement

* Sat Nov 07 2009 Igor Vlasenko <viy@altlinux.ru> 0.20-alt1
- added:
+ obsolete-call-in-post-gtk-update-icon-cache.pl
+ postclean-filetriggers.pl

* Wed Sep 30 2009 Igor Vlasenko <viy@altlinux.ru> 0.19-alt1
- posttests migration

* Thu May 21 2009 Igor Vlasenko <viy@altlinux.ru> 0.18-alt2
- bugfix (thanks to @php-coder)

* Mon May 18 2009 Igor Vlasenko <viy@altlinux.ru> 0.18-alt1
- added obsolete-call-in-post-install-info check

* Thu Mar 12 2009 Igor Vlasenko <viy@altlinux.ru> 0.17-alt1
- fixed bug in post*_ldconfig fixscripts (thanks to @ldv)

* Thu Dec 18 2008 Igor Vlasenko <viy@altlinux.ru> 0.16-alt1
- support for requires alternatives >= 0:0.4

* Sun Dec 07 2008 Igor Vlasenko <viy@altlinux.ru> 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 <viy@altlinux.ru> 0.14-alt1
- improvements in fixscripts

* Wed Dec 03 2008 Igor Vlasenko <viy@altlinux.ru> 0.13-alt1
- accurate choice of triggers

* Wed Dec 03 2008 Igor Vlasenko <viy@altlinux.ru> 0.12-alt1
- update_menus in postun also cleaned up (thanks to mike@).

* Sun Nov 30 2008 Igor Vlasenko <viy@altlinux.ru> 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 <viy@altlinux.ru> 0.10-alt2
- bugfixes in obsolete-call-in-post-alternatives

* Sun Nov 23 2008 Igor Vlasenko <viy@altlinux.ru> 0.10-alt1
- bugfixes in obsolete-call-in-post-alternatives

* Sun Nov 23 2008 Igor Vlasenko <viy@altlinux.ru> 0.09-alt1
- bugfixes in obsolete-call-in-post-alternatives

* Fri Nov 21 2008 Igor Vlasenko <viy@altlinux.ru> 0.08-alt1
- added new test
obsolete-call-in-post-alternatives-0.3

* Sun Nov 16 2008 Igor Vlasenko <viy@altlinux.ru> 0.07-alt1
- support for Denis

* Sat Nov 15 2008 Igor Vlasenko <viy@altlinux.ru> 0.06-alt1
- cleanup and fixes

* Sat Nov 15 2008 Igor Vlasenko <viy@altlinux.ru> 0.05-alt1
- nice patches with no blank lines added

* Sat Nov 15 2008 Igor Vlasenko <viy@altlinux.ru> 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 <viy@altlinux.ru> 0.03-alt1
- multiple nightly bugs and misprints fixed

* Fri Nov 14 2008 Igor Vlasenko <viy@altlinux.ru> 0.02-alt1
- fixed bug in from_section.pl

* Thu Nov 13 2008 Igor Vlasenko <viy@altlinux.ru> 0.01-alt1
- First build for Sisyphus.
repocop-unittest-rpm-filetriggers-0.23/shared-mime-info.pl000064400000000000000000000013021173370213600237200ustar00rootroot00000000000000#!/usr/bin/perl -w

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
my $mainsec=$spec->get_section('package','');
$mainsec->subst_body(qr'^BuildRequires:\s+shared-mime-info\s*(?:[<>=]+\s*\S+\s*)?$','');
$mainsec->subst_body_if(qr'\s+shared-mime-info\s*(?:[<>=]+\s*\S+)?',' ', qr'^BuildRequires:');
$mainsec->subst_body(qr'^Requires\(post,postun\):\s+shared-mime-info\s*$','');
my %scriptsec=map {$_=>1} qw/pre post preun postun
triggerin triggerun triggerpostin triggerpostun/;
foreach my $section ($spec->get_sections()) {
my $secname=$section->get_type();
next unless $scriptsec{$secname};
$section->exclude_body(qr'update-mime-database');
}

};

1;
repocop-unittest-rpm-filetriggers-0.23/shared-mime-info.posttest000064400000000000000000000013021173370213600251720ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*update-mime-database*' or POSTIN glob '*update-mime-database*') and PKGID not glob 'shared-mime-info-*';
.output $REPOCOP_TEST_TMPDIR/msg2
select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*update-mime-database*' or POSTUN glob '*update-mime-database*') and PKGID not glob 'shared-mime-info-*';
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i update-mime-database call in post/postun is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
repocop-unittest-rpm-filetriggers-0.23/update_menus.pl000064400000000000000000000006471173370213600233000ustar00rootroot00000000000000#!/usr/bin/perl -w

require 'from_section.pl';

push @SPECHOOKS, sub {
my ($spec, $parent, $pkgname) = @_;
&from_section($spec, $pkgname,'post','%update_menus');
&from_section($spec, $pkgname,'postun','%clean_menus');
&from_section($spec, $pkgname,'preun','%clean_menus',1);
&from_section($spec, $pkgname,'postun','%update_menus',1);
&from_section($spec, $pkgname,'preun','%update_menus',1);
};

1;
repocop-unittest-rpm-filetriggers-0.23/update_menus.posttest000064400000000000000000000012021173370213600245360ustar00rootroot00000000000000#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg1
select distinct pkgid from RPM_SCRIPTS_POSTIN where (POSTINPROG glob '*update-menus*' or POSTIN glob '*update-menus*') and PKGID not glob 'menu-*';
.output $REPOCOP_TEST_TMPDIR/msg2
select distinct pkgid from RPM_SCRIPTS_POSTUN where (POSTUNPROG glob '*update-menus*' or POSTUN glob '*update-menus*') and PKGID not glob 'menu-*';
EOSQL
for i in `sort -u $REPOCOP_TEST_TMPDIR/msg*`; do repocop-test-warn -k $i update-menus call in post/postun is deprecated; done
rm $REPOCOP_TEST_TMPDIR/*
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin