[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Best practices wrt. Changelog entries in spec file (upstream vs. specfile)



After a few minutes, here's a hack.  You need yum-utils installed to
get yumdownloader.  Please don't blame me if this sucks.

#!/bin/sh -x
DIR=yumlook.$$.$RANDOM

PKG=$1

FILE=`pwd`/$1

cd /tmp
mkdir $DIR
pushd $DIR

yumdownloader $PKG

# Should only be one file in this directory

rpm2cpio $PKG* | cpio --quiet --no-absolute-filenames -idmv 2>&1

$SHELL
popd
rm -rf /tmp/$DIR

For grins, here's another hack that works on local files and needs
nothing (save RPM) installed:

DIR=rpmlook.$$.$RANDOM
FILE=`pwd`/$1

cd /tmp
mkdir $DIR

pushd /tmp/$DIR
rpm2cpio "$FILE" | cpio --quiet --no-absolute-filenames -idmv 2>&1

$SHELL
popd
rm -rf /tmp/$DIR

 - J<


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]