Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#3175 - srcpac modifies PKGBUILD when using -o and requires root
Attached to Project:
Arch Linux
Opened by Darin Manica (manica) - Wednesday, 14 September 2005, 13:39 GMT
Last edited by Jason Chu (jason) - Tuesday, 01 May 2007, 03:30 GMT
Opened by Darin Manica (manica) - Wednesday, 14 September 2005, 13:39 GMT
Last edited by Jason Chu (jason) - Tuesday, 01 May 2007, 03:30 GMT
|
Detailssrcpac -So <package> modifies the PKGBUILD file. Since the user just wants to see the modifications, without installing them, it would be better to not modify the PKGBUILD. Additionally, this requires root permission which doesn't make sense because nothing is being installed.
The following patch allows srcpac to display the modifications without altering the PKGBUILD file and does not require root access when using the -o option. --- srcpac 2005-09-13 21:10:23.000000000 +0000 +++ srcpac.patched 2005-09-13 21:10:23.000000000 +0000 @@ -72,6 +72,19 @@ fi } +output_confs() +{ + varname=`echo $1 | sed 's#-#X#g'` + eval num_conf=\$\{\#conf_$varname[@]\} + if [ $num_conf -gt 0 ]; then + sedvar="" + eval "for (( j = 0 ; j < $num_conf ; j++ )); do + sedvar=\"\${sedvar}s\${conf_$varname[\$j]};\" + done" + eval sed \"$sedvar\" $2/PKGBUILD + fi +} + build_packages() { action="build" @@ -426,8 +439,7 @@ for pkgdir in $candidates; do if [ -f $pkgdir/PKGBUILD ]; then # Look for config options and apply them - do_confs $i $pkgdir - less $pkgdir/PKGBUILD + output_confs $i $pkgdir | less success=1 break fi |
This task depends upon
srcpac.patch