[devscripts] 01/01: chdist: add support for running apt-file
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Sep 5 13:26:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository devscripts.
commit 5a76b72d09949cc2320cfeeee5c350ff47e02aa1
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat Sep 5 10:25:58 2015 -0300
chdist: add support for running apt-file
---
debian/changelog | 4 ++++
scripts/chdist.pl | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6c121d0..3f494ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,10 @@ devscripts (2.15.9) UNRELEASED; urgency=medium
(wheezy|jessie|stretch)-security instead of their changing
counterparts (oldstable|stable|testing)-security (Closes: #797084)
+ [ Antonio Terceiro ]
+ * chdist:
+ + Add support for running apt-file
+
-- Joachim Breitner <nomeata at debian.org> Tue, 11 Aug 2015 21:12:03 +0200
devscripts (2.15.8) unstable; urgency=high
diff --git a/scripts/chdist.pl b/scripts/chdist.pl
index c50b3fe..21daaa6 100755
--- a/scripts/chdist.pl
+++ b/scripts/chdist.pl
@@ -68,6 +68,10 @@ Run B<apt-get> inside I<DIST>
Run B<apt-cache> inside I<DIST>
+=item B<apt-file> I<DIST> <B<update>|B<search>|...>
+
+Run B<apt-file> inside I<DIST>
+
=item B<apt-rdepends> I<DIST> [...]
Run B<apt-rdepends> inside I<DIST>
@@ -264,6 +268,19 @@ sub aptcmd
exec($cmd, @args);
}
+sub apt_file
+{
+ my ($dist, @args) = @_;
+ dist_check($dist);
+ my $sources_list = $datadir . '/' . $dist . "/etc/apt/sources.list";
+ my $cache_directory = $datadir . '/' . $dist . "/var/cache/apt/apt-file";
+ unshift(@args,
+ '--sources-list', $sources_list,
+ '--cache', $cache_directory
+ );
+ exec('apt-file', @args);
+}
+
sub bin2src
{
my ($dist, $pkg) = @_;
@@ -666,6 +683,9 @@ given ($command) {
when ('apt-cache') {
aptcmd('apt-cache', @ARGV);
}
+ when ('apt-file') {
+ apt_file(@ARGV);
+ }
when ('apt-rdepends') {
aptcmd('apt-rdepends', @ARGV);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list