[Bug 506357] New: create_repo_for_patch.sh does not work
http://bugzilla.novell.com/show_bug.cgi?id=506357 Summary: create_repo_for_patch.sh does not work Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Update Problems AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mopp@gmx.net QAContact: jsrain@novell.com Found By: --- Hi, I tried to create my own patch repository using the patch-*.xml Script version $Id: create_repo_for_patch.sh,v 1.4 2008/06/25 12:55:38 lrupp Exp lrupp I think there are some bugs in the script: Line 45 RPMDIR is not set: echo " example: $0 -S $RPMDIR ." Line 78: Parameter PREFIX is never used in the script Line 133: This section looks completly wrong. It should look in the source directory for patches, right? Line 156: Directory wrong Linue 158, 159: Why not include delta and patch rpms? Line 160: Directory wrong As anyone ever used this tool? I attached this small bugfix, with the bugfix the script at least seems to do something. I' m not sure if it works correctly. The patch and delta files are still excluded in the createrepo. --- create_repo_for_patch.sh 2009-05-22 13:42:57.000000000 +0200 +++ /usr/bin/create_repo_for_patch.sh 2009-03-06 13:05:47.000000000 +0100 @@ -42,7 +42,7 @@ echo " gpg will try to use the default signing key" echo " -v : be verbose" echo - echo " example: $0 -S <source directory> <target directory>" + echo " example: $0 -S $RPMDIR ." echo echo "WARING: $(basename $0) will delete all files except patch files n <target directory> !" echo @@ -131,13 +131,13 @@ mkdir -p "$REPODIR/repodata.tmp" if [ -z "$NEWPATCHFILES" ]; then - for i in $(find $RPMDIR -name "${NEWPATCHFILES}*"); do - cp -a $i "$REPODIR/repodata.tmp/" + for i in $(find -name "${NEWPATCHFILES}*"); do + mv $i "$REPODIR/repodata.tmp/" PATCHFILES="$PATCHFILES $(basename $i)" done else for i in $NEWPATCHFILES; do - find $RPMDIR -name $i -exec cp -a {} "$REPODIR/repodata.tmp/" + find -name $i -exec mv {} "$REPODIR/repodata.tmp/" PATCHFILES="$PATCHFILES $(basename $i)" done fi @@ -152,11 +152,11 @@ for patchfile in $(ls $REPODIR/repodata.tmp/*); do patch=$(basename $patchfile) - for rpmfile in $(grep "location href" "$patchfile" | cut -d "\"" -f2); do + for rpmfile in $(grep "location href" "$REPODIR/$patchfile" | cut -d "\"" -f2); do arch_dir=$(dirname $rpmfile | xargs basename) test -d "$REPODIR/rpm/$arch_dir" || mkdir -p "$REPODIR/rpm/$arch_dir" - #if [[ $rpmfile == *.delta.rpm ]]; then continue; fi - #if [[ $rpmfile == *.patch.rpm ]]; then continue; fi + if [[ $rpmfile == *.delta.rpm ]]; then continue; fi + if [[ $rpmfile == *.patch.rpm ]]; then continue; fi cp -a "$RPMDIR/$rpmfile" "$REPODIR/rpm/$arch_dir/" if [ $? -ne 0 ]; then echo "ERROR: $RPMDIR/$rpmfile missing!" >&2 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=506357
User mopp@gmx.net added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c1
--- Comment #1 from Ulf Lange
http://bugzilla.novell.com/show_bug.cgi?id=506357
Dirk Mueller
http://bugzilla.novell.com/show_bug.cgi?id=506357
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c2
Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=506357
User mopp@gmx.net added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c3
--- Comment #3 from Ulf Lange
http://bugzilla.novell.com/show_bug.cgi?id=506357
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c4
--- Comment #4 from Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=506357
User mopp@gmx.net added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c5
--- Comment #5 from Ulf Lange
http://bugzilla.novell.com/show_bug.cgi?id=506357
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c6
--- Comment #6 from Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=506357
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c7
--- Comment #7 from Lars Vogdt
http://bugzilla.novell.com/show_bug.cgi?id=506357
User lrupp@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=506357#c8
Lars Vogdt
participants (1)
-
bugzilla_noreply@novell.com