Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#23510 - Scriptlet won't work on custom build packages with turkish system locale

Attached to Project: Pacman
Opened by Atilla ÖNTAŞ (tarakbumba) - Wednesday, 30 March 2011, 00:05 GMT
Last edited by Dan McGee (toofishes) - Friday, 01 April 2011, 21:08 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity High
Priority Normal
Reported Version 3.5.1
Due in Version 3.5.2
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I'm currently maintaining dkms-nvidia package in AUR. After upgrading to pacman 3.5.1 install scriptlet doesn't work anymore.
Somehow, makepkg creates localized packages:
02:35 atilla@tarakbumba:~/DEPOM/Archlinux/Paketler/dkms-nvidia-270.30-3-x86_64.pkg$ ls -lah
toplam 24K
drwxr-xr-x 4 atilla users 4,0K Mar 30 02:35 .
drwxr-xr-x 3 atilla users 4,0K Mar 30 02:35 ..
drwxr-xr-x 3 atilla users 4,0K Mar 30 02:34 etc
-rw-r--r-- 1 atilla users 1,2K Mar 30 02:34 .iNSTALL
-rw-r--r-- 1 atilla users 1,7K Mar 30 02:34 .PKGINFO
drwxr-xr-x 3 atilla users 4,0K Mar 30 02:34 usr

See the .iNSTALL (I with a dot on it) file? Pacman 3.4.3 was running this file as expected.
Besides, namcap throws below warning:

dkms-nvidia W: File (.iNSTALL) exists in a non-standard directory.

I have tried to export system locale to en. And then run makepkg. Everything seems okay. Pacman runs scriptlet a expected:

export LANG=en && makepkg
This command creates a package with an ".INSTALL" scriptlet file.

Additional info:
* package version(s)
pacman-3.5.1
* config and/or log files etc.
None

Steps to reproduce:
Set system locale to a language other than english, i.e turkish in my case.
Create a package which includes a install scriptlet.
Install package and see scriptlet not processed.
Also check package with namcap to get "W: File (.iNSTALL) exists in a non-standard directory." warning.
This task depends upon

Closed by  Dan McGee (toofishes)
Friday, 01 April 2011, 21:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  Commit 541c2470b8ad8c1c0c9
Comment by Dan McGee (toofishes) - Wednesday, 30 March 2011, 00:15 GMT
  • Field changed: Attached to Project (Arch Linux → Pacman)
  • Field changed: Summary (Pacman 3.5.1 scriptlet won't work on custom build packages with turkish system locale → Scriptlet won't work on custom build packages with turkish system locale)
Wrong project...
Comment by Dan McGee (toofishes) - Wednesday, 30 March 2011, 00:16 GMT
`git show 76f816b9f764434d` for a past example of when this has burned us.

We should NOT be fucking around with case nearly ever unless it is md5sums, etc. or something that is totally under our control.
Comment by Dan McGee (toofishes) - Wednesday, 30 March 2011, 00:30 GMT
It is fairly tempting to just revert f27fed14b16dc85da104ae4c463ba6040d7e4d64 (with a note of caution added to prevent this from happening again), as I can't see a great way of looping two items at once that isn't some sick bash hack. Otherwise you would have to pull a function out and that doesn't save any LoC at all.

In other 'tr' news in makepkg:
* Why does in_opt_array need to use tr?
* Why do we translate md5|sha1 et al. *keys* from upper to lower in generate_checksums? The 'tr' call in check_checksums translates the actual hash, ensuring A-F becomes a-f, but I don't see why we would ever want to screw with the key names in generate.
Comment by Dave Reisner (falconindy) - Wednesday, 30 March 2011, 00:38 GMT
Dan and I seem to disagree on what 'shady' means, but the attached patch kills the regression without going back to separate for loops.
Comment by Allan McRae (Allan) - Wednesday, 30 March 2011, 04:06 GMT
I'll ack that patch, although I might lean on Dan's side of what shady means! :P

I agree that a patch that removes the tr lines from in_opt_array and generate_checksums would be good.
Comment by Atilla ÖNTAŞ (tarakbumba) - Wednesday, 30 March 2011, 07:15 GMT
Hi, will a new pacman release that fixes this bug planned soon? This bug prevents me using AUR and abs.
Also i wonder if this bug affects only Turkish locale or other locales too?
As a note: I have packages those exactly have same install scriptlet (.INSTALL with dotted I)and pacamn < 3.5.x runs them just fine.
Comment by Dan McGee (toofishes) - Wednesday, 30 March 2011, 07:37 GMT
It doesn't prevent you from doing anything. It just means you need a workaround:
LANG=C makepkg

And this will likely only affect the Turkish locale- note that the bug deals with case conversion and the i/I character.
Comment by Atilla ÖNTAŞ (tarakbumba) - Wednesday, 30 March 2011, 07:40 GMT
Thank you for immediate bug tracking and fixing efforts. Turkish gives a little trouble to developers, heh :)
Comment by Allan McRae (Allan) - Thursday, 31 March 2011, 01:10 GMT
Patch to remove unnecessary tr usage
Comment by Atilla ÖNTAŞ (tarakbumba) - Friday, 01 April 2011, 22:36 GMT
Hi, altough Dan Mcgee have been closed this bug report as fixed; Allan's proposed patch does not fixed this issue here; i dunno if i should also apply Dave's proposed patch too?? It seems only Dave's patch worked here.
Comment by Allan McRae (Allan) - Friday, 01 April 2011, 22:39 GMT
Both patches were applied. In fact, the commit mentioned in the close message is Dave's patch...
Comment by Atilla ÖNTAŞ (tarakbumba) - Friday, 01 April 2011, 23:25 GMT
Thank you very much.

Loading...