FS#54092 - some bits doesn't respect -with-pkg-ext=... configure option

Attached to Project: Pacman
Opened by Gabriel C (abucodonosor) - Wednesday, 17 May 2017, 05:13 GMT
Task Type Bug Report
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Summary and Info:

Some code seems to not respect --with-pkg-ext=.something

Steps to Reproduce:

configure pacman with --with-pkg-ext=.something

see code in src/pacman/callback.c L788

( also some of the py testsuile seems to have hardcoded PM_EXT_PKG )

Regards
This task depends upon

Comment by Allan McRae (Allan) - Wednesday, 17 May 2017, 05:23 GMT
Line in question

/* strip package or DB extension for cleaner look */
if((p = strstr(fname, ".pkg")) || (p = strstr(fname, ".db")) || (p = strstr(fname, ".files"))) {
Comment by Gabriel C (abucodonosor) - Wednesday, 17 May 2017, 05:58 GMT
Yes , sorry forgot to post the line.

while looking somewhat closer --with-src-ext=.something isn't respected also.

src/pacman/sync.c L225:

/* skip source packages within the cache directory */
"*.src.tar.*"
Comment by Andrew Gregory (andrewgregory) - Wednesday, 17 May 2017, 11:46 GMT
PKGEXT has nothing to do with pacman; it's solely for makepkg. libalpm and pacman do not care in the slightest what the file extension is, and shouldn't use PKGEXT. The line in callback.c is purely for cosmetic purposes for files that follow common conventions. sync_cleancache shouldn't really be using file extension at all.

Loading...