Skip to content

makepkg: ERROR: epoch must be an integer.

All of a sudden I've started getting this epoch error every time I want to build a package.

Did anybody else get this error?

Has anyone any idea on what's producing it and/or how to fix it?

thank you!

EDIT:

I've searched on the code (pacman 3.5.1-1) and changed the line 1244 from this:

if [[ ! $epoch =~ ^[0-9]*$ ]]; then
	error "$(gettext "%s must be an integer.")" "epoch"
	ret=1
fi

to this:

if [[ ! $epoch =~ ^[0123456789]+$ ]]; then
	error "$(gettext "%s must be an integer.")" "epoch"
	ret=1
fi

and it works now.

I think that in my bash installation (version 4.2.008-1) the regular expression "[0-9]" doesn't seem to work :S ..any idea why? nobody else has this problem? really? should I report this to the pacman mailing list?

EDIT2: FIXED!

It seems that it was some problem with my locale configuration. Somehow, my system doesn't like to have the collate set as my localization (es_ES). I had to add these two lines in my bashrc to get it working:

export LC_ALL=
export LC_COLLATE="C"

Thank you very much for all the help guys!

3 points8 comments
Open on Reddit
About this post
Posted
Archived
Score
3 · 100% up
Kind
Text
ID
gpwft

Author

9
posts
144
comments
0
media
View profile

8 comments

What package are you trying to build?

Could you paste the PKGBUILD somewhere?

I haven't had that error since epoch has been introduced with pacman 3.5

2 points

I get the same for every package in AUR I've tried. it can't be the PKGBUILD, no package sets the "epoch" variable at all.

I tried editing the PKGBUILDs adding a line with epoch=0 and epoch=1, even epoch=387 but none of them worked.

I'm using pacman 3.5.1-1

EDIT: I think I've fixed it somehow by editing makepkg sourcecode, check the updated text in the post.

1 points

Can you do an echo $epoch in the line above the if statement?

1 points
ferkOP2 hidden

That's the first thing I did before editing the line. The epoch value is the expected one. "0" if not set in the PKGBUILD, or anything I set on it.

I think it's something with my bash. The following command does not echo anything in my terminal:

[[ 1 =~ ^[0-9]+$ ]] && echo "integer"
1 points

Weird

 frutiger[0] ~ $ bash --version
GNU bash, version 4.2.6(2)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 frutiger[0] ~ $ [[ 1 =~ ^[0-9]+$ ]] && echo "integer"
integer
1 points

I think I had that error a while ago. It was fixed by grabbing a different version of some package from the aur. I know it isn't very helpful, Sorry. Check what version of yajl you are using or updating bash.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.