Pacman

Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
Tasklist

FS#34314 - [pacman] remove no-op from *.proto and from man pages

Attached to Project: Pacman
Opened by John (graysky) - Thursday, 14 March 2013, 20:54 GMT
Last edited by Allan McRae (Allan) - Monday, 14 October 2013, 05:54 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 4.1.2
Due in Version 4.2.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

In a personal email with Dave R., he pointed out to me that many of my AUR PKGBUILDs contain a no-op in their functions: cd "$srcdir" as the first statement. After inspecting /usr/bin/makepkg, he is right. I took my lead from the wiki and from the proto files pacman provides under /usr/share/pacman/*.proto

These should be removed from the proto files and from the wiki: https://wiki.archlinux.org/index.php/Arch_Packaging_Standards

I also find this reference in the PKGBUILD man page which should be changed as well.

I will post to the discussion page on the wiki with this flyspray. As an FYI, I wrote a little script that uses the ABS tree to see just how many PKGBUILDs also use this:

As of 10-Mar-2013:
Core: 143/178 fail (80 %)
Extra: 925/1982 fail (47 %)
Community: 1239/2531 fail (49 %)

"fail" = contain the $srcdir no-op.
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 14 October 2013, 05:54 GMT
Reason for closing:  Implemented
Additional comments about closing:  Mostly fixed in 5f80d7af. Fixing the rest now...
Comment by Allan McRae (Allan) - Thursday, 14 March 2013, 21:24 GMT
Well... the PROTOs have:

cd "$srcdir/$pkgname-$pkgver"

So that is not an no-op... Also, I do no think we have ever documented that you start in $srcdir (in fact, I wonder when that changed from $startdir... - I guess pacman-4.0), so removing that is probably not the best idea...

Comment by John (graysky) - Thursday, 14 March 2013, 23:24 GMT
Hmm... strictly speaking you're right, Allan. So it really becomes an issue of grammar in the PKGBUILD I suppose. If /usr/bin/makepkg will `cd "$srcdir"` at the start of the function, it does seem redundant to then `cd "$srcdir/foo"` instead of just `cd foo`. As I pointed out, about 20 % of [core] does it this way and [extra] and [community] are more or less split down the middle if I harvested the data correctly :/

Loading...