summaryrefslogtreecommitdiff
path: root/db-remove
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 18:05:41 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 21:06:40 -0500
commit766a076891a37cebc7b448241c8c183c32f49d9e (patch)
treeeaaae2fed37efeaf140a90df631f8063cdc7c26d /db-remove
parent725ab5d12375dd593c375b1a494021bb96135d4f (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 'db-remove')
0 files changed, 0 insertions, 0 deletions