From 5a914dd8291c79c5545a167e25d2c2992c3d62c9 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Fri, 28 Oct 2011 17:17:15 +0000 Subject: add lspkg command --- functions | 40 ++++++++++++++++++++++++++++++++++++++++ repoctl | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/functions b/functions index c40cff0..cee332b 100644 --- a/functions +++ b/functions @@ -333,3 +333,43 @@ function move_pkg() "$output" } +function ls_pkg() +{ + local src_distrorelease="$1"; shift + local src_section="$1"; shift + local src_sectionrepo="$1"; shift + local srcname="$1"; shift + local output="$1"; shift + + check_distro_section "$src_distrorelease" "$src_section" "$src_sectionrepo" + + local srcpkg=$(find_src_pkg "$src_distrorelease" "$src_section" "$src_sectionrepo" "$srcname") + + if [ -z $srcpkg ] + then + return 0 + fi + + for arch in $arches + do + move_pkg_files \ + "" "" "" \ + "" "" "" \ + $(get_media_path "$src_distrorelease" "$src_section" "$src_sectionrepo" "$arch") \ + "" \ + "$srcpkg" "$output" + move_pkg_files \ + "" "" "" \ + "" "" "" \ + $(get_media_path_debug "$src_distrorelease" "$src_section" "$src_sectionrepo" "$arch") \ + "" \ + "$srcpkg" "$output" + done + move_pkg_file \ + "" "" "" \ + "" "" "" \ + $(get_media_path_src "$src_distrorelease" "$src_section" "$src_sectionrepo") \ + "" \ + "$output" +} + diff --git a/repoctl b/repoctl index 479c0ba..ae75543 100755 --- a/repoctl +++ b/repoctl @@ -38,6 +38,17 @@ Example : repoctl rmpkg --srcrepo 1:core:updates_testing --srcpkg emacs EOF + ;; + lspkg) + cat <