Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37900604
en ru br
ALT Linux repos
S:0.1.26-alt6
5.0: 0.1.22-alt1
4.1: 0.1.20-alt2
4.0: 0.1.20-alt2

Group :: Development/Perl
RPM: perl-AptPkg

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: perl-AptPkg-0.1.26-alt6.patch
Download


 .gear/rules                                        |   2 +
 .../tags/0e2915e4f3807258496b5c6abaa0cb42a2df7ccf  |   6 +
 .gear/tags/list                                    |   1 +
 AptPkg.xs                                          |  18 +--
 AptPkg/PkgRecords.pm                               |   4 +-
 Makefile.PL                                        |  11 +-
 perl-AptPkg.spec                                   | 135 +++++++++++++++++++++
 7 files changed, 161 insertions(+), 16 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..5260d3d
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: v@version@:. name=libapt-pkg-perl-@version@
+diff: v@version@:. . name=perl-AptPkg-@version@-@release@.patch
diff --git a/.gear/tags/0e2915e4f3807258496b5c6abaa0cb42a2df7ccf b/.gear/tags/0e2915e4f3807258496b5c6abaa0cb42a2df7ccf
new file mode 100644
index 0000000..a631426
--- /dev/null
+++ b/.gear/tags/0e2915e4f3807258496b5c6abaa0cb42a2df7ccf
@@ -0,0 +1,6 @@
+object e4ccd29e03f0e86e49c4e3351cbd655b88bd4f2c
+type commit
+tag v0.1.26
+tagger Dmitry V. Levin <ldv@altlinux.org> 1332849755 +0000
+
+libapt-pkg-perl 0.1.26
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..e28008c
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+0e2915e4f3807258496b5c6abaa0cb42a2df7ccf v0.1.26
diff --git a/AptPkg.xs b/AptPkg.xs
index 845fa19..24bddfb 100644
--- a/AptPkg.xs
+++ b/AptPkg.xs
@@ -450,28 +450,28 @@ pkgVersioningSystem::UpstreamVersion(str)
 MODULE = AptPkg  PACKAGE = AptPkg::_cache
 
 pkgCacheFile *
-pkgCacheFile::new()
+pkgCacheFile::new(lock = false)
+    bool lock
   PREINIT:
     auto_init(aTHX_ INIT_CONFIG|INIT_SYSTEM);
 
+  C_ARGS:
+    lock
+
 void
 pkgCacheFile::DESTROY()
 
 bool
-pkgCacheFile::Open(lock = false)
-    bool lock
+pkgCacheFile::Open()
   PREINIT:
     OpTextProgress progress(*_config);
 
   C_ARGS:
-    &progress, lock
+    progress
 
   POSTCALL:
     handle_errors(0);
 
-void
-pkgCacheFile::Close()
-
 pkgCache_PkgIterator_p *
 pkgCacheFile::FindPkg(name)
     string name
@@ -525,7 +525,8 @@ pkgCacheFile::Packages()
 pkgPolicy_p *
 pkgCacheFile::Policy()
   CODE:
-    pkgPolicy *p = THIS->Policy;
+    OpTextProgress progress(*_config);
+    pkgPolicy *p = THIS->GetPolicy(progress);
     if (!p)
 	XSRETURN_UNDEF;
 
@@ -1097,6 +1098,7 @@ pkgRecords_p::Lookup(pack)
 
     PUSH_PAIR(FileName)
     PUSH_PAIR(MD5Hash)
+    PUSH_PAIR(Changelog)
     PUSH_PAIR(SourcePkg)
     PUSH_PAIR(Maintainer)
     PUSH_PAIR(ShortDesc)
diff --git a/AptPkg/PkgRecords.pm b/AptPkg/PkgRecords.pm
index bb160d1..d273d2b 100644
--- a/AptPkg/PkgRecords.pm
+++ b/AptPkg/PkgRecords.pm
@@ -69,8 +69,8 @@ The hash contains the following keys:
 
 =over 4
 
-C<FileName>, C<MD5Hash>, C<SourcePkg>, C<Maintainer>, C<ShortDesc>,
-C<LongDesc> and C<Name>.
+C<FileName>, C<MD5Hash>, C<Changelog>, C<SourcePkg>, C<Maintainer>,
+C<ShortDesc>, C<LongDesc> and C<Name>.
 
 =back
 
diff --git a/Makefile.PL b/Makefile.PL
index 69d6733..06369cc 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,7 +1,5 @@
 use ExtUtils::MakeMaker;
 
-my %changes = map /^([^:]*):\s+(.*)/, split /\n(?!\s)/, `dpkg-parsechangelog`;
-
 WriteMakefile(
     NAME	 => 'AptPkg',
     VERSION_FROM => 'AptPkg.pm',
@@ -11,12 +9,11 @@ WriteMakefile(
     LIBS	 => ['-lapt-pkg'],
     XSOPT	 => '-C++',
     depend	 => { Makefile => 'AptPkg.pm debian/changelog' }, # for VERSION
-    clean	 => { FILES => 't/cache/var/*.bin'
-			    . " $changes{Source}-$changes{Version}"
-			    . " $changes{Source}_$changes{Version}.*"
-			    . " $changes{Source}_$changes{Version}_*" },
+    clean	 => { FILES => 't/cache/var/*.bin' },
 );
 
+=pod
+
 sub MY::postamble
 {
     <<EOT . <<'EOT';
@@ -34,3 +31,5 @@ deb:
 	$(RM_RF) $(DEBNAME)-$(DEBVER)
 EOT
 }
+
+=cut
diff --git a/perl-AptPkg.spec b/perl-AptPkg.spec
new file mode 100644
index 0000000..fe041a6
--- /dev/null
+++ b/perl-AptPkg.spec
@@ -0,0 +1,135 @@
+# if debug isn't enabled, %%perl_vendor_build ignores %%optflags
+%def_enable debug
+
+Name: perl-AptPkg
+Version: 0.1.26
+Release: alt6
+
+Summary: Perl interface to libapt-pkg
+License: GPLv2+
+Group: Development/Perl
+
+URL: http://packages.debian.org/unstable/perl/libapt-pkg-perl
+Source: libapt-pkg-perl-%version.tar
+Patch: %name-%version-%release.patch
+
+# Automatically added by buildreq on Wed Oct 12 2011
+BuildRequires: gcc-c++ libapt-devel perl-devel
+%{?!_without_test:%{?!_disable_test:BuildPreReq: apt}}
+
+%description
+A Perl interface to APT's libapt-pkg which provides modules
+for configuration file/command line parsing, version comparison,
+inspection of the binary package cache and source package details.
+
+%prep
+%setup -n libapt-pkg-perl-%version
+%patch -p1
+%{?!_without_test:%{?!_disable_test:cp -a /etc/apt/* t/cache/etc/}}
+
+%build
+# Needed by APT API:
+%add_optflags -std=gnu++17
+
+%ifarch %e2k
+%remove_optflags -Wno-error
+%endif
+
+# To avoid some errors on API change:
+%add_optflags -Werror=overloaded-virtual
+# A style enforcement: always use the keyword, which helps to avoid API misuse
+%add_optflags -Werror=suggest-override
+
+%perl_vendor_build INC=-I%_includedir/rpm %{?!_without_test:%{?!_disable_test:||:}}
+
+%install
+%perl_vendor_install
+
+%files
+%doc	README debian/changelog examples
+	%perl_vendor_archlib/AptPkg.pm
+%dir	%perl_vendor_archlib/AptPkg
+	%perl_vendor_archlib/AptPkg/*.pm
+%doc	%perl_vendor_archlib/AptPkg/*.pod
+%dir	%perl_vendor_autolib/AptPkg
+	%perl_vendor_autolib/AptPkg/AptPkg.so
+
+%changelog
+* Tue Sep 15 2020 Ivan Zakharyaschev <imz@altlinux.org> 0.1.26-alt6
+- Adapted to changed API in apt-0.5.15lorg2-alt72
+  (pkgCacheFile class in RAII style).
+- (.spec) Just added some compiler flags (which don't change anything)
+  to be sure that APT API has not been used wrongly and will not be.
+  (Namely, to be sure that if a method override was intended, it would
+  actually be overriding and not hiding a virtual method and that it
+  would be marked "override" for future.)
+
+* Thu Jul 11 2019 Aleksei Nikiforov <darktemplar@altlinux.org> 0.1.26-alt5
+- Rebuilt with new Apt
+
+* Thu Jan 24 2019 Igor Vlasenko <viy@altlinux.ru> 0.1.26-alt4.qa1.2
+- rebuild with new perl 5.28.1
+
+* Fri Dec 15 2017 Igor Vlasenko <viy@altlinux.ru> 0.1.26-alt4.qa1.1.1
+- rebuild with new perl 5.26.1
+
+* Fri Feb 03 2017 Igor Vlasenko <viy@altlinux.ru> 0.1.26-alt4.qa1.1
+- rebuild with new perl 5.24.1
+
+* Tue Nov 22 2016 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.1.26-alt4.qa1
+- Rebuilt with libapt-pkg-libc6.9-6.so.6.
+
+* Wed Nov 25 2015 Igor Vlasenko <viy@altlinux.ru> 0.1.26-alt3.1.1.1.1
+- rebuild with new perl 5.22.0
+
+* Thu May 28 2015 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.1.26-alt3.1.1.1
+- Rebuilt for:
+ + libapt-pkg-libc6.9-6.so.5.
+ + gcc5 C++11 ABI.
+
+* Tue Dec 09 2014 Igor Vlasenko <viy@altlinux.ru> 0.1.26-alt3.1.1
+- rebuild with new perl 5.20.1
+
+* Wed Sep 10 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.1.26-alt3.1
+- Rebuilt with libapt-pkg-libc6.9-6.so.4.
+
+* Tue Mar 11 2014 Dmitry V. Levin <ldv@altlinux.org> 0.1.26-alt3
+- Rebuilt.
+
+* Thu Aug 29 2013 Vladimir Lettiev <crux@altlinux.ru> 0.1.26-alt2
+- built for perl 5.18
+
+* Fri Jan 11 2013 Dmitry V. Levin <ldv@altlinux.org> 0.1.26-alt1
+- 0.1.25 -> 0.1.26
+
+* Sun Sep 02 2012 Vladimir Lettiev <crux@altlinux.ru> 0.1.25-alt2
+- rebuilt for perl-5.16
+
+* Wed Oct 12 2011 Alexey Tourbin <at@altlinux.ru> 0.1.25-alt1
+- 0.1.24 -> 0.1.25
+- built for perl-5.14
+
+* Fri Nov 05 2010 Vladimir Lettiev <crux@altlinux.ru> 0.1.24-alt1.1.1
+- rebuilt with perl 5.12
+
+* Mon Dec 21 2009 Alexey I. Froloff <raorn@altlinux.org> 0.1.24-alt1.1
+- NMU:
+  + rebuilt with apt 0.5.15lorg2-alt31.1
+  + AptPkg::PkgRecords::lookup(): also return raw changelog text
+
+* Fri Nov 27 2009 Alexey Tourbin <at@altlinux.ru> 0.1.24-alt1
+- 0.1.22 -> 0.1.24
+
+* Sat Aug 30 2008 Alexey Tourbin <at@altlinux.ru> 0.1.22-alt1
+- 0.1.20 -> 0.1.22
+
+* Sat Jan 06 2007 Alexey Tourbin <at@altlinux.ru> 0.1.20-alt2
+- rebuilt with new libapt-pkg/glibc
+
+* Sat Jun 17 2006 Alexey Tourbin <at@altlinux.ru> 0.1.20-alt1
+- 0.1.12 -> 0.1.20
+
+* Tue Aug 10 2004 Alexey Tourbin <at@altlinux.ru> 0.1.12-alt1
+- initial revision
+- fc-rpm.patch: fix build
+- license: GPL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin