summaryrefslogtreecommitdiff
path: root/test/test.d/signed-packages.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-01 21:54:55 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-01 22:04:42 -0500
commitbb69db69c7d319491f67be2db77889b70aa634f0 (patch)
tree47bd7761c44d1f11ed8c2247cf2200e8a9aadc29 /test/test.d/signed-packages.sh
parent12507975408257ff24f1f367b8b3b842fa779f1f (diff)
rm repo-remove -- in Oct 2012 fauno removed repo-add, but left this
The customized repo-{add,remove} did license extraction for packages. They were based on the versions from pacman 3.5.0 Here is a diff between the stock versions from 3.5.0, and the modified version that we had: --- repo-add.sh.in 2013-12-31 18:02:13.546351038 -0500 +++ repo-remove.in 2013-12-31 18:13:19.957948677 -0500 @@ -20,6 +20,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +LICENSESDIR=/home/parabolavnx/licenses + # gettext initialization export TEXTDOMAIN='pacman' export TEXTDOMAINDIR='@localedir@' @@ -309,6 +311,22 @@ fi fi + # Extracts licenses to a common license dir + msg "Extracting license" + if bsdtar -xOf ${pkgfile} .PKGINFO | grep "license" | grep "custom" ; then + if [ -d ${LICENSESDIR}/${pkgname} ]; then + rm -r ${LICENSESDIR}/${pkgname} + fi + + # Change dir to licenses, and extract them stripping the first part of the path + bsdtar -C ${LICENSESDIR}/ --include="usr/share/licenses/" \ + --strip-components 3 -xf ${pkgfile} >/dev/null 2>&1 + + if [ $? -ne 0 ]; then + warning "This package doesn't contain a license dir" + fi + fi + return 0 } # end db_write_entry @@ -328,6 +346,12 @@ rm -rf $pkgentry pkgentry=$(find_pkgentry $pkgname) done + + msg "Removing license" + if [ -d ${LICENSESDIR}/${pkgname} ]; then + rm -r ${LICENSESDIR}/${pkgname} + fi + return $notfound } # end db_remove_entry
Diffstat (limited to 'test/test.d/signed-packages.sh')
0 files changed, 0 insertions, 0 deletions